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

* Re: [PATCH] xfs_db: add header to freesp -d output
  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-27 18:56 ` Rich Johnston
  2 siblings, 0 replies; 5+ messages in thread
From: Geoffrey Wehrman @ 2013-08-22 14:03 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Wed, Aug 21, 2013 at 05:40:47PM -0500, Eric Sandeen wrote:
| 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.

The format is consistent with the "dumpflag" format in addtohist().  I
like your choice of strings, except I suggest "length" in place of
"len".  The space is available.


-- 
Geoffrey Wehrman  651-683-5496  gwehrman@sgi.com

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

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

* Re: [PATCH] xfs_db: add header to freesp -d output
  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
  2 siblings, 1 reply; 5+ messages in thread
From: Mark Tinguely @ 2013-08-22 14:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On 08/21/13 17:40, Eric Sandeen wrote:
> 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.


Seems like just yesterday, some reviewer was concerned about the 
verbosity of table headers... wait it was yesterday! Gawd, I love irony.
:)

Geoffrey comment len -> length is fine too.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>

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

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

* Re: [PATCH] xfs_db: add header to freesp -d output
  2013-08-22 14:05 ` Mark Tinguely
@ 2013-08-22 15:30   ` Eric Sandeen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Sandeen @ 2013-08-22 15:30 UTC (permalink / raw)
  To: Mark Tinguely; +Cc: Eric Sandeen, xfs-oss

On 8/22/13 9:05 AM, Mark Tinguely wrote:
> On 08/21/13 17:40, Eric Sandeen wrote:
>> 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.
> 
> 
> Seems like just yesterday, some reviewer was concerned about the verbosity of table headers... wait it was yesterday! Gawd, I love irony.
> :)

I'd submit that this case is a bit different - there is no context whatsoever to the table of numbers, and there will almost certainly be a very high data::header ratio.  :)

> Geoffrey comment len -> length is fine too.
> 
> Reviewed-by: Mark Tinguely <tinguely@sgi.com>

Thanks for the review,

-Eric

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

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

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

* Re: [PATCH] xfs_db: add header to freesp -d output
  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-27 18:56 ` Rich Johnston
  2 siblings, 0 replies; 5+ messages in thread
From: Rich Johnston @ 2013-08-27 18:56 UTC (permalink / raw)
  Cc: xfs-oss


Thanks Eric, this has been committed.

--Rich

commit 982e5c7e57eaedd81984e3da6cb8ffae726dc704
Author: Eric Sandeen <sandeen@redhat.com>
Date:   Wed Aug 21 22:40:47 2013 +0000

     xfs_db: add header to freesp -d output  		

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

^ permalink raw reply	[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