1. 08 Mar, 2016 4 commits
  2. 05 Mar, 2016 1 commit
    • Arnd Bergmann's avatar
      nbd: use correct div_s64 helper · 5e454c67
      Arnd Bergmann authored
      The do_div() macro now checks its arguments for the correct type,
      and refuses anything other than u64, so we get a warning about
      nbd_ioctl passing in an loff_t:
      
      drivers/block/nbd.c: In function '__nbd_ioctl':
      drivers/block/nbd.c:757:77: error: comparison of distinct pointer types lacks a cast [-Werror]
      
      This changes the nbd code to use div_s64() instead, which takes
      a signed argument.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: 37091fdd ("nbd: Create size change events for userspace")
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      5e454c67
  3. 04 Mar, 2016 1 commit
  4. 03 Mar, 2016 19 commits
  5. 29 Feb, 2016 5 commits
  6. 15 Feb, 2016 1 commit
    • Markus Pargmann's avatar
      nbd: Create size change events for userspace · 37091fdd
      Markus Pargmann authored
      The userspace needs to know when nbd devices are ready for use.
      Currently no events are created for the userspace which doesn't work for
      systemd.
      
      See the discussion here: https://github.com/systemd/systemd/pull/358
      
      This patch uses a central point to setup the nbd-internal sizes. A ioctl
      to set a size does not lead to a visible size change. The size of the
      block device will be kept at 0 until nbd is connected. As soon as it
      connects, the size will be changed to the real value and a uevent is
      created. When disconnecting, the blockdevice is set to 0 size and
      another uevent is generated.
      Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
      37091fdd
  7. 10 Feb, 2016 5 commits
  8. 09 Feb, 2016 3 commits
  9. 05 Feb, 2016 1 commit
    • Dan Streetman's avatar
      nbd: ratelimit error msgs after socket close · da6ccaaa
      Dan Streetman authored
      Make the "Attempted send on closed socket" error messages generated in
      nbd_request_handler() ratelimited.
      
      When the nbd socket is shutdown, the nbd_request_handler() function emits
      an error message for every request remaining in its queue.  If the queue
      is large, this will spam a large amount of messages to the log.  There's
      no need for a separate error message for each request, so this patch
      ratelimits it.
      
      In the specific case this was found, the system was virtual and the error
      messages were logged to the serial port, which overwhelmed it.
      
      Fixes: 4d48a542 ("nbd: fix I/O hang on disconnected nbds")
      Signed-off-by: default avatarDan Streetman <dan.streetman@canonical.com>
      Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
      da6ccaaa