xen/blkback: disable discard feature if requested by toolstack
authorOlaf Hering <olaf@aepfle.de>
Wed, 21 May 2014 14:32:42 +0000 (16:32 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 28 May 2014 18:17:28 +0000 (14:17 -0400)
commitc926b701fede80ecd6f68887d5485bb620758721
treea12507e65eab2908a84a91cc44e8d448b570bc62
parent1c8cad6c1bbcacc07332539f2d7dee22521f9ae0
xen/blkback: disable discard feature if requested by toolstack

Newer toolstacks may provide a boolean property "discard-enable" in the
backend node. Its purpose is to disable discard for file backed storage
to avoid fragmentation. Recognize this setting also for physical
storage.  If that property exists and is false, do not advertise
"feature-discard" to the frontend.

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