Re: [PATCH v3 1/3] common: add zoned block device checks

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



On Tue, Aug 17, 2021 at 04:59:54PM -0700, Darrick J. Wong wrote:
> On Mon, Aug 16, 2021 at 08:35:08PM +0900, Naohiro Aota wrote:
> > dm-error and dm-snapshot does not have DM_TARGET_ZONED_HM nor
> > DM_TARGET_MIXED_ZONED_MODEL feature and does not implement
> > .report_zones(). So, it cannot pass the zone information from the down
> > layer (zoned device) to the upper layer.
> > 
> > Loop device also cannot pass the zone information.
> > 
> > This patch requires non-zoned block device for the tests using these
> > ones.
> > 
> > Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>
> > ---
> >  common/rc | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/common/rc b/common/rc
> > index 84757fc1755e..e0b6d50854c6 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -1837,6 +1837,9 @@ _require_loop()
> >      else
> >  	_notrun "This test requires loopback device support"
> >      fi
> > +
> > +    # loop device does not handle zone information
> > +    _require_non_zoned_device ${TEST_DEV}
> 
> Is this true of loop devices sitting on top of zoned block devices?

True. For example, with setting up a loop device on a zoned device
(/dev/nullb1).

$ sudo losetup -l            
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE   DIO LOG-SEC
/dev/loop0         0      0         0  0 /dev/nullb1   0     512

We see "nulb1" as a zoned devcie (host-managed), but loop0 as a
non-zoned device.

$ lsblk -z /dev/loop0 /dev/nullb1
NAME   ZONED
loop0  none
nullb1 host-managed

> If so, then the rest looks good to me.
> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Thanks.

> --D
> 
> >  }
> >  
> >  # this test requires kernel support for a secondary filesystem
> > @@ -1966,6 +1969,16 @@ _require_dm_target()
> >  	if [ $? -ne 0 ]; then
> >  		_notrun "This test requires dm $target support"
> >  	fi
> > +
> > +	# dm-error cannot handle the zone information
> > +	#
> > +	# dm-snapshot and dm-thin-pool cannot ensure sequential writes on
> > +	# the backing device
> > +	case $target in
> > +	error|snapshot|thin-pool)
> > +		_require_non_zoned_device ${SCRATCH_DEV}
> > +		;;
> > +	esac
> >  }
> >  
> >  _zone_type()
> > -- 
> > 2.32.0
> > 



[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