nbd: use loff_t for blocksize and nbd_set_size args
authorJosef Bacik <jbacik@fb.com>
Fri, 2 Dec 2016 21:19:12 +0000 (16:19 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Apr 2017 07:31:23 +0000 (09:31 +0200)
commit7599166d785552bd8b4abff6eb222fa9efc616fa
treec33f3a875356a06da47fde2b00d2bf96ea573f47
parent9c0c4352726368fca2760b9b9a7d808ce86871c7
nbd: use loff_t for blocksize and nbd_set_size args

commit ef77b515243b3499d62cf446eda6ca7e0a0b079c upstream.

If we have large devices (say like the 40t drive I was trying to test with) we
will end up overflowing the int arguments to nbd_set_size and not get the right
size for our device.  Fix this by using loff_t everywhere so I don't have to
think about this again.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
[bwh: Backported to 4.9: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/nbd.c