summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2018-04-11 20:50:14 -0400
committerJens Axboe <axboe@kernel.dk>2018-04-16 21:49:35 -0600
commit5a13388d7aa1177b98d7168330ecbeeac52f844d (patch)
tree904df7828bd422cd725e53379d8ac96dbc01f19d /block/blk-mq.c
parent8a500df63d07d8aee44b7ee2c54e462e47ce93ec (diff)
downloadlinux-5a13388d7aa1177b98d7168330ecbeeac52f844d.tar.gz
linux-5a13388d7aa1177b98d7168330ecbeeac52f844d.tar.bz2
linux-5a13388d7aa1177b98d7168330ecbeeac52f844d.zip
block/swim: Fix IO error at end of medium
Reading to the end of a 720K disk results in an IO error instead of EOF because the block layer thinks the disk has 2880 sectors. (Partly this is a result of inverted logic of the ONEMEG_MEDIA bit that's now fixed.) Initialize the density and head count in swim_add_floppy() to agree with the device size passed to set_capacity() during drive probe. Call set_capacity() again upon device open, after refreshing the density and head count values. Cc: Laurent Vivier <lvivier@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
0 files changed, 0 insertions, 0 deletions