Commit 1c900151 authored by Bob Peterson's avatar Bob Peterson Committed by Andreas Gruenbacher

gfs2: Add SDF_DEACTIVATING super block flag

Add a new SDF_DEACTIVATING super block flag that is set when the
filesystem has started to deactivate. This will be used in the next
patch to stop and drain the delete work during unmount.
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent fd5f446f
...@@ -606,6 +606,7 @@ enum { ...@@ -606,6 +606,7 @@ enum {
SDF_REMOTE_WITHDRAW = 13, /* Performing remote recovery */ SDF_REMOTE_WITHDRAW = 13, /* Performing remote recovery */
SDF_WITHDRAW_RECOVERY = 14, /* Wait for journal recovery when we are SDF_WITHDRAW_RECOVERY = 14, /* Wait for journal recovery when we are
withdrawing */ withdrawing */
SDF_DEACTIVATING = 15,
}; };
enum gfs2_freeze_state { enum gfs2_freeze_state {
......
...@@ -1743,6 +1743,7 @@ static void gfs2_kill_sb(struct super_block *sb) ...@@ -1743,6 +1743,7 @@ static void gfs2_kill_sb(struct super_block *sb)
sdp->sd_root_dir = NULL; sdp->sd_root_dir = NULL;
sdp->sd_master_dir = NULL; sdp->sd_master_dir = NULL;
shrink_dcache_sb(sb); shrink_dcache_sb(sb);
set_bit(SDF_DEACTIVATING, &sdp->sd_flags);
kill_block_super(sb); kill_block_super(sb);
} }
......
...@@ -87,6 +87,7 @@ static ssize_t status_show(struct gfs2_sbd *sdp, char *buf) ...@@ -87,6 +87,7 @@ static ssize_t status_show(struct gfs2_sbd *sdp, char *buf)
"Withdraw In Prog: %d\n" "Withdraw In Prog: %d\n"
"Remote Withdraw: %d\n" "Remote Withdraw: %d\n"
"Withdraw Recovery: %d\n" "Withdraw Recovery: %d\n"
"Deactivating: %d\n"
"sd_log_error: %d\n" "sd_log_error: %d\n"
"sd_log_flush_lock: %d\n" "sd_log_flush_lock: %d\n"
"sd_log_num_revoke: %u\n" "sd_log_num_revoke: %u\n"
...@@ -115,6 +116,7 @@ static ssize_t status_show(struct gfs2_sbd *sdp, char *buf) ...@@ -115,6 +116,7 @@ static ssize_t status_show(struct gfs2_sbd *sdp, char *buf)
test_bit(SDF_WITHDRAW_IN_PROG, &f), test_bit(SDF_WITHDRAW_IN_PROG, &f),
test_bit(SDF_REMOTE_WITHDRAW, &f), test_bit(SDF_REMOTE_WITHDRAW, &f),
test_bit(SDF_WITHDRAW_RECOVERY, &f), test_bit(SDF_WITHDRAW_RECOVERY, &f),
test_bit(SDF_DEACTIVATING, &f),
sdp->sd_log_error, sdp->sd_log_error,
rwsem_is_locked(&sdp->sd_log_flush_lock), rwsem_is_locked(&sdp->sd_log_flush_lock),
sdp->sd_log_num_revoke, sdp->sd_log_num_revoke,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment