On Tue, Feb 28, 2023 at 11:04:41AM +0100, Pavel Machek wrote: > Hi! > > > ublk-nbd[1] is available now. > > > > Basically it is one nbd client, but totally implemented in userspace, > > and wrt. current nbd-client in [2], the transmission phase is done > > by linux block nbd driver. > > There is reason nbd-client needs to be in kernel, and the reason is > deadlocks during low memory situations. Last time, the nbd memory deadlock is solved by the following approach [1], which is used for ublk too. Actually ublk can be thought as replacing nbd socket communication with (much more lightweight & generic) uring_cmd, and move nbd socket communication into userspace for ublk-nbd. Not see such way may cause memory deadlock. Also, ublk has built-in user recovery mechanism, killing deadlock user daemon and recovering it can be the last straw, and the disk node won't be gone away during the recovery. So please provide some analysis or reproductions, otherwise I may have to ignore your comments. [1] https://lore.kernel.org/linux-fsdevel/20191112001900.9206-1-mchristi@xxxxxxxxxx/ Thanks, Ming