xfs
[Top] [All Lists]

[PATCH, RFC] put xfs build features into the stats file

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH, RFC] put xfs build features into the stats file
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sun, 19 Apr 2009 21:34:24 -0500
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
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@xxxxxxxxxxx>
---

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;

<Prev in Thread] Current Thread [Next in Thread>