Re: [PATCH 05/11] fuse: Trust kernel i_mtime only -v2

2014-01-20 Thread Maxim Patlasov
On 01/06/2014 08:22 PM, Miklos Szeredi wrote: On Thu, Dec 26, 2013 at 07:41:41PM +0400, Maxim Patlasov wrote: + + if (!err) + clear_bit(FUSE_I_MTIME_DIRTY, &fi->state); Doing the test and the clear separately opens a huge race window when i_mtime modifications are bound to g

Re: [PATCH 05/11] fuse: Trust kernel i_mtime only -v2

2014-01-06 Thread Miklos Szeredi
On Thu, Dec 26, 2013 at 07:41:41PM +0400, Maxim Patlasov wrote: > >>+ > >>+ if (!err) > >>+ clear_bit(FUSE_I_MTIME_DIRTY, &fi->state); > >Doing the test and the clear separately opens a huge race window when i_mtime > >modifications are bound to get lost. > > No. Because the whole oper

Re: [PATCH 05/11] fuse: Trust kernel i_mtime only -v2

2013-12-26 Thread Maxim Patlasov
Hi Miklos, Sorry for delay, see please inline comments below. On 11/12/2013 08:52 PM, Miklos Szeredi wrote: On Thu, Oct 10, 2013 at 05:10:56PM +0400, Maxim Patlasov wrote: Let the kernel maintain i_mtime locally: - clear S_NOCMTIME - implement i_op->update_time() - flush mtime on fsync a

Re: [PATCH 05/11] fuse: Trust kernel i_mtime only -v2

2013-11-12 Thread Miklos Szeredi
On Thu, Oct 10, 2013 at 05:10:56PM +0400, Maxim Patlasov wrote: > Let the kernel maintain i_mtime locally: > - clear S_NOCMTIME > - implement i_op->update_time() > - flush mtime on fsync and last close > - update i_mtime explicitly on truncate and fallocate > > Fuse inode flag FUSE_I_MTIME_DIR