Re: exofs_file_fsync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 31, 2010 at 04:43:48PM +0300, Boaz Harrosh wrote:
> OK Chritoff I would need your help Please.
> 
> It looks like what I need exactly is:
> 	write_inode_now(inode, sync)
> 
> But write_inode_now() has one extra hunk over generic_file_fsync:
> 	if (sync)
> 		inode_sync_wait(inode);

It waits for I_SYNC beeing cleared, which is entirely superflous
for ->fsync purposes.  In fact I don't have the slightest idea
what it is useful for, given that we already clear I_SYNC inside
writeback_single_inode ourselves.  So the only thing it causes
is to wait for another code racing to step into this code just
after us.

> Do you think I can get in trouble calling it from ->fsync
> 
> I don't like generic_file_fsync because it does not write my
> data since I don't have buffer_heads.

Then copy it.

> OK, I'm totally lost what does ->fsync need to do? only write
> the inode or the pages as well?

The pages are written by vfs_fsync_range.  You need to make sure
that the inode back, or if the datasync flag is set only changes
to the inode require to find that data are written back.  That's
basically a messy wording for you can skip dirtiness of timestamp
updates if the datasync flag is set.

Note that your patch below is very wrong for this, as it does
a lot of asynchronous activity if the datasync flag is not set.

--
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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux