This patch is necessary _only_ to enable cluster capable mirrors. It
also requires changes to multipath if it is to be included. You could
safely running mirroring on a single machine without this patch.
In cluster mirroring, if a device failure occurs, an end_io can not be
issued until a suspend has taken place. This is because another
machine could still be able to see the device that the first machine
got a write failure on, and read it - getting inconsistent results.
Because the mirror is waiting for a suspend before issuing the
end_io's, the lock_fs call in dm_suspend must come after the
presuspend.
brassow
diff -urN linux-2.6.12-002/drivers/md/dm.c
linux-2.6.12-003/drivers/md/dm.c
--- linux-2.6.12-002/drivers/md/dm.c 2005-06-17 14:48:29.000000000 -0500
+++ linux-2.6.12-003/drivers/md/dm.c 2005-06-28 16:05:45.118194654 -0500
@@ -1055,14 +1055,14 @@
if (test_bit(DMF_BLOCK_IO, &md->flags))
goto out_read_unlock;
- error = __lock_fs(md);
- if (error)
- goto out_read_unlock;
-
map = dm_get_table(md);
if (map)
dm_table_presuspend_targets(map);
+ error = __lock_fs(md);
+ if (error)
+ goto out_read_unlock;
+
up_read(&md->lock);
/*