[XFS] Put back the QUEUE_ORDERED_NONE test in the barrier check.
authorTim Shimmin <tes@sgi.com>
Mon, 15 Oct 2007 03:18:59 +0000 (13:18 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Tue, 16 Oct 2007 04:23:21 +0000 (14:23 +1000)
Put back the QUEUE_ORDERED_NONE test which caused us grief in sles when it
was taken out as, IIRC, it allowed md/lvm to be thought of as supporting
barriers when they weren't in some configurations. This patch will be
reverting what went in as part of a change for the SGI-pv 964544
(SGI-Modid: xfs-linux-melb:xfs-kern:28568a).

SGI-PV: 971783
SGI-Modid: xfs-linux-melb:xfs-kern:29882a

Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: David Chinner <dgc@sgi.com>
fs/xfs/linux-2.6/xfs_super.c

index 02ec14eeb0ced29f4a4fd5f9f5e63c890f6f1156..f904858285841f6e82ee1b4a22e0bf129c26a381 100644 (file)
@@ -303,6 +303,14 @@ xfs_mountfs_check_barriers(xfs_mount_t *mp)
                return;
        }
 
+       if (mp->m_ddev_targp->bt_bdev->bd_disk->queue->ordered ==
+                                       QUEUE_ORDERED_NONE) {
+               xfs_fs_cmn_err(CE_NOTE, mp,
+                 "Disabling barriers, not supported by the underlying device");
+               mp->m_flags &= ~XFS_MOUNT_BARRIER;
+               return;
+       }
+
        if (xfs_readonly_buftarg(mp->m_ddev_targp)) {
                xfs_fs_cmn_err(CE_NOTE, mp,
                  "Disabling barriers, underlying device is readonly");