Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536150
| From | Jens Axboe <axboe@kernel.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] block: fix unintended fallthrough in generic_make_request_checks() |
| Date | 2016-12-05 16:00 +0100 |
| Message-ID | <sL2Uh-5Q1-15@gated-at.bofh.it> (permalink) |
| References | <sKFuF-7V2-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 12/04/2016 06:56 AM, Nicolai Stange wrote:
> Since commit e73c23ff736e ("block: add async variant of
> blkdev_issue_zeroout") messages like the following show up:
>
> EXT4-fs (dm-1): Delayed block allocation failed for inode 2368848 at
> logical offset 0 with max blocks 1 with error 95
> EXT4-fs (dm-1): This should not happen!! Data will be lost
>
> Due to the following fallthrough introduced with
> commit 2d253440b5af ("block: Define zoned block device operations"),
> generic_make_request_checks() would accept a REQ_OP_WRITE_SAME bio only
> if the block device supports "write same" *and* is a zoned one:
>
> switch (bio_op(bio)) {
> [...]
> case REQ_OP_WRITE_SAME:
> if (!bdev_write_same(bio->bi_bdev))
> goto not_supported;
> case REQ_OP_ZONE_REPORT:
> case REQ_OP_ZONE_RESET:
> if (!bdev_is_zoned(bio->bi_bdev))
> goto not_supported;
> break;
> [...]
> }
>
> Thus, although the bio setup as done by __blkdev_issue_write_same() from
> commit e73c23ff736e ("block: add async variant of blkdev_issue_zeroout")
> would succeed, its actual submission would not, resulting in the
> EOPNOTSUPP == 95.
>
> Fix this by removing the fallthrough which, due to the lack of an explicit
> comment, seems to be unintended anyway.
>
> Fixes: e73c23ff736e ("block: add async variant of blkdev_issue_zeroout")
> Fixes: 2d253440b5af ("block: Define zoned block device operations")
> Signed-off-by: Nicolai Stange <nicstange@gmail.com>
Added, thanks.
--
Jens Axboe
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] block: fix unintended fallthrough in generic_make_request_checks() Nicolai Stange <nicstange@gmail.com> - 2016-12-04 15:00 +0100 Re: [PATCH] block: fix unintended fallthrough in generic_make_request_checks() Christoph Hellwig <hch@infradead.org> - 2016-12-05 13:40 +0100 Re: [PATCH] block: fix unintended fallthrough in generic_make_request_checks() Jens Axboe <axboe@kernel.dk> - 2016-12-05 16:00 +0100 Re: [PATCH] block: fix unintended fallthrough in generic_make_request_checks() Nicolai Stange <nicstange@gmail.com> - 2016-12-06 01:10 +0100
csiph-web