From: Olaf Hering Date: Wed, 21 May 2014 14:32:40 +0000 (+0200) Subject: xen-blkfront: remove type check from blkfront_setup_discard X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~47^2~2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c8cad6c1bbcacc07332539f2d7dee22521f9ae0;p=pandora-kernel.git 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 Signed-off-by: Konrad Rzeszutek Wilk --- Reading git-diff-tree failed