[Devel] [PATCH 7/7] fuse: flush ctime in FUSE_FORGET requests

Miklos Szeredi miklos at szeredi.hu
Mon Apr 28 07:51:45 PDT 2014


Maxim,

Thanks for the patches.

On Tue, Apr 15, 2014 at 1:33 PM, Maxim Patlasov <MPatlasov at parallels.com> wrote:
> Some inode operations (e.g., rename) operate directly on inodes and dentries
> without opened files involved. This means that even though fuse set
> inode->i_ctime and FUSE_I_CTIME_DIRTY properly, a corresponding flush operation
> will never happen (i.e. no fsync or close to call fuse_flush_cmtime()).
>
> The patch solves the problem by passing local ctime to the userspace server
> inside forget requests.

Hmm, I really don't like this.

1) What has forget to do with ctime?  It feels like being forced into
the interface
2) Forget may not be called for a long time after the modification and
it may not be called *at all*, which would result in the loss of the
ctime change after umount.

How about wiring up fuse_flush_cmtime() to be called from
s_op->write_inode() instead?

Updated patchset pushed to

  git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-linus

Survives some basic testing, but it would be great if you could also
take a look.

Thanks,
Miklos



More information about the Devel mailing list