]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: check to see if the inode is in the log before fsyncing
authorJosef Bacik <josef@redhat.com>
Tue, 29 May 2012 20:57:49 +0000 (16:57 -0400)
committerJosef Bacik <josef@redhat.com>
Wed, 30 May 2012 14:23:42 +0000 (10:23 -0400)
commit93a44d0de7973141252c88b96a4a3a91327063cc
tree96f9f1b4a4e0f0e77503fd63e6552a4a4b477e21
parent46fd7aedc252277e989e77a76ef9e915e9469eed
Btrfs: check to see if the inode is in the log before fsyncing

We have this check down in the actual logging code, but this is after we
start a transaction and all that good stuff.  So move the helper
inode_in_log() out so we can call it in fsync() and avoid starting a
transaction altogether and just exit if we've already fsync()'ed this file
recently.  You would notice this issue if you fsync()'ed a file over and
over again until the transaction committed.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/file.c
fs/btrfs/tree-log.c