* lvresize.c: use kilobytes when passing sizes to fsadm
@ 2009-01-14 17:26 Bryn M. Reeves
2009-01-15 13:22 ` Milan Broz
0 siblings, 1 reply; 3+ messages in thread
From: Bryn M. Reeves @ 2009-01-14 17:26 UTC (permalink / raw)
To: lvm-devel
Hi all,
The code in lvresize.c computes a new file system size to pass to
fsadm when resizing as (extents * extent_size), giving a result in
kilobytes.
This is then passed on to fsadm without a suffix, meaning that fsadm
interprets it as a count of the number of file system blocks instead.
This breaks fsadm for all file system block sizes other than 1K.
The attached patch adds a "K" suffix and fixes the problem for me - see:
https://bugzilla.redhat.com/show_bug.cgi?id=480022
For testing details.
Regards,
Bryn.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lvm2-lvresize-units.patch
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20090114/26d3d877/attachment.ksh>
^ permalink raw reply [flat|nested] 3+ messages in thread
* lvresize.c: use kilobytes when passing sizes to fsadm
2009-01-14 17:26 lvresize.c: use kilobytes when passing sizes to fsadm Bryn M. Reeves
@ 2009-01-15 13:22 ` Milan Broz
2009-01-15 13:39 ` Bryn M. Reeves
0 siblings, 1 reply; 3+ messages in thread
From: Milan Broz @ 2009-01-15 13:22 UTC (permalink / raw)
To: lvm-devel
Bryn M. Reeves wrote:
> The code in lvresize.c computes a new file system size to pass to
> fsadm when resizing as (extents * extent_size), giving a result in
> kilobytes.
>
> This is then passed on to fsadm without a suffix, meaning that fsadm
> interprets it as a count of the number of file system blocks instead.
>
> This breaks fsadm for all file system block sizes other than 1K.
>
> The attached patch adds a "K" suffix and fixes the problem for me - see:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=480022
Reviewed-by: Milan Broz <mbroz@redhat.com>
Tested-by: Milan Broz <mbroz@redhat.com>
(btw lvresize -r still works but is is not mentioned in man page, it is
intentional to prefer using fsadm --lvresize now?)
Milan
p.s.
Jaroslav, please can you add some tests internally for fsadm/lvresize?
(test in bugzilla, just extend/reduce for 1024,2048,4096 fs blocksize,
mke2fs -b <bs> is enough (or maybe xfs, reiserfs tests too))
^ permalink raw reply [flat|nested] 3+ messages in thread
* lvresize.c: use kilobytes when passing sizes to fsadm
2009-01-15 13:22 ` Milan Broz
@ 2009-01-15 13:39 ` Bryn M. Reeves
0 siblings, 0 replies; 3+ messages in thread
From: Bryn M. Reeves @ 2009-01-15 13:39 UTC (permalink / raw)
To: lvm-devel
Milan Broz wrote:
> Bryn M. Reeves wrote:
>> The code in lvresize.c computes a new file system size to pass to
>> fsadm when resizing as (extents * extent_size), giving a result in
>> kilobytes.
>>
>> This is then passed on to fsadm without a suffix, meaning that fsadm
>> interprets it as a count of the number of file system blocks instead.
>>
>> This breaks fsadm for all file system block sizes other than 1K.
>>
>> The attached patch adds a "K" suffix and fixes the problem for me - see:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=480022
>
> Reviewed-by: Milan Broz <mbroz@redhat.com>
> Tested-by: Milan Broz <mbroz@redhat.com>
>
Thanks Milan!
>
> p.s.
> Jaroslav, please can you add some tests internally for fsadm/lvresize?
> (test in bugzilla, just extend/reduce for 1024,2048,4096 fs blocksize,
> mke2fs -b <bs> is enough (or maybe xfs, reiserfs tests too))
Sorry, I meant to take a look at the test suite yesterday to see if I
could figure out adding tests for this but ran out of time.
Cheers,
Bryn.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-15 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 17:26 lvresize.c: use kilobytes when passing sizes to fsadm Bryn M. Reeves
2009-01-15 13:22 ` Milan Broz
2009-01-15 13:39 ` Bryn M. Reeves
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.