On 06/15/2009 04:50 PM, Christoph Hellwig wrote: > On Mon, Jun 15, 2009 at 04:31:01PM +0300, Boaz Harrosh wrote: >> + ret = write_inode_now(inode, 0); > > You shouldn't need a write_inode_now, but rather just a similar > sync_inode call as in ext2 or the new simple_fsync as data was > already written by the VFS. > Yes you are right I forgot to do this. I was sitting on this patch for after-the-merge exactly for that reason, but ended up sending it like this. Thanks will fix. >> + /* This is a good place to write the sb */ >> + /* TODO: Sechedule an sb-sync on create */ >> + sb = inode->i_sb; >> + lock_super(sb); >> + if (sb->s_dirt && sb->s_op->write_super) >> + sb->s_op->write_super(sb); >> + unlock_super(sb); > > fsync is not a really good place for a sb write normally. What metadata > in the superblock is needed related to syncing a single file in btrfs? > You are absolutely right, but I will leave it like this for now. The thing is that superblock in exofs keeps a cache of the current number of files, and is not properly scheduled for write after update, so this is the place to catch it for now. It was done like this until today. When I have time to properly test it, I will drop this from here. Thanks for the review 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