]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm vdo: use GFP_NOIO for blkdev_issue_zeroout on format path
authorBruce Johnston <bjohnsto@redhat.com>
Tue, 28 Apr 2026 18:39:31 +0000 (14:39 -0400)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 4 May 2026 13:02:25 +0000 (15:02 +0200)
GFP_NOWAIT is inappropriate when blkdev_issue_zeroout may sleep and
bio_alloc can fail under pressure; use GFP_NOIO for clear_partition and
vdo_clear_layout zeroout calls.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: fc1d43826702 ("dm vdo: save the formatted metadata to disk")
drivers/md/dm-vdo/vdo.c

index 7bec2418c121f00d8dbcc3024dc242314881c14a..d0d4e0262be29ca43e30a0499e7a5f4ca87d7c01 100644 (file)
@@ -965,7 +965,7 @@ static int __must_check clear_partition(struct vdo *vdo, enum partition_id id)
        return blkdev_issue_zeroout(vdo_get_backing_device(vdo),
                                    partition->offset * VDO_SECTORS_PER_BLOCK,
                                    partition->count * VDO_SECTORS_PER_BLOCK,
-                                   GFP_NOWAIT, 0);
+                                   GFP_NOIO, 0);
 }
 
 int vdo_clear_layout(struct vdo *vdo)
@@ -976,7 +976,7 @@ int vdo_clear_layout(struct vdo *vdo)
        result = blkdev_issue_zeroout(vdo_get_backing_device(vdo),
                                      VDO_SECTORS_PER_BLOCK,
                                      VDO_SECTORS_PER_BLOCK,
-                                     GFP_NOWAIT, 0);
+                                     GFP_NOIO, 0);
        if (result != VDO_SUCCESS)
                return result;