Btrfs: Dir fsync optimizations

Drop i_mutex during the commit

Don't bother doing the fsync at all unless the dir is marked as dirtied
and needing fsync in this transaction.  For directories, this means
that someone has unlinked a file from the dir without fsyncing the
file.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-09-11 15:53:12 -04:00
parent 98509cfc5a
commit 49eb7e46d4
4 changed files with 29 additions and 6 deletions

View File

@@ -56,6 +56,9 @@ struct btrfs_inode {
* transid that last logged this inode
*/
u64 logged_trans;
/* trans that last made a change that should be fully fsync'd */
u64 log_dirty_trans;
u64 delalloc_bytes;
u64 disk_i_size;
u32 flags;