On Sun, Oct 01, 2023 at 07:10:53PM +0200, Wouter Verhelst wrote: > > 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.