Skip to contentSkip to conversation

gfs2: Add some flags missing from glock output

PATCH New Bob Peterson 1 participant 1 message Jun 9, 2020 1 message not in the archive GFS2 file system

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 gfs2: Add some flags missing from glock output

In reply to a message not in the archive

Hi,

Before this patch, three flags were not represented in the glock output. This patch adds them in:

c - GLF_INODE_CREATING
P - GLF_PENDING_DELETE
x - GLF_FREEING (both f and F are already used)

---
 fs/gfs2/glock.c | 6 ++++++
 1 file changed, 6 insertions(+)
fs/gfs2/glock.c +6 -0
index 2299dcc417ea..d77985ef5be0 100644
@@ -2103,6 +2103,12 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
 		*p++ = 'o';
 	if (test_bit(GLF_BLOCKING, gflags))
 		*p++ = 'b';
+	if (test_bit(GLF_INODE_CREATING, gflags))
+		*p++ = 'c';
+	if (test_bit(GLF_PENDING_DELETE, gflags))
+		*p++ = 'P';
+	if (test_bit(GLF_FREEING, gflags))
+		*p++ = 'x';
 	*p = 0;
 	return buf;
 }