]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: actually log directory we are fsync()'ing
authorJosef Bacik <jbacik@fusionio.com>
Wed, 11 Sep 2013 13:36:30 +0000 (09:36 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sat, 21 Sep 2013 15:05:24 +0000 (11:05 -0400)
commitd5407458da83e370ef9bafb186135d4e38d9c263
tree5b2b03e06b93c37472c18b161dcb0dd4e6c2f33b
parentf6e836876a64906a9e1f8972e3d1c09f0c6a0990
Btrfs: actually log directory we are fsync()'ing

If you just create a directory and then fsync that directory and then pull the
power plug you will come back up and the directory will not be there.  That is
because we won't actually create directories if we've logged files inside of
them since they will be created on replay, but in this check we will set our
logged_trans of our current directory if it happens to be a directory, making us
think it doesn't need to be logged.  Fix the logic to only do this to parent
directories.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/tree-log.c