]> Pileus Git - ~andy/linux/commitdiff
drbd: a few more GFP_KERNEL -> GFP_NOIO
authorLars Ellenberg <lars.ellenberg@linbit.com>
Wed, 26 Sep 2012 12:22:40 +0000 (14:22 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 9 Nov 2012 13:11:40 +0000 (14:11 +0100)
This has not yet been observed, but conceivably, when using GFP_KERNEL
allocations from drbd_md_sync(), drbd_flush_after_epoch() or
receive_SyncParam(), we could trigger additional IO to our own device,
or an other device in a criss-cross setup, and end up in a local
deadlock, or potentially a distributed deadlock in a criss-cross setup
involving the peer blocked in a similar way waiting for us to make
progress.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_worker.c

index f223f01b4e1c17adccffc46c01352d84a330aac4..4aadd081817932d6c25e0819da5be734dbb42405 100644 (file)
@@ -2294,7 +2294,7 @@ static inline void drbd_md_flush(struct drbd_conf *mdev)
        if (test_bit(MD_NO_FUA, &mdev->flags))
                return;
 
-       r = blkdev_issue_flush(mdev->ldev->md_bdev, GFP_KERNEL, NULL);
+       r = blkdev_issue_flush(mdev->ldev->md_bdev, GFP_NOIO, NULL);
        if (r) {
                set_bit(MD_NO_FUA, &mdev->flags);
                dev_err(DEV, "meta data flush failed with status %d, disabling md-flushes\n", r);
index 377f27bbba1782e678d43737803025e52bb1623f..d348260301f11505d9e9edbd378808350da6d03e 100644 (file)
@@ -473,7 +473,7 @@ struct fifo_buffer *fifo_alloc(int fifo_size)
 {
        struct fifo_buffer *fb;
 
-       fb = kzalloc(sizeof(struct fifo_buffer) + sizeof(int) * fifo_size, GFP_KERNEL);
+       fb = kzalloc(sizeof(struct fifo_buffer) + sizeof(int) * fifo_size, GFP_NOIO);
        if (!fb)
                return NULL;