summaryrefslogtreecommitdiffstats
path: root/drivers/block/rnbd/rnbd-clt.h
diff options
context:
space:
mode:
authorGioh Kim <gi-oh.kim@cloud.ionos.com>2020-12-10 11:18:24 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-16 22:55:59 +0100
commit512c781fd28cb401ee9f2843e32bf4640732c671 (patch)
treefa2cd61c8dc15148e43eb41d979f7546fb988f94 /drivers/block/rnbd/rnbd-clt.h
parentblock/rnbd: Fix typos (diff)
downloadlinux-512c781fd28cb401ee9f2843e32bf4640732c671.tar.xz
linux-512c781fd28cb401ee9f2843e32bf4640732c671.zip
block/rnbd: Set write-back cache and fua same to the target device
The rnbd-client always sets the write-back cache and fua attributes of the rnbd device queue regardless of the target device on the server. That generates IO hang issue when the target device does not support both of write-back cacne and fua. This patch adds more fields for the cache policy and fua into the device opening message. The rnbd-server sends the information if the target device supports the write-back cache and fua and rnbd-client recevives it and set the device queue accordingly. Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com> [jwang: some minor change, rename a few varables, remove unrelated comments.] Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rnbd/rnbd-clt.h')
-rw-r--r--drivers/block/rnbd/rnbd-clt.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/rnbd/rnbd-clt.h b/drivers/block/rnbd/rnbd-clt.h
index b193d5904050..efd67ae286ca 100644
--- a/drivers/block/rnbd/rnbd-clt.h
+++ b/drivers/block/rnbd/rnbd-clt.h
@@ -112,6 +112,8 @@ struct rnbd_clt_dev {
enum rnbd_access_mode access_mode;
bool read_only;
bool rotational;
+ bool wc;
+ bool fua;
u32 max_hw_sectors;
u32 max_write_same_sectors;
u32 max_discard_sectors;