8cb897e5f9
- drbd: build error against kernel v5.19 (bsc#1202600) - add patch: + bsc-1202600_01-remove-QUEUE_FLAG_DISCARD.patch + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch + bsc-1202600_03-block-decouple-REQ_OP_SECURE_ERASE-from-REQ_OP_DISCA.patch + bsc-1202600_04-remove-assign_p_sizes_qlim.patch - For rpmbuild warning, modify symlink /usr/sbin/rcdrbd to relative path + drbd.spec OBS-URL: https://build.opensuse.org/request/show/998745 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=139
50 lines
2.0 KiB
Diff
50 lines
2.0 KiB
Diff
/* This patch is related with following upstream kernel commit. */
|
|
|
|
From 44abff2c0b970ae3d310b97617525dc01f248d7c Mon Sep 17 00:00:00 2001
|
|
From: Christoph Hellwig <hch@lst.de>
|
|
Date: Fri, 15 Apr 2022 06:52:57 +0200
|
|
Subject: [PATCH] block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCARD
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Secure erase is a very different operation from discard in that it is
|
|
a data integrity operation vs hint. Fully split the limits and helper
|
|
infrastructure to make the separation more clear.
|
|
|
|
Signed-off-by: Christoph Hellwig <hch@lst.de>
|
|
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
|
|
Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com> [drbd]
|
|
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> [nifs2]
|
|
Acked-by: Jaegeuk Kim <jaegeuk@kernel.org> [f2fs]
|
|
Acked-by: Coly Li <colyli@suse.de> [bcache]
|
|
Acked-by: David Sterba <dsterba@suse.com> [btrfs]
|
|
Acked-by: Chao Yu <chao@kernel.org>
|
|
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
|
|
Link: https://lore.kernel.org/r/20220415045258.199825-27-hch@lst.de
|
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
---
|
|
|
|
diff -Nupr a/drbd/drbd_receiver.c b/drbd/drbd_receiver.c
|
|
--- a/drbd/drbd_receiver.c 2022-08-22 16:34:38.332333231 +0800
|
|
+++ b/drbd/drbd_receiver.c 2022-08-22 16:36:22.651901537 +0800
|
|
@@ -1658,7 +1658,8 @@ int drbd_issue_discard_or_zero_out(struc
|
|
start = tmp;
|
|
}
|
|
while (nr_sectors >= max_discard_sectors) {
|
|
- err |= blkdev_issue_discard(bdev, start, max_discard_sectors, GFP_NOIO, 0);
|
|
+ err |= blkdev_issue_discard(bdev, start, max_discard_sectors,
|
|
+ GFP_NOIO);
|
|
nr_sectors -= max_discard_sectors;
|
|
start += max_discard_sectors;
|
|
}
|
|
@@ -1670,7 +1671,7 @@ int drbd_issue_discard_or_zero_out(struc
|
|
nr = nr_sectors;
|
|
nr -= (unsigned int)nr % granularity;
|
|
if (nr) {
|
|
- err |= blkdev_issue_discard(bdev, start, nr, GFP_NOIO, 0);
|
|
+ err |= blkdev_issue_discard(bdev, start, nr, GFP_NOIO);
|
|
nr_sectors -= nr;
|
|
start += nr;
|
|
}
|