]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: update last trans if we don't update the inode
authorJosef Bacik <jbacik@fusionio.com>
Mon, 13 Aug 2012 19:43:26 +0000 (15:43 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:02 +0000 (15:19 -0400)
commita5b813492664dfc8f93ad229eb9c7096285a8cb6
treeff0693d2aafb89b3a4bb5d4d6be37f54b8389423
parent9e955d7ed07b5c3a7eb28c812a059560ec7798e8
Btrfs: update last trans if we don't update the inode

There is a completely impossible situation to hit where you can preallocate
a file, fsync it, write into the preallocated region, have the transaction
commit twice and then fsync and then immediately lose power and lose all of
the contents of the write.  This patch fixes this just so I feel better
about the situation and because it is lightweight, we just update the
last_trans when we finish an ordered IO and we don't update the inode
itself.  This way we are completely safe and I feel better.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/inode.c