All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] xfs: new global stats in sysfs
@ 2015-09-03 16:36 billodo
  2015-09-03 16:36 ` [PATCH 1/3] xfs: create global stats and stats_clear " billodo
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: billodo @ 2015-09-03 16:36 UTC (permalink / raw)
  To: xfs


Hi all-
Here is a first pass at a series to add new global stats to sysfs.
As a part of that, the /proc/fs/xfs/stat file becomes a symlink to
the sysfs stats entry. The patch provides the beginnings of the
infrastructure for per-fs stats (in addition to global accumulative
stats).

Patch 1 handles the bring-up and tear down of xfs/stats directory
structure in sysfs when an fs is mounted. The directory contains
the stats file and the stats_clear file. The stats file contents mimic
those of /proc/fs/xfs/stat. The stats_clear file is empty, and much
like the current stat_clear command, handles the zeroing of the stats
file when a "1" is echoed to the stats_clear file.

Patch 2 creates the symlink for stats from procfs to sysfs.

Patch 3 removes the now unused portions of procfs for stat.

Comments and questions are welcome.

Thanks-
Bill

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 0/3 V2] xfs: new global stats in sysfs
@ 2015-09-04 12:55 Bill O'Donnell
  2015-09-04 12:55 ` [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats Bill O'Donnell
  0 siblings, 1 reply; 17+ messages in thread
From: Bill O'Donnell @ 2015-09-04 12:55 UTC (permalink / raw)
  To: xfs


Hi all-

Here is the second pass at a series to add new global stats to sysfs.
As a part of that, the /proc/fs/xfs/stat file becomes a symlink to
the sysfs stats entry. The series provides the beginnings of the
infrastructure for per-fs stats (in addition to global accumulative
stats).

We already have per-fs information in /sys, so it makes sense to
have per-fs stats there too.  As a first step, moving existing
global stats infrastructure to /sys will allow us to re-use that
sysfs code for per-fs stats as well.

Patch 1 handles the bring-up and tear down of xfs/stats directory
structure in sysfs when an fs is mounted. The directory contains
the stats file and the stats_clear file. The stats file contents mimic
those of /proc/fs/xfs/stat. The stats_clear file is empty, and much
like the current stat_clear command, handles the zeroing of the stats
file when a "1" is echoed to the stats_clear file.

Patch 2 creates the symlink for stats from procfs to sysfs.

Patch 3 removes the now unused portions of procfs for stat.

Again, comments and questions are welcome.

Thanks-
Bill

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats
@ 2015-09-04 20:42 Bill O'Donnell
  0 siblings, 0 replies; 17+ messages in thread
From: Bill O'Donnell @ 2015-09-04 20:42 UTC (permalink / raw)
  To: xfs

As a part of the work to move xfs global stats from procfs to sysfs,
this patch creates the symlink from proc/fs/xfs/stat to sys/fs/xfs/stats.

Signed-off-by: Bill O'Donnell <billodo@redhat.com>
---
 fs/xfs/xfs_stats.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c
index 6008e25..a9f05de 100644
--- a/fs/xfs/xfs_stats.c
+++ b/fs/xfs/xfs_stats.c
@@ -244,9 +244,10 @@ xfs_init_procfs(void)
 	if (!proc_mkdir("fs/xfs", NULL))
 		goto out;
 
-	if (!proc_create("fs/xfs/stat", 0, NULL,
-			 &xfs_stat_proc_fops))
+	if (!proc_symlink("fs/xfs/stat", NULL,
+			  "/sys/fs/xfs/stats/stats"))
 		goto out_remove_xfs_dir;
+
 #ifdef CONFIG_XFS_QUOTA
 	if (!proc_create("fs/xfs/xqmstat", 0, NULL,
 			 &xqmstat_proc_fops))
-- 
2.4.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 17+ messages in thread
* [PATCH 0/3 V3] xfs: new global stats in sysfs
@ 2015-09-04 20:54 Bill O'Donnell
  2015-09-04 20:54 ` [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats Bill O'Donnell
  0 siblings, 1 reply; 17+ messages in thread
From: Bill O'Donnell @ 2015-09-04 20:54 UTC (permalink / raw)
  To: xfs


Hi all-

Here is the third pass at a series to add new global stats to sysfs.
(Minor whitespace and braces fixups.)

As a part of that, the /proc/fs/xfs/stat file becomes a symlink to
the sysfs stats entry. The series provides the beginnings of the
infrastructure for per-fs stats (in addition to global accumulative
stats).

We already have per-fs information in /sys, so it makes sense to
have per-fs stats there too.  As a first step, moving existing
global stats infrastructure to /sys will allow us to re-use that
sysfs code for per-fs stats as well.

Patch 1 handles the bring-up and tear down of xfs/stats directory
structure in sysfs when an fs is mounted. The directory contains
the stats file and the stats_clear file. The stats file contents mimic
those of /proc/fs/xfs/stat. The stats_clear file is empty, and much
like the current stat_clear command, handles the zeroing of the stats
file when a "1" is echoed to the stats_clear file.

Patch 2 creates the symlink for stats from procfs to sysfs.

Patch 3 removes the now unused portions of procfs for stat.

Once again, comments and questions are welcome.

Thanks-
Bill

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-09-04 20:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-03 16:36 [PATCH 0/3] xfs: new global stats in sysfs billodo
2015-09-03 16:36 ` [PATCH 1/3] xfs: create global stats and stats_clear " billodo
2015-09-03 19:56   ` Eric Sandeen
2015-09-03 20:11   ` Eric Sandeen
2015-09-03 16:36 ` [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats billodo
2015-09-03 17:57   ` Darrick J. Wong
2015-09-03 18:32     ` Eric Sandeen
2015-09-03 18:39       ` Bill O'Donnell
2015-09-03 19:15         ` Bill O'Donnell
2015-09-03 19:17           ` Darrick J. Wong
2015-09-03 20:08   ` Eric Sandeen
2015-09-03 16:36 ` [PATCH 3/3] xfs: remove unused procfs code billodo
2015-09-03 20:33 ` [PATCH 0/3] xfs: new global stats in sysfs Eric Sandeen
2015-09-04 12:55 [PATCH 0/3 V2] " Bill O'Donnell
2015-09-04 12:55 ` [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats Bill O'Donnell
2015-09-04 18:32   ` Eric Sandeen
2015-09-04 20:42 Bill O'Donnell
2015-09-04 20:54 [PATCH 0/3 V3] xfs: new global stats in sysfs Bill O'Donnell
2015-09-04 20:54 ` [PATCH 2/3] xfs: create symlink proc/fs/xfs/stat to sys/fs/xfs/stats Bill O'Donnell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.