]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: set the logical and physical blocksize properly
authorJosef Bacik <jbacik@fb.com>
Mon, 13 Feb 2017 15:39:47 +0000 (10:39 -0500)
committerJens Axboe <axboe@fb.com>
Tue, 21 Feb 2017 19:51:54 +0000 (12:51 -0700)
commitd7354f4133844c6e9baeaf32222b96c6a2c6206c
tree6a13f452c21bd312b81b9f3a7f9118621a4c397c
parent517ac1ce41e61f5ad1246764a4af953fdebc17b0
nbd: set the logical and physical blocksize properly

We noticed when trying to do O_DIRECT to an export on the server side
that we were getting requests smaller than the 4k sectorsize of the
device.  This is because the client isn't setting the logical and
physical blocksizes properly for the underlying device.  Fix this up by
setting the queue blocksizes and then calling bd_set_size.

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nbd.c