Skip to content

-idle option not working properly #421

@bertogg

Description

@bertogg

The -idle option should unmount the filesystem if it has been idle for the specified amount of time.

However it seems to do it always, regardless of whether the filesystem is idle or not.

This script should create a new filesystem, mount it (with -idle 20s), create a directory inside it, and create 100 files, one every 5 seconds.

This should guarantee that the filesystem is always busy so all 100 files should be created. However the filesystem is unmounted after 20 seconds and the script exits with an error.

I tested this with gocryptfs 1.7

#!/bin/sh

set -eu

DIR=`mktemp -d /tmp/tmpdir.XXXXXX`
mkdir $DIR/crypt $DIR/plain

echo foo | gocryptfs -init $DIR/crypt
echo foo | gocryptfs -idle 20s $DIR/crypt $DIR/plain

mkdir $DIR/plain/data

for f in `seq -w 0 99`; do
    date
    echo sometext > $DIR/plain/data/$f
    ls $DIR/plain/data
    sleep 5
done

fusermount -u $DIR/plain

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions