diff options
author | Yan, Zheng <zheng.yan@oracle.com> | 2009-11-12 04:34:40 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-12-17 12:33:33 -0500 |
commit | c71bf099abddf3e0fdc27f251ba76fca1461d49a (patch) | |
tree | 0b682ad2b49aeaf9ac774c40be4b7549c1d079fe /fs/btrfs/ctree.h | |
parent | c216775458a2ee345d9412a2770c2916acfb5d30 (diff) |
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.h | 5 |
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 { | |||
859 | struct mutex ordered_operations_mutex; | 859 | struct mutex ordered_operations_mutex; |
860 | struct rw_semaphore extent_commit_sem; | 860 | struct rw_semaphore extent_commit_sem; |
861 | 861 | ||
862 | struct rw_semaphore subvol_sem; | 862 | struct rw_semaphore cleanup_work_sem; |
863 | 863 | ||
864 | struct rw_semaphore subvol_sem; | ||
864 | struct srcu_struct subvol_srcu; | 865 | struct srcu_struct subvol_srcu; |
865 | 866 | ||
866 | struct list_head trans_list; | 867 | struct list_head trans_list; |
@@ -1034,12 +1035,12 @@ struct btrfs_root { | |||
1034 | int ref_cows; | 1035 | int ref_cows; |
1035 | int track_dirty; | 1036 | int track_dirty; |
1036 | int in_radix; | 1037 | int in_radix; |
1038 | int clean_orphans; | ||
1037 | 1039 | ||
1038 | u64 defrag_trans_start; | 1040 | u64 defrag_trans_start; |
1039 | struct btrfs_key defrag_progress; | 1041 | struct btrfs_key defrag_progress; |
1040 | struct btrfs_key defrag_max; | 1042 | struct btrfs_key defrag_max; |
1041 | int defrag_running; | 1043 | int defrag_running; |
1042 | int defrag_level; | ||
1043 | char *name; | 1044 | char *name; |
1044 | int in_sysfs; | 1045 | int in_sysfs; |
1045 | 1046 | ||