linux-stable/drivers/block
SeongJae Park 31dc3b1562 xen-blkfront: Apply 'feature_persistent' parameter when connect
commit 402c43ea6b upstream.

In some use cases[1], the backend is created while the frontend doesn't
support the persistent grants feature, but later the frontend can be
changed to support the feature and reconnect.  In the past, 'blkback'
enabled the persistent grants feature since it unconditionally checked
if frontend supports the persistent grants feature for every connect
('connect_ring()') and decided whether it should use persistent grans or
not.

However, commit aac8a70db2 ("xen-blkback: add a parameter for
disabling of persistent grants") has mistakenly changed the behavior.
It made the frontend feature support check to not be repeated once it
shown the 'feature_persistent' as 'false', or the frontend doesn't
support persistent grants.

Similar behavioral change has made on 'blkfront' by commit 74a852479c
("xen-blkfront: add a parameter for disabling of persistent grants").
This commit changes the behavior of the parameter to make effect for
every connect, so that the previous behavior of 'blkfront' can be
restored.

[1] https://lore.kernel.org/xen-devel/CAJwUmVB6H3iTs-C+U=v-pwJB7-_ZRHPxHzKRJZ22xEPW7z8a=g@mail.gmail.com/

Fixes: 74a852479c ("xen-blkfront: add a parameter for disabling of persistent grants")
Cc: <stable@vger.kernel.org> # 5.10.x
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Maximilian Heyne <mheyne@amazon.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/20220715225108.193398-4-sj@kernel.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-17 14:42:33 +02:00
..
aoe aoe: use bvec_kmap_local in bvcpy 2022-03-04 12:29:20 -07:00
drbd drbd: fix duplicate array initializer 2022-06-09 10:29:59 +02:00
mtip32xx for-5.18/block-2022-03-18 2022-03-21 16:48:55 -07:00
null_blk null_blk: fix ida error handling in null_add_dev() 2022-08-17 14:41:56 +02:00
paride Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
rnbd block/rnbd-srv: Set keep_id to true after mutex_trylock 2022-08-17 14:41:56 +02:00
xen-blkback xen-blkback: Apply 'feature_persistent' parameter when connect 2022-08-17 14:42:33 +02:00
zram zram: use memcpy_from_bvec in zram_bvec_write 2022-03-04 12:29:21 -07:00
Kconfig floppy: disable FDRAWCMD by default 2022-04-27 09:41:54 -07:00
Makefile block: remove the rsxx driver 2021-12-16 10:57:04 -07:00
amiflop.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
ataflop.c ataflop: use a statically allocated error counters 2022-05-08 10:01:48 -07:00
brd.c brd: remove brd_devices_mutex mutex 2022-01-17 07:19:40 -07:00
floppy.c floppy: use a statically allocated error counter 2022-05-08 10:01:48 -07:00
loop.c block, loop: support partitions without scanning 2022-06-14 18:44:55 +02:00
loop.h loop: revert "make autoclear operation asynchronous" 2022-02-11 05:51:23 -07:00
n64cart.c n64cart: convert bi_disk to bi_bdev->bd_disk fix build 2022-03-21 06:34:45 -06:00
nbd.c nbd: fix io hung while disconnecting device 2022-06-14 18:45:14 +02:00
pktcdvd.c SCSI misc on 20220324 2022-03-24 19:37:53 -07:00
ps3disk.c ps3disk: add error handling support for add_disk() 2021-10-30 11:03:37 -06:00
ps3vram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
rbd.c block: fix surprise removal for drivers calling blk_set_queue_dying 2022-02-17 07:54:03 -07:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
sunvdc.c block: remove genhd.h 2022-02-02 07:49:59 -07:00
swim.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
swim3.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
swim_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sx8.c block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
virtio_blk.c virtio_blk: fix the discard_granularity and discard_alignment queue limits 2022-06-09 10:30:06 +02:00
xen-blkfront.c xen-blkfront: Apply 'feature_persistent' parameter when connect 2022-08-17 14:42:33 +02:00
z2ram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00