diff options
author | Christoph Hellwig <hch@lst.de> | 2023-10-03 17:31:06 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-10-04 02:27:44 +0200 |
commit | 07a1141ff170ff5d4f9c4fbb0453727ab48096e5 (patch) | |
tree | 53589a5bc299b8913029579b1ff98054f47a57cf /drivers/spi/spi-mt65xx.c | |
parent | Merge tag 'md-fixes-20231003' of https://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-07a1141ff170ff5d4f9c4fbb0453727ab48096e5.tar.xz linux-07a1141ff170ff5d4f9c4fbb0453727ab48096e5.zip |
nbd: don't call blk_mark_disk_dead nbd_clear_sock_ioctl
blk_mark_disk_dead is the proper interface to shut down a block
device, but it also makes the disk unusable forever.
nbd_clear_sock_ioctl on the other hand wants to shut down the file
system, but allow the block device to be used again when when connected
to another socket. Switch nbd to use disk_force_media_change and
nbd_bdev_reset to go back to a behavior of the old __invalidate_device
call, with the added benefit of incrementing the device generation
as there is no guarantee the old content comes back when the device
is reconnected.
Reported-by: Samuel Holland <samuel.holland@sifive.com>
Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fixes: 0c1c9a27ce90 ("nbd: call blk_mark_disk_dead in nbd_clear_sock_ioctl")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tested-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20231003153106.1331363-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/spi/spi-mt65xx.c')
0 files changed, 0 insertions, 0 deletions