2022-04-07 01:21:34

by Christoph Böhmwalder

[permalink] [raw]
Subject: [PATCH 0/3] DRBD fixes for Linux 5.18

Assortment of more relevant fixes for DRBD to go into 5.18.

Christoph Böhmwalder (1):
drbd: set QUEUE_FLAG_STABLE_WRITES

Lv Yunlong (1):
drbd: Fix five use after free bugs in get_initial_state

Xiaomeng Tong (1):
drbd: fix an invalid memory access caused by incorrect use of list
iterator

drivers/block/drbd/drbd_int.h | 8 ++---
drivers/block/drbd/drbd_main.c | 7 ++---
drivers/block/drbd/drbd_nl.c | 41 ++++++++++++++++----------
drivers/block/drbd/drbd_state.c | 18 +++++------
drivers/block/drbd/drbd_state_change.h | 8 ++---
5 files changed, 45 insertions(+), 37 deletions(-)

--
2.35.1


2022-04-07 01:21:48

by Christoph Böhmwalder

[permalink] [raw]
Subject: [PATCH 3/3] drbd: set QUEUE_FLAG_STABLE_WRITES

From: Christoph Böhmwalder <[email protected]>

We want our pages not to change while they are being written.

Signed-off-by: Christoph Böhmwalder <[email protected]>
---
drivers/block/drbd/drbd_main.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index d6dfa286ddb3..4b0b25cc916e 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2719,6 +2719,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
sprintf(disk->disk_name, "drbd%d", minor);
disk->private_data = device;

+ blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, disk->queue);
blk_queue_write_cache(disk->queue, true, true);
/* Setting the max_hw_sectors to an odd value of 8kibyte here
This triggers a max_bio_size message upon first attach or connect */
--
2.35.1

2022-04-07 08:45:13

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 3/3] drbd: set QUEUE_FLAG_STABLE_WRITES

On Wed, Apr 06, 2022 at 09:04:45PM +0200, Christoph B?hmwalder wrote:
> From: Christoph B?hmwalder <[email protected]>
>
> We want our pages not to change while they are being written.

Please document the _why_. A commit like that will leave everyone
looking at this code in the future rather puzzled.