[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    Re: [fuse-devel] [PATCH v6 00/11] fuse: An attempt to implement a write-back cache policy
From:       Miklos Szeredi <miklos () szeredi ! hu>
Date:       2014-01-31 16:28:54
Message-ID: 20140131162854.GL24171 () tucsk ! piliscsaba ! szeredi ! hu
[Download RAW message or body]

On Thu, Jan 30, 2014 at 10:42:06AM +0400, Maxim Patlasov wrote:

> >One bigger issue I found is ctime handling.  Ctime is updated along
> >with mtime on each data modification (write, truncate, hole-punch),
> >but is also updated on chmod, chown, link, unlink, rename, setxattr,
> >removexattr.
> >
> >Could you please look into this?
> 
> Yes, I've already thought about it. So far as we update i_size and
> mtime locally, without immediate flush to the server, we have to
> handle ctime similarly as well. The server may not have actual info
> about mtime and ctime, so we must honour local, not server ctime, on
> fuse_getattr(). And of course all those guys modifying metadata
> (chmod, etc.) must update local ctime properly. All this (at least
> at first glance) is doable, but flushing ctime to the server will
> require API extestion: 1) add ctime and ctimensec fields to struct
> fuse_setattr_in; 2) add #define for FATTR_CTIME. Are you OK about
> it?

Good point.

One other issue: in case fc->atomic_o_trunc is set FUSE_I_MTIME_DIRTY won't be
cleared on open(O_TRUNC), AFAICS.  And adding a clear_bit() to
fuse_finish_open() is not enough, but need to hold i_mutex across such opens to
make it work race free.  I don't see problems with getting i_mutex for
open(O_TRUNC) and it's already held for open(O_CREAT|O_TRUNC).

Thanks,
Miklos

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic