diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2021-01-19 11:57:27 +0100 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2021-01-26 10:26:00 +0100 |
commit | 0549cd67b01016b579047bce045b386202a8bcfc (patch) | |
tree | 64d08332ae2d20632057818b386a335a3195475f /drivers/xen | |
parent | bd9dcef67ffcae2de49e319fba349df76472fd10 (diff) | |
download | linux-0549cd67b01016b579047bce045b386202a8bcfc.tar.gz linux-0549cd67b01016b579047bce045b386202a8bcfc.tar.bz2 linux-0549cd67b01016b579047bce045b386202a8bcfc.zip |
xen-blkfront: allow discard-* nodes to be optional
This is inline with the specification described in blkif.h:
* discard-granularity: should be set to the physical block size if
node is not present.
* discard-alignment, discard-secure: should be set to 0 if node not
present.
This was detected as QEMU would only create the discard-granularity
node but not discard-alignment, and thus the setup done in
blkfront_setup_discard would fail.
Fix blkfront_setup_discard to not fail on missing nodes, and also fix
blkif_set_queue_limits to set the discard granularity to the physical
block size if none is specified in xenbus.
Fixes: ed30bf317c5ce ('xen-blkfront: Handle discard requests.')
Reported-by: Arthur Borsboom <arthurborsboom@gmail.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Tested-By: Arthur Borsboom <arthurborsboom@gmail.com>
Link: https://lore.kernel.org/r/20210119105727.95173-1-roger.pau@citrix.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen')
0 files changed, 0 insertions, 0 deletions