xen/blkback: don't fail empty barrier requests
authorJan Beulich <JBeulich@novell.com>
Tue, 17 May 2011 10:07:05 +0000 (11:07 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 18 May 2011 15:28:16 +0000 (11:28 -0400)
commit8ab521506c4dbb144f0c04c55e3d8bec42c1b2b9
tree4521381df4e0dad05ec7b0d3746ea520fd824e2f
parent496b318eb65558c1a3a4fe882cb9da6d1dc6493a
xen/blkback: don't fail empty barrier requests

The sector number on empty barrier requests may (will?) be -1, which,
given that it's being treated as unsigned 64-bit quantity, will almost
always exceed the actual (virtual) disk's size.

Inspired by Konrad's "When writting barriers set the sector number to
zero...".

While at it also add overflow checking to the math in vbd_translate().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c