Re: [PATCH 1/2] common: check if the scratch device can support 1024 block sizes

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



On Mon, Oct 23, 2023 at 08:45:13AM -0700, Darrick J. Wong wrote:
> > +	if [ $blocksize -lt $(blockdev --getss $SCRATCH_DEV) ]; then
> > +		_require_scratch_support_blocksize "$blocksize"
> > +	fi
> 
> This duplicates the logic in _require_scratch_support_blocksize, so I
> think you can drop it.

Yes, oops.  I'll drop the if statement.

> > +_require_scratch_support_blocksize()
> > +{
> > +	local blocksize=$1
> > +
> > +	if [ $blocksize -lt $(blockdev --getss $SCRATCH_DEV) ]; then
> > +		_notrun "$SCRATCH_DEV does not support a block size of $blocksize."
> 
> "block" is a bit vague in this context -- you mean the LBA size, not the
> internal physical block size, right?
> 
> May I suggest "...does not support an LBA size of $blocksize." ?

How about "does not support a file system block size of $blocksize"?
LBA size refers to the granularity of "logical block address" for a
particular block device, which would be confusing and not quite right
here.

						- Ted



[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