]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drbd: always set BLK_FEAT_STABLE_WRITES
authorChristoph Böhmwalder <christoph.boehmwalder@linbit.com>
Thu, 5 Feb 2026 17:39:29 +0000 (18:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Feb 2026 17:35:56 +0000 (10:35 -0700)
commit2ebc8d600fb907fa6b1e7095c0b6d84fc47e91ea
tree0b2f231ef362b701f07a13826d69d0b85f1617c7
parent192c0159402e6bfbe13de6f8379546943297783d
drbd: always set BLK_FEAT_STABLE_WRITES

DRBD requires stable pages because it may read the same bio data
multiple times for local disk I/O and network transmission, and in
some cases for calculating checksums.

The BLK_FEAT_STABLE_WRITES flag is set when the device is first
created, but blk_set_stacking_limits() clears it whenever a
backing device is attached. In some cases the flag may be
inherited from the backing device, but we want it to be enabled
at all times.

Unconditionally re-enable BLK_FEAT_STABLE_WRITES in
drbd_reconsider_queue_parameters() after the queue parameter
negotiations.

Also, document why we want this flag enabled in the first place.

Fixes: 1a02f3a73f8c ("block: move the stable_writes flag to queue_limits")
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c