Re: [PATCH v2 0/2] Fix input value to _scratch_mkfs_sized

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Fri, 2022-06-17 at 13:58 +1000, Dave Chinner wrote:
> On Thu, Jun 16, 2022 at 12:38:43PM +0800, An Long wrote:
> > Function _scratch_mkfs_sized cannot recognize the size descriptor.
> > 
> > For example, we set MKFS_OPTIONS="-b 4k" and then run generic/416
> > on
> > ext4, will fail with "mkfs.ext4: invalid block size - 4".
> 
> So isn't the correct fix for this to use the correct format in
> MKFS_OPTIONS? ie. "-b 4096"?
> 
MKFS_OPTIONS="-b 4096" will get the correct result 4096.

> i.e. why do we need ito add code to fix something that the user must
> specify themselves and could easily just use an integer to begin
> with?
> 
This function must input an integer for now. But this function also
overwrites user input with MKFS_OPTIONS for compatibility. And for the
same reason MKFS_OPTIONS needs to receive such parameters as 4k.

> Cheers,
> 
> Dave.





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux