On Wed, Feb 12, 2020 at 04:13:02PM +0800, sunke (E) wrote: > > > 在 2020/2/12 6:23, Omar Sandoval 写道: > > On Mon, Dec 23, 2019 at 11:15:35AM +0800, sunke (E) wrote: > > > Hi Omar, > > > > > > The nbd/003 you simplified does the same I want to do and I made some small > > > changes. I ran the simplified nbd/003 with linux kernel at the commit > > > 7e0165b2f1a, it could pass.Then, I rollbacked the linux kernel to commit > > > 090bb803708, it indeed triggered the BUGON. > > > > > > However, there is one difference. NBD has ioctl and netlink interfaces. I > > > use the netlink interface and the simplified nbd/003 use the ioctl > > > interface. The nbd/003 with the netlink interface indeed seem to trigger > > > some other issue. So, can it be nbd/004? > > > > Sure, how about we add a flag to mount_clear_sock that specifies to use > > the netlink interface instead of the ioctl interface, and make nbd/004 > > which is the same as nbd/003 expect it runs it with the netlink flag? > > > Hi Omar > > I can not understand adding a flag to mount_clear_sock. Sorry, I thought you were saying that there is a netlink interface equivalent to ioctl(NBD_CLEAR_SOCK). > How about add > _start_nbd_server_netlink and _stop_nbd_server_netlink in tests/nbd/rc, > others can also reuse the code? Sure, that works.