On Fri, Feb 19, 2021 at 07:11:49PM +0100, David Sterba wrote:
> On Fri, Feb 19, 2021 at 05:18:18PM +0000, Sidong Yang wrote:
> > This patch make output of filesystem-resize command more readable and
> > give detail information for users. This patch provides more information
> > about filesystem like below.
> > 
> > Before:
> > Resize '/mnt' of '1:-1G'
> > 
> > After:
> > Resize device id 1 (/dev/vdb) from 4.00GiB to 3.00GiB
> > 
> > Signed-off-by: Sidong Yang <[email protected]>
> 
> Code-wise it looks good, but I tried a simple test and it does not work:

Thanks, It should be fixed to make devid having default value 1 that
also kernel code does it. and initialize sizestr with amount_dup because
if there is no devid, sizestr will be NULL and command failed.

I'll write patch v4.

Thanks,
Sidong

> 
> # truncate -s 4g image
> # mkfs.btrfs image
> # mount -o loop image mnt
> # btrfs fi resize -1G mnt
> ERROR: cannot find devid: 0
> 
> while running the same command with the installed system 'btrfs' resizes
> the fs: "Resize '.' of '-1G'".

Reply via email to