Btrfs: Avoid orphan inodes cleanup while replaying log
authorYan, Zheng <zheng.yan@oracle.com>
Thu, 12 Nov 2009 09:34:40 +0000 (09:34 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:19:54 +0000 (13:19 -0700)
commitc4ba0bd9db5e8fd2664be0fd4ec01335fe3268eb
tree743b960437015b399e5dfc58404756afd8c15704
parenteb99c071ac2ec45c55713e5b9931b810cf0f1d2f
Btrfs: Avoid orphan inodes cleanup while replaying log

commit c71bf099abddf3e0fdc27f251ba76fca1461d49a upstream.

We do log replay in a single transaction, so it's not good to do unbound
operations. This patch cleans up orphan inodes cleanup after replaying
the log. It also avoids doing other unbound operations such as truncating
a file during replaying log. These unbound operations are postponed to
the orphan inode cleanup stage.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/inode.c
fs/btrfs/relocation.c
fs/btrfs/tree-log.c