Ross Lagerwall 7cb02d5dc2 xen/blkfront: Only check REQ_FUA for writes
[ Upstream commit b6ebaa8100090092aa602530d7e8316816d0c98d ]

The existing code silently converts read operations with the
REQ_FUA bit set into write-barrier operations. This results in data
loss as the backend scribbles zeroes over the data instead of returning
it.

While the REQ_FUA bit doesn't make sense on a read operation, at least
one well-known out-of-tree kernel module does set it and since it
results in data loss, let's be safe here and only look at REQ_FUA for
writes.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20230426164005.2213139-1-ross.lagerwall@citrix.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 15:59:13 +02:00
..
2021-06-30 12:21:16 -07:00
2021-09-02 15:09:46 -07:00
2023-03-17 08:48:51 +01:00
2023-06-14 11:12:59 +02:00
2021-09-03 22:14:40 -06:00
2023-06-14 11:12:59 +02:00
2021-08-02 13:37:27 -06:00
2021-06-11 11:53:02 -06:00
2021-06-30 12:21:16 -07:00