Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcb8baec authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge
Browse files

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: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
parent be2f8373
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);
			}