[Drbd-dev] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios
snitzer at redhat.com
Sat Aug 1 18:33:57 CEST 2015
On Sat, Aug 01 2015 at 2:58am -0400,
Ming Lin <mlin at kernel.org> wrote:
> On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote:
> > OK, once setup, to run the 2 tests in question directly you'd do
> > something like:
> > dmtest run --suite thin-provisioning -n discard_a_fragmented_device
> > dmtest run --suite thin-provisioning -n discard_fully_provisioned_device_benchmark
> > Again, these tests pass without this patchset.
> It's caused by patch 4.
> When discard size >=4G, the bio->bi_iter.bi_size overflows.
Thanks for tracking this down!
> Below is the new patch.
> Could you also help to review it?
> Now we still do "misaligned" check in blkdev_issue_discard().
> So the same code in blk_bio_discard_split() was removed.
But I don't agree with this approach. One of the most meaningful
benefits of late bio splitting is the upper layers shouldn't _need_ to
depend on the intermediate devices' queue_limits being stacked properly.
Your solution to mix discard granularity/alignment checks at the upper
layer(s) but then split based on max_discard_sectors at the lower layer
defeats that benefit for discards.
This will translate to all intermediate layers that might split
discards needing to worry about granularity/alignment
too (e.g. how dm-thinp will have to care because it must generate
discard mappings with associated bios based on how blocks were mapped to
Also, it is unfortunate that IO that doesn't have a payload is being
artificially split simply because bio->bi_iter.bi_size is 32bits.
More information about the drbd-dev