]> git.baikalelectronics.ru Git - kernel.git/commit
xen-blkfront: remove type check from blkfront_setup_discard
authorOlaf Hering <olaf@aepfle.de>
Wed, 21 May 2014 14:32:40 +0000 (16:32 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 28 May 2014 18:17:26 +0000 (14:17 -0400)
commit11005f3dee76bcde2247296235fd0db64cfb7e0a
tree28ecdd3556805dfd8bc201eb4ddad5a2bf1f6eea
parent03a169e57a9a3fd69c1713c317a06f163ad63b5c
xen-blkfront: remove type check from blkfront_setup_discard

In its initial implementation a check for "type" was added, but only phy
and file are handled. This breaks advertised discard support for other
type values such as qdisk.

Fix and simplify this function: If the backend advertises discard
support it is supposed to implement it properly, so enable
feature_discard unconditionally. If the backend advertises the need for
a certain granularity and alignment then propagate both properties to
the blocklayer. The discard-secure property is a boolean, update the code
to reflect that.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkfront.c