[PATCH 4/17] bottom-layer barrier support

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

 



dm-dont-report-eopnotsupp.patch

Don't report -EOPNOTSUPP.

If the underlying device doesn't support barriers and dm receives a barrier,
it waits until all requests on that device drain --- so it doesn't have to
report EOPNOTSUPP to the caller.

This patch fixes the confusing situation when moving volume from one physical
device to another triggers an EOPNOTSUPP on a volume that didn't report it
before.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 drivers/md/dm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.30-rc2-devel/drivers/md/dm.c
===================================================================
--- linux-2.6.30-rc2-devel.orig/drivers/md/dm.c	2009-04-20 08:46:05.000000000 +0200
+++ linux-2.6.30-rc2-devel/drivers/md/dm.c	2009-04-20 08:46:16.000000000 +0200
@@ -565,7 +565,7 @@ static void dec_pending(struct dm_io *io
 			 * a per-device variable for error reporting.
 			 * Note that you can't touch the bio after end_io_acct
 			 */
-			if (!md->barrier_error)
+			if (!md->barrier_error && io_error != -EOPNOTSUPP)
 				md->barrier_error = io_error;
 			end_io_acct(io);
 		} else {

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux