« Previous | Next » 

Revision 3e05c785

ID3e05c785516efa6911504b1ddf936d2386c2e0b6

Added by Chunyan Liu over 12 years ago

Update ioctl order in nbd_init() to detect EBUSY

Update ioctl(s) in nbd_init() to detect device busy early.

Current nbd_init() issues NBD_CLEAR_SOCKET before NBD_SET_SOCKET, if issuing
"qemu-nbd -c /dev/nbd0 disk.img" twice, the second time won't detect EBUSY in
nbd_init(), but in nbd_client will report EBUSY and do clear socket (the 1st
time command will be affacted too because of no socket any more.)

No change to previous version.

Signed-off-by: Chunyan Liu <>

Signed-off-by: Paolo Bonzini <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences