Skip to contentSkip to conversation

io: print more realtime subvolume related information in statfs

PATCH Superseded Christoph Hellwig 3 participants 3 messages Mar 11

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io: print more realtime subvolume related information in statfs

The statfs call report information from the fs geometry structure. Add the fields added for realtime group and zoned device support to this output.

---
 io/stat.c | 6 ++++++
 1 file changed, 6 insertions(+)
io/stat.c +6 -0
index c1085f14eade..e3b3574e0416 100644
@@ -282,6 +282,12 @@ statfs_f(
 			printf(_("geom.rtextsize = %u\n"), fsgeo.rtextsize);
 			printf(_("geom.sunit = %u\n"), fsgeo.sunit);
 			printf(_("geom.swidth = %u\n"), fsgeo.swidth);
+			printf(_("geom.rgextents = %u\n"), fsgeo.rgextents);
+			printf(_("geom.rgcount = %u\n"), fsgeo.rgcount);
+			printf(_("geom.rtstart = %llu\n"),
+				(unsigned long long)fsgeo.rtstart);
+			printf(_("geom.rtreserved = %llu\n"),
+				(unsigned long long)fsgeo.rtreserved);
 		}
 	}
 
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Christoph Hellwig

The statfs call report information from the fs geometry structure. Add the fields added for realtime group and zoned device support to this output.

---
 io/stat.c | 6 ++++++
 1 file changed, 6 insertions(+)
io/stat.c +6 -0
index c1085f14eade..e3b3574e0416 100644
@@ -282,6 +282,12 @@ statfs_f(
 			printf(_("geom.rtextsize = %u\n"), fsgeo.rtextsize);
 			printf(_("geom.sunit = %u\n"), fsgeo.sunit);
 			printf(_("geom.swidth = %u\n"), fsgeo.swidth);
+			printf(_("geom.rgextents = %u\n"), fsgeo.rgextents);
+			printf(_("geom.rgcount = %u\n"), fsgeo.rgcount);
+			printf(_("geom.rtstart = %llu\n"),
+				(unsigned long long)fsgeo.rtstart);
+			printf(_("geom.rtreserved = %llu\n"),
+				(unsigned long long)fsgeo.rtreserved);
 		}
 	}
 
Signature · 1 line
2.47.3

Looks good.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Christoph Hellwig
Quoted 5 lines · Christoph Hellwig

The statfs call report information from the fs geometry structure. Add the fields added for realtime group and zoned device support to this output.

Sounds like a good idea! Sorry I didn't think to add rgextents/count when I added metadir.

--D

Quoted 25 lines
---
 io/stat.c | 6 ++++++
 1 file changed, 6 insertions(+)
io/stat.c +6 -0
index c1085f14eade..e3b3574e0416 100644
@@ -282,6 +282,12 @@ statfs_f(
 			printf(_("geom.rtextsize = %u\n"), fsgeo.rtextsize);
 			printf(_("geom.sunit = %u\n"), fsgeo.sunit);
 			printf(_("geom.swidth = %u\n"), fsgeo.swidth);
+			printf(_("geom.rgextents = %u\n"), fsgeo.rgextents);
+			printf(_("geom.rgcount = %u\n"), fsgeo.rgcount);
+			printf(_("geom.rtstart = %llu\n"),
+				(unsigned long long)fsgeo.rtstart);
+			printf(_("geom.rtreserved = %llu\n"),
+				(unsigned long long)fsgeo.rtreserved);
 		}
 	}
 
Signature · 1 line
2.47.3