summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorYan, Zheng2009-11-12 10:34:40 +0100
committerChris Mason2009-12-17 18:33:33 +0100
commitc71bf099abddf3e0fdc27f251ba76fca1461d49a (patch)
tree0b682ad2b49aeaf9ac774c40be4b7549c1d079fe /fs/btrfs/ctree.h
parentBtrfs: Fix disk_i_size update corner case (diff)
downloadkernel-qcow2-linux-c71bf099abddf3e0fdc27f251ba76fca1461d49a.tar.gz
kernel-qcow2-linux-c71bf099abddf3e0fdc27f251ba76fca1461d49a.tar.xz
kernel-qcow2-linux-c71bf099abddf3e0fdc27f251ba76fca1461d49a.zip
Btrfs: Avoid orphan inodes cleanup while replaying log
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ae5b0aaa9386..fcfbefbbb685 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -859,8 +859,9 @@ struct btrfs_fs_info {
struct mutex ordered_operations_mutex;
struct rw_semaphore extent_commit_sem;
- struct rw_semaphore subvol_sem;
+ struct rw_semaphore cleanup_work_sem;
+ struct rw_semaphore subvol_sem;
struct srcu_struct subvol_srcu;
struct list_head trans_list;
@@ -1034,12 +1035,12 @@ struct btrfs_root {
int ref_cows;
int track_dirty;
int in_radix;
+ int clean_orphans;
u64 defrag_trans_start;
struct btrfs_key defrag_progress;
struct btrfs_key defrag_max;
int defrag_running;
- int defrag_level;
char *name;
int in_sysfs;