diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-02 16:55:58 +0100 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-02 18:46:46 +0100 |
commit | dcb8baeceaa1c629bbd06f472cea023ad08a0c33 (patch) | |
tree | 72145e182cac0705e80553565356db24a41387e6 /drivers | |
parent | xen/blkfront: Implement FUA with BLKIF_OP_WRITE_BARRIER (diff) | |
download | linux-dcb8baeceaa1c629bbd06f472cea023ad08a0c33.tar.xz linux-dcb8baeceaa1c629bbd06f472cea023ad08a0c33.zip |
xen/blkfront: cope with backend that fail empty BLKIF_OP_WRITE_BARRIER requests
Some(?) Xen block backends fail BLKIF_OP_WRITE_BARRIER requests, which
Linux uses as a cache flush operation. In that case, disable use
of FLUSH.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/xen-blkfront.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 76b874a79175..4f9e22f29138 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -656,6 +656,16 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id) printk(KERN_WARNING "blkfront: %s: write barrier op failed\n", info->gd->disk_name); error = -EOPNOTSUPP; + } + if (unlikely(bret->status == BLKIF_RSP_ERROR && + info->shadow[id].req.nr_segments == 0)) { + printk(KERN_WARNING "blkfront: %s: empty write barrier op failed\n", + info->gd->disk_name); + error = -EOPNOTSUPP; + } + if (unlikely(error)) { + if (error == -EOPNOTSUPP) + error = 0; info->feature_flush = 0; xlvbd_flush(info); } |