* [PATCH 2/4] xfsprogs: Addition in debug option -d of xfs_spaceman
@ 2015-01-28 14:33 Dhruvesh Rathore
0 siblings, 0 replies; 4+ messages in thread
From: Dhruvesh Rathore @ 2015-01-28 14:33 UTC (permalink / raw)
To: xfs
The xfs_spaceman utility did not have a a proper title to the content
displayed using -d (debug) option.
Old output (Before changes).
$ sudo xfs_spaceman -c "freesp -d" /media/xfs
0 4 1
0 5 1
0 6 1
0 7 1
0 170382 11870
0 213742 1262
0 351845 5126
0 463591 11331
0 495531 12143
0 553400 414028
1 4 1
1 5 1
1 6 1
1 7 1
1 8 967420
2 2564 1
2 2565 1
2 2566 1
2 2567 1
2 2568 453578
2 456150 43989
2 500140 467288
3 4 1
3 5 1
3 6 1
3 7 1
3 8 967420
from to extents blocks pct
1 1 16 16 0.00
1024 2047 1 1262 0.04
4096 8191 1 5126 0.15
8192 16383 3 35344 1.05
32768 65535 1 43989 1.31
262144 524287 3 1334894 39.78
524288 967428 2 1934840 57.66
This patch adds a suitable title header to the output, making it much
more redable to the user.
New output (After implementing this patch).
$ uname -a
Linux dhruv-MacBookAir 3.18.0-rc7+ #3 SMP Thu Dec 25 15:29:59 IST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ sudo xfs_spaceman -V
xfs_spaceman version 3.2.2
$ sudo xfs_spaceman -c "freesp -d" /media/xfs
agno agbno len
0 4 1
0 5 1
0 6 1
0 7 1
0 170382 11870
0 213742 1262
0 351845 5126
0 463591 11331
0 495531 12143
0 553400 414028
1 4 1
1 5 1
1 6 1
1 7 1
1 8 967420
2 2564 1
2 2565 1
2 2566 1
2 2567 1
2 2568 453578
2 456150 43989
2 500140 467288
3 4 1
3 5 1
3 6 1
3 7 1
3 8 967420
from to extents blocks pct
1 1 16 16 0.00
1024 2047 1 1262 0.04
4096 8191 1 5126 0.15
8192 16383 3 35344 1.05
32768 65535 1 43989 1.31
262144 524287 3 1334894 39.78
524288 967428 2 1934840 57.66
-------------------------------------------------------------------------------------------
Signed-off-by: Dhruvesh Rathore <dhruvesh_r@outlook.com>
Signed-off-by: Amey Ruikar <ameyruikar@yahoo.com>
Signed-off-by: Somdeep Dey <somdeepdey10@gmail.com>
---
spaceman/freesp.c | 3 +++
1 file changed, 3 insertions(+)
--- a/spaceman/freesp.c 2015-01-28 19:17:43.471341809 +0530
+++ b/spaceman/freesp.c 2015-01-28 19:17:11.279343228 +0530
@@ -332,20 +332,23 @@
static int
freesp_f(
int argc,
char **argv)
{
xfs_agnumber_t agno;
if (!init(argc, argv))
return 0;
+ if (dumpflag)
+ printf("%8s %8s %8s\n", "agno", "agbno", "len");
+
for (agno = 0; agno < file->geom.agcount; agno++) {
if (inaglist(agno))
scan_ag(agno);
}
if (histcount)
printhist();
if (summaryflag) {
printf(_("total free extents %lld\n"), totexts);
printf(_("total free blocks %lld\n"), totblocks);
printf(_("average free extent size %g\n"),
-------------------------------------------------------------------------------------------
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/4] xfsprogs: Addition in debug option -d of xfs_spaceman
@ 2015-01-29 13:25 Dhruvesh Rathore
2015-02-10 22:14 ` Dave Chinner
0 siblings, 1 reply; 4+ messages in thread
From: Dhruvesh Rathore @ 2015-01-29 13:25 UTC (permalink / raw)
To: xfs
The xfs_spaceman utility did not have a a proper title to the content
displayed using -d (debug) option.
Old output (Before changes).
$ sudo xfs_spaceman -c "freesp -d" /media/xfs
0 4 1
0 5 1
0 6 1
0 7 1
0 170382 11870
0 213742 1262
0 351845 5126
0 463591 11331
0 495531 12143
0 553400 414028
1 4 1
1 5 1
1 6 1
1 7 1
1 8 967420
2 2564 1
2 2565 1
2 2566 1
2 2567 1
2 2568 453578
2 456150 43989
2 500140 467288
3 4 1
3 5 1
3 6 1
3 7 1
3 8 967420
from to extents blocks pct
1 1 16 16 0.00
1024 2047 1 1262 0.04
4096 8191 1 5126 0.15
8192 16383 3 35344 1.05
32768 65535 1 43989 1.31
262144 524287 3 1334894 39.78
524288 967428 2 1934840 57.66
This patch adds a suitable title header to the output, making it much
more readable to the user.
New output (After implementing this patch).
$ uname -a
Linux dhruv-MacBookAir 3.18.0-rc7+ #3 SMP Thu Dec 25 15:29:59 IST 2014 x86_64 x86_64 x86_64 GNU/Linux
$ sudo xfs_spaceman -V
xfs_spaceman version 3.2.2
$ sudo xfs_spaceman -c "freesp -d" /media/xfs
agno agbno len
0 4 1
0 5 1
0 6 1
0 7 1
0 170382 11870
0 213742 1262
0 351845 5126
0 463591 11331
0 495531 12143
0 553400 414028
1 4 1
1 5 1
1 6 1
1 7 1
1 8 967420
2 2564 1
2 2565 1
2 2566 1
2 2567 1
2 2568 453578
2 456150 43989
2 500140 467288
3 4 1
3 5 1
3 6 1
3 7 1
3 8 967420
from to extents blocks pct
1 1 16 16 0.00
1024 2047 1 1262 0.04
4096 8191 1 5126 0.15
8192 16383 3 35344 1.05
32768 65535 1 43989 1.31
262144 524287 3 1334894 39.78
524288 967428 2 1934840 57.66
-------------------------------------------------------------------------------------------
Signed-off-by: Dhruvesh Rathore <dhruvesh_r@outlook.com>
Signed-off-by: Amey Ruikar <ameyruikar@yahoo.com>
Signed-off-by: Somdeep Dey <somdeepdey10@gmail.com>
---
spaceman/freesp.c | 3 +++
1 file changed, 3 insertions(+)
--- a/spaceman/freesp.c 2015-01-28 19:17:43.471341809 +0530
+++ b/spaceman/freesp.c 2015-01-28 19:17:11.279343228 +0530
@@ -332,20 +332,23 @@
static int
freesp_f(
int argc,
char **argv)
{
xfs_agnumber_t agno;
if (!init(argc, argv))
return 0;
+ if (dumpflag)
+ printf("%8s %8s %8s\n", "agno", "agbno", "len");
+
for (agno = 0; agno < file->geom.agcount; agno++) {
if (inaglist(agno))
scan_ag(agno);
}
if (histcount)
printhist();
if (summaryflag) {
printf(_("total free extents %lld\n"), totexts);
printf(_("total free blocks %lld\n"), totblocks);
printf(_("average free extent size %g\n"),
-------------------------------------------------------------------------------------------
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] xfsprogs: Addition in debug option -d of xfs_spaceman
2015-01-29 13:25 Dhruvesh Rathore
@ 2015-02-10 22:14 ` Dave Chinner
2015-02-11 16:17 ` Dhruvesh Rathore
0 siblings, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2015-02-10 22:14 UTC (permalink / raw)
To: Dhruvesh Rathore; +Cc: xfs
On Thu, Jan 29, 2015 at 06:55:21PM +0530, Dhruvesh Rathore wrote:
>
> The xfs_spaceman utility did not have a a proper title to the content
> displayed using -d (debug) option.
.....
>
> @@ -332,20 +332,23 @@
> static int
> freesp_f(
> int argc,
> char **argv)
> {
> xfs_agnumber_t agno;
>
> if (!init(argc, argv))
> return 0;
>
> + if (dumpflag)
> + printf("%8s %8s %8s\n", "agno", "agbno", "len");
> +
> for (agno = 0; agno < file->geom.agcount; agno++) {
> if (inaglist(agno))
> scan_ag(agno);
> }
> if (histcount)
> printhist();
Patch does not apply to the current tree. It's got stray whitespace
and lines in it that are in the original source file.
I've fixed this up for the moment, but please make sure your
patches apply to a clean tree.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] xfsprogs: Addition in debug option -d of xfs_spaceman
2015-02-10 22:14 ` Dave Chinner
@ 2015-02-11 16:17 ` Dhruvesh Rathore
0 siblings, 0 replies; 4+ messages in thread
From: Dhruvesh Rathore @ 2015-02-11 16:17 UTC (permalink / raw)
To: xfs
On Wed, Feb 11, 2015 at 3:44 AM, Dave Chinner <david@fromorbit.com> wrote:
> On Thu, Jan 29, 2015 at 06:55:21PM +0530, Dhruvesh Rathore wrote:
>>
>> The xfs_spaceman utility did not have a a proper title to the content
>> displayed using -d (debug) option.
> .....
>>
>> @@ -332,20 +332,23 @@
>> static int
>> freesp_f(
>> int argc,
>> char **argv)
>> {
>> xfs_agnumber_t agno;
>>
>> if (!init(argc, argv))
>> return 0;
>>
>> + if (dumpflag)
>> + printf("%8s %8s %8s\n", "agno", "agbno", "len");
>> +
>> for (agno = 0; agno < file->geom.agcount; agno++) {
>> if (inaglist(agno))
>> scan_ag(agno);
>> }
>> if (histcount)
>> printhist();
>
> Patch does not apply to the current tree. It's got stray whitespace
> and lines in it that are in the original source file.
>
> I've fixed this up for the moment, but please make sure your
> patches apply to a clean tree.
>
We apologize for the constant stray white space errors and will
make sure to make clean patches from now on.
Thank you for reworking and applying the patch to the current tree :)
Regards,
A-DRS
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-11 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-28 14:33 [PATCH 2/4] xfsprogs: Addition in debug option -d of xfs_spaceman Dhruvesh Rathore
-- strict thread matches above, loose matches on Subject: below --
2015-01-29 13:25 Dhruvesh Rathore
2015-02-10 22:14 ` Dave Chinner
2015-02-11 16:17 ` Dhruvesh Rathore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox