On Tue, Apr 15, 2025 at 07:46:51PM +0000, Yoav Cohen wrote: > Hi Ming, > > Thank you for the fast reply. > To be clear, I don't want calling DELETE_DEV or STOP_DEV as I want the kernel bdev will be stay while upgrading the ublk server application. > It would be nice to have a nice way to have something like FREEZE_DEV that we may use which will also make all the cmds back with ABORT result but both block and char device will be stay until a new userspace application will reconnect. Have you taken a look at the recovery flags? These offer slightly different behaviors around how I/O is handled while the ublk server is dying/when it is dead, but they all keep the block device up even after the ublk server exits. The flags are documented at https://docs.kernel.org/block/ublk.html