Re: [PATCH v2] common/rc: don't clear superblock for zoned scratch pools

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



On 27.02.23 10:22, David Disseldorp wrote:
>> -		# to help better debug when something fails, we remove
>> -		# traces of previous btrfs FS on the dev.
>> -		dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
>> +		# To help better debug when something fails, we remove
>> +		# traces of previous btrfs FS on the dev. For zoned devices we
>> +		# can't use dd as it'll lead to unaligned writes so simply
>> +		# reset the first two zones.
>> +		if [ "`_zone_type "$i"`" = "none" ]; then
>> +			dd if=/dev/zero of=$i bs=4096 count=100 > /dev/null 2>&1
>> +		else
>> +			blkzone reset -c 2 $i
>> +		fi
> 
> IIUC, any output from blkzone reset will cause test failures - is that
> an intention here, or should output go to /dev/null like dd?
> 
> Looks fine otherwise.

If all is well, blkzone reset won't have any output. So I guess we're fine.

Thanks :)




[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