Skip to contentSkip to conversation

GFS2: Delete debugfs files only after we evict the glocks

PATCH New Bob Peterson 2 participants 2 messages Jul 28, 2017 1 message not in the archive GFS2 file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 GFS2: Delete debugfs files only after we evict the glocks

Hi,

This patch moves the call to gfs2_delete_debugfs_file so that it comes after the glock hash table has been cleared. This way we can query the debugfs files if umount hangs.

---

fs/gfs2/ops_fstype.c +0 -1
index e76058d34b74..51752de54f11 100644
@@ -1388,7 +1388,6 @@ static void gfs2_kill_sb(struct super_block *sb)
 	sdp->sd_root_dir = NULL;
 	sdp->sd_master_dir = NULL;
 	shrink_dcache_sb(sb);
-	gfs2_delete_debugfs_file(sdp);
 	free_percpu(sdp->sd_lkstats);
 	kill_block_super(sb);
 }
fs/gfs2/super.c +1 -0
index 87271a859a8d..1918bb5fc943 100644
@@ -924,6 +924,7 @@ static void gfs2_put_super(struct super_block *sb)
 	gfs2_jindex_free(sdp);
 	/*  Take apart glock structures and buffer lists  */
 	gfs2_gl_hash_clear(sdp);
+	gfs2_delete_debugfs_file(sdp);
 	/*  Unmount the locking protocol  */
 	gfs2_lm_unmount(sdp);
 
#2 lore raw

PATCH 1/1 GFS2: Delete debugfs files only after we evict the glocks

Quoted 25 lines · Bob Peterson

Hi,

This patch moves the call to gfs2_delete_debugfs_file so that it comes after the glock hash table has been cleared. This way we can query the debugfs files if umount hangs.

---

fs/gfs2/ops_fstype.c +0 -1
index e76058d34b74..51752de54f11 100644
@@ -1388,7 +1388,6 @@ static void gfs2_kill_sb(struct super_block *sb)
        sdp->sd_root_dir = NULL;
        sdp->sd_master_dir = NULL;
        shrink_dcache_sb(sb);
-       gfs2_delete_debugfs_file(sdp);
        free_percpu(sdp->sd_lkstats);
        kill_block_super(sb);
 }
fs/gfs2/super.c +0 -0
index 87271a859a8d..1918bb5fc943 100644

fs/gfs2/super.c static void gfs2_put_super(struct super_block *sb) · line 929

Quoted 6 lines
fs/gfs2/super.c +1 -0
@@ -924,6 +924,7 @@ static void gfs2_put_super(struct super_block *sb)
        gfs2_jindex_free(sdp);
        /*  Take apart glock structures and buffer lists  */
        gfs2_gl_hash_clear(sdp);
+       gfs2_delete_debugfs_file(sdp);
        /*  Unmount the locking protocol  */
        gfs2_lm_unmount(sdp);

This looks useful and correct.

Thanks,
Andreas