Patch "dm table: fix DAX iterate_devices based device capability checks" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dm table: fix DAX iterate_devices based device capability checks

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-table-fix-dax-iterate_devices-based-device-capability-checks.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Wed Mar 10 01:11:05 PM CET 2021
From: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx>
Date: Tue,  9 Mar 2021 11:20:23 +0800
Subject: dm table: fix DAX iterate_devices based device capability checks
To: snitzer@xxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, sashal@xxxxxxxxxx
Cc: stable@xxxxxxxxxxxxxxx, jefflexu@xxxxxxxxxxxxxxxxx
Message-ID: <20210309032023.98465-3-jefflexu@xxxxxxxxxxxxxxxxx>

From: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx>

commit 5b0fab508992c2e120971da658ce80027acbc405 upstream.

Fix dm_table_supports_dax() and invert logic of both
iterate_devices_callout_fn so that all devices' DAX capabilities are
properly checked.

Fixes: 545ed20e6df6 ("dm: add infrastructure for DAX support")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx>
Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx>
[jeffle: no dax write cache, no dax synchronous]
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/md/dm-table.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -848,12 +848,12 @@ void dm_table_set_type(struct dm_table *
 }
 EXPORT_SYMBOL_GPL(dm_table_set_type);
 
-static int device_supports_dax(struct dm_target *ti, struct dm_dev *dev,
-			       sector_t start, sector_t len, void *data)
+static int device_not_dax_capable(struct dm_target *ti, struct dm_dev *dev,
+				  sector_t start, sector_t len, void *data)
 {
 	struct request_queue *q = bdev_get_queue(dev->bdev);
 
-	return q && blk_queue_dax(q);
+	return q && !blk_queue_dax(q);
 }
 
 static bool dm_table_supports_dax(struct dm_table *t)
@@ -869,7 +869,7 @@ static bool dm_table_supports_dax(struct
 			return false;
 
 		if (!ti->type->iterate_devices ||
-		    !ti->type->iterate_devices(ti, device_supports_dax, NULL))
+		    ti->type->iterate_devices(ti, device_not_dax_capable, NULL))
 			return false;
 	}
 


Patches currently in stable-queue which might be from jefflexu@xxxxxxxxxxxxxxxxx are

queue-4.9/dm-table-fix-iterate_devices-based-device-capability-checks.patch
queue-4.9/dm-table-fix-dax-iterate_devices-based-device-capability-checks.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux