Re: [PATCH 07/17] nbd: call blk_mark_disk_dead in nbd_clear_sock_ioctl
From: Christoph Hellwig <hch@lst.de>
Date: 2023-10-02 06:22:08
Also in:
linux-btrfs, linux-fsdevel, linux-s390
From: Christoph Hellwig <hch@lst.de>
Date: 2023-10-02 06:22:08
Also in:
linux-btrfs, linux-fsdevel, linux-s390
On Sun, Oct 01, 2023 at 07:10:53PM +0200, Wouter Verhelst wrote:
quoted
So what are the semantics of clearing the socket? The <= 6.5 behavior of invalidating fs caches, but not actually marking the fs shutdown is pretty broken, especially if this expects to resurrect the device and thus the file system later on.nbd-client -d calls ioctl(nbd, NBD_DISCONNECT); ioctl(nbd, NBD_CLEAR_SOCK); (error handling removed for clarity) where "nbd" is the file handle to the nbd device. This expects that the device is cleared and that then the device can be reused for a different connection, much like "losetup -d". Expecting that the next connection would talk to the same file system is wrong.
So a fs shutdown seems like a the right thing. So I'm a little confused on what actualy broke here.