public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_db: add header to freesp -d output
@ 2013-08-21 22:40 Eric Sandeen
  2013-08-22 14:03 ` Geoffrey Wehrman
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Sandeen @ 2013-08-21 22:40 UTC (permalink / raw)
  To: xfs-oss

Today, xfs_db's freesp -d command dumps out a bunch of numbers:

# xfs_db -c "freesp -d" /dev/sdb1
       0        4        1
       0        5        1
       0        6        1
       0        7        1
       0       12   174772
...

which are not useful to the non-code-reading user.
Add some headers:

# xfs_db -c "freesp -d" /dev/sdb1
    agno    agbno      len
       0        4        1
       0        5        1
       0        6        1
       0        7        1
       0       12   174772
...

so there's at least some context.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

p.s. - If folks want different strings, I'm game.

diff --git a/db/freesp.c b/db/freesp.c
index 6f69eba..361fa96 100644
--- a/db/freesp.c
+++ b/db/freesp.c
@@ -96,6 +96,10 @@ freesp_f(
 
 	if (!init(argc, argv))
 		return 0;
+
+	if (dumpflag)
+		dbprintf("%8s %8s %8s\n", "agno", "agbno", "len");
+
 	for (agno = 0; agno < mp->m_sb.sb_agcount; agno++)  {
 		if (inaglist(agno))
 			scan_ag(agno);

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

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

end of thread, other threads:[~2013-08-27 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21 22:40 [PATCH] xfs_db: add header to freesp -d output Eric Sandeen
2013-08-22 14:03 ` Geoffrey Wehrman
2013-08-22 14:05 ` Mark Tinguely
2013-08-22 15:30   ` Eric Sandeen
2013-08-27 18:56 ` Rich Johnston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox