[PATCH, RFC] put xfs build features into the stats file
Eric Sandeen
sandeen at sandeen.net
Sun Apr 19 21:34:24 CDT 2009
Running xfstests on an xfs build w/o xattrs enabled, I realized
there's no reliable way to see if the running xfs has various
features other than debug (which is shown in /proc/fs/xfs/stat)
What do folks think of adding the BUILD_OPTIONS to this file
as well?
# cat /proc/fs/xfs/stat
extent_alloc 0 0 0 0
...
xpc 0 0 0
debug 0
features security attributes, large block numbers, no debug
Signed-off-by: Eric Sandeen <sandeen at sandeen.net>
---
Index: linux-2.6/fs/xfs/linux-2.6/xfs_stats.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_stats.c
+++ linux-2.6/fs/xfs/linux-2.6/xfs_stats.c
@@ -89,6 +89,8 @@ xfs_read_xfsstats(
0);
#endif
+ len += sprintf(buffer + len, "features " XFS_BUILD_OPTIONS "\n");
+
if (offset >= len) {
*start = buffer;
*eof = 1;
More information about the xfs
mailing list