Re: [PATCH] block: introduce BLKDEV_DISCARD_ZERO to fix zeroout

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

 



>>>>> "Christoph" == Christoph Hellwig <hch@xxxxxx> writes:

Christoph,

Christoph> Unlike discard outside the zeroout path, write same is a data
Christoph> integrity operation.  Just like in the zero out case turning
Christoph> an EOPNOTSUPP into 0 will get you data corruption, as the
Christoph> caller will see a successful return for an operation that did
Christoph> not actually write data to disk.

Exactly. So why add the dreaded -EOPNOTSUPP special casing to
blkdev_issue_write_same()?

Christoph> Re stacking drivers and discard / write same: why does
Christoph> blk_set_stacking_limits set discard_zeroes_data to 1 and
Christoph> max_write_same_sectors to UINT_MAX?  These seem like
Christoph> inherently dangerous defaults.

It's just shorthand for "stacking driver does not impose any limits, use
whatever the low-level device sets".

If the stacking driver has an actual constraint it is free to set a
different limit prior to calling the stacking function.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux