]> git.baikalelectronics.ru Git - kernel.git/commit
block/rnbd: Set write-back cache and fua same to the target device
authorGioh Kim <gi-oh.kim@cloud.ionos.com>
Thu, 10 Dec 2020 10:18:24 +0000 (11:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Dec 2020 21:55:59 +0000 (14:55 -0700)
commitdf724e59814f3661b7f602300f4cb73d9967b2ec
treefa2cd61c8dc15148e43eb41d979f7546fb988f94
parentf2e8387cc6c15df355fcc79c70d3876650983995
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>
drivers/block/rnbd/rnbd-clt.c
drivers/block/rnbd/rnbd-clt.h
drivers/block/rnbd/rnbd-proto.h
drivers/block/rnbd/rnbd-srv.c