On 05/31/2010 01:27 PM, Christoph Hellwig wrote: > On Mon, May 31, 2010 at 01:23:09PM +0300, Boaz Harrosh wrote: >> On 05/31/2010 01:09 PM, Christoph Hellwig wrote: >>> Various odd things going on here: >>> >>> - no checks for I_DIRTY and friends, so it will always write out data >>> - filemap_write_and_wait is superflous, as it's already done by >>> the caller >>> - write_inode_now is overkill as it also writes out data, better use >>> sync_inode in a similar way to generic_file_fsync >> >> I'll look into it, but I think what I did here was to effectively >> "data sync" because I wanted a data sync on close and that was the only >> vector I already had that's called on close. > > fsync won't get called at close time. ->release is called on last close > and ->flush on every close. > OK, I was just looking at that. thanks you saved me some digging. should I just open-code the generic_file_fsync minus the blocks thing then? I'm busy with the truncate stuff, but I'll do this next. Do you need this ASAP? Thanks Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html