Re: block: Fix a WRITE SAME BUG_ON

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

 



On 2/1/19 3:09 PM, John Dorminy wrote:
I didn't know such a thing existed... does it work on any block
device? Where do I read more about this?


Use sg_write_same(8) from package sg3_utils.

For instance 'sg_write_same --in=foobarfile --lba=0 --num=20000 --xferlen=512 /dev/sdwhatever'

will read the pattern to write same from file 'foobarfile' with length explicitely set to 512 bytes (rather than derived from foobarfile's size) and write it 20000 times starting at LBA 0 to /dev/sdwhatever.

--lba=

On Fri, Feb 1, 2019 at 2:35 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
On Thu, Jan 31, 2019 at 02:41:52PM -0500, John Dorminy wrote:
On Wed, Jan 30, 2019 at 09:08:50AM -0500, John Dorminy wrote:
(I use WRITE_SAME to fill devices with a particular pattern in order
to catch failures to initialize disk structures appropriately,
personally, but it's just for convenience/speed.)
How do you use it?  We don't have a user interface to generate
REQ_OP_WRITE_SAME requests.
A not-checked-in test module, similar to Zhang Xiaoxu's reproducer,
exposing a sysfs node to trigger filling a block device with a test
pattern.
Any reason you don't just use SCSI/NVMe passthrough directly from
userspace for that?
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux