xen/blkback: Squash the discard support for 'file' and 'phy' type.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 13 Mar 2012 22:43:23 +0000 (18:43 -0400)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 15:02:55 +0000 (20:02 +0530)
commit1196b41d5359a14a3b72d37261b38c1e8faa948c
tree6d96272dce072dbc0faaa2bf96d7d4d322eb184a
parent625df0f0839edfbe5e2f830bf1754e5b0057f623
xen/blkback: Squash the discard support for 'file' and 'phy' type.

The only reason for the distinction was for the special case of
'file' (which is assumed to be loopback device), was to reach inside
the loopback device, find the underlaying file, and call fallocate on it.
Fortunately "xen-blkback: convert hole punching to discard request on
loop devices" removes that use-case and we now based the discard
support based on blk_queue_discard(q) and extract all appropriate
parameters from the 'struct request_queue'.

CC: Li Dongyang <lidongyang@novell.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
[v1: Dropping pointless initializer and keeping blank line]
[v2: Remove the kfree as it is not used anymore]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h
drivers/block/xen-blkback/xenbus.c