mbox series

[v4,0/3] xen-blk{back,front}: Fix two bugs in 'feature_persistent'

Message ID 20220715225108.193398-1-sj@kernel.org (mailing list archive)
Headers show
Series xen-blk{back,front}: Fix two bugs in 'feature_persistent' | expand

Message

SeongJae Park July 15, 2022, 10:51 p.m. UTC
Introduction of 'feature_persistent' made two bugs.  First one is wrong
overwrite of 'vbd->feature_gnt_persistent' in 'blkback' due to wrong
parameter value caching position, and the second one is unintended
behavioral change that could break previous dynamic frontend/backend
persistent feature support changes.  This patchset fixes the issues.

Changes from v3
(https://lore.kernel.org/xen-devel/20220715175521.126649-1-sj@kernel.org/)
- Split 'blkback' patch for each of the two issues
- Add 'Reported-by: Andrii Chepurnyi <andrii.chepurnyi82@gmail.com>'

Changes from v2
(https://lore.kernel.org/xen-devel/20220714224410.51147-1-sj@kernel.org/)
- Keep the behavioral change of v1
- Update blkfront's counterpart to follow the changed behavior
- Update documents for the changed behavior

Changes from v1
(https://lore.kernel.org/xen-devel/20220106091013.126076-1-mheyne@amazon.de/)
- Avoid the behavioral change
  (https://lore.kernel.org/xen-devel/20220121102309.27802-1-sj@kernel.org/)
- Rebase on latest xen/tip/linux-next
- Re-work by SeongJae Park <sj@kernel.org>
- Cc stable@

Maximilian Heyne (1):
  xen-blkback: Apply 'feature_persistent' parameter when connect

SeongJae Park (2):
  xen-blkback: fix persistent grants negotiation
  xen-blkfront: Apply 'feature_persistent' parameter when connect

 .../ABI/testing/sysfs-driver-xen-blkback      |  2 +-
 .../ABI/testing/sysfs-driver-xen-blkfront     |  2 +-
 drivers/block/xen-blkback/xenbus.c            | 20 ++++++++-----------
 drivers/block/xen-blkfront.c                  |  4 +---
 4 files changed, 11 insertions(+), 17 deletions(-)

Comments

Andrii Chepurnyi July 18, 2022, 4:12 p.m. UTC | #1
Hello SeongJae,

Thanks for the efforts.
I've tested backend patches(1,2) on my custom 5.10 kernel (since I
can't test on vanilla) and it works for me.

Best regards,
Andrii


On Sat, Jul 16, 2022 at 1:51 AM SeongJae Park <sj@kernel.org> wrote:
>
> Introduction of 'feature_persistent' made two bugs.  First one is wrong
> overwrite of 'vbd->feature_gnt_persistent' in 'blkback' due to wrong
> parameter value caching position, and the second one is unintended
> behavioral change that could break previous dynamic frontend/backend
> persistent feature support changes.  This patchset fixes the issues.
>
> Changes from v3
> (https://lore.kernel.org/xen-devel/20220715175521.126649-1-sj@kernel.org/)
> - Split 'blkback' patch for each of the two issues
> - Add 'Reported-by: Andrii Chepurnyi <andrii.chepurnyi82@gmail.com>'
>
> Changes from v2
> (https://lore.kernel.org/xen-devel/20220714224410.51147-1-sj@kernel.org/)
> - Keep the behavioral change of v1
> - Update blkfront's counterpart to follow the changed behavior
> - Update documents for the changed behavior
>
> Changes from v1
> (https://lore.kernel.org/xen-devel/20220106091013.126076-1-mheyne@amazon.de/)
> - Avoid the behavioral change
>   (https://lore.kernel.org/xen-devel/20220121102309.27802-1-sj@kernel.org/)
> - Rebase on latest xen/tip/linux-next
> - Re-work by SeongJae Park <sj@kernel.org>
> - Cc stable@
>
> Maximilian Heyne (1):
>   xen-blkback: Apply 'feature_persistent' parameter when connect
>
> SeongJae Park (2):
>   xen-blkback: fix persistent grants negotiation
>   xen-blkfront: Apply 'feature_persistent' parameter when connect
>
>  .../ABI/testing/sysfs-driver-xen-blkback      |  2 +-
>  .../ABI/testing/sysfs-driver-xen-blkfront     |  2 +-
>  drivers/block/xen-blkback/xenbus.c            | 20 ++++++++-----------
>  drivers/block/xen-blkfront.c                  |  4 +---
>  4 files changed, 11 insertions(+), 17 deletions(-)
>
> --
> 2.25.1
>
Maximilian Heyne Aug. 1, 2022, 12:17 p.m. UTC | #2
On Fri, Jul 15, 2022 at 10:51:05PM +0000, SeongJae Park wrote:
> 
> Introduction of 'feature_persistent' made two bugs.  First one is wrong
> overwrite of 'vbd->feature_gnt_persistent' in 'blkback' due to wrong
> parameter value caching position, and the second one is unintended
> behavioral change that could break previous dynamic frontend/backend
> persistent feature support changes.  This patchset fixes the issues.
> 
> Changes from v3
> (https://lore.kernel.org/xen-devel/20220715175521.126649-1-sj@kernel.org/)
> - Split 'blkback' patch for each of the two issues
> - Add 'Reported-by: Andrii Chepurnyi <andrii.chepurnyi82@gmail.com>'
> 
> Changes from v2
> (https://lore.kernel.org/xen-devel/20220714224410.51147-1-sj@kernel.org/)
> - Keep the behavioral change of v1
> - Update blkfront's counterpart to follow the changed behavior
> - Update documents for the changed behavior
> 
> Changes from v1
> (https://lore.kernel.org/xen-devel/20220106091013.126076-1-mheyne@amazon.de/)
> - Avoid the behavioral change
>   (https://lore.kernel.org/xen-devel/20220121102309.27802-1-sj@kernel.org/)
> - Rebase on latest xen/tip/linux-next
> - Re-work by SeongJae Park <sj@kernel.org>
> - Cc stable@
> 
> Maximilian Heyne (1):
>   xen-blkback: Apply 'feature_persistent' parameter when connect
> 
> SeongJae Park (2):
>   xen-blkback: fix persistent grants negotiation
>   xen-blkfront: Apply 'feature_persistent' parameter when connect
> 
>  .../ABI/testing/sysfs-driver-xen-blkback      |  2 +-
>  .../ABI/testing/sysfs-driver-xen-blkfront     |  2 +-
>  drivers/block/xen-blkback/xenbus.c            | 20 ++++++++-----------
>  drivers/block/xen-blkfront.c                  |  4 +---
>  4 files changed, 11 insertions(+), 17 deletions(-)
> 
> --
> 2.25.1
> 

Changes look good to me. Thank you for reworking my patch and also fixing the
blkfront driver.

Reviewed-by: Maximilian Heyne <mheyne@amazon.de>



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
Jürgen Groß Aug. 12, 2022, 10:08 a.m. UTC | #3
On 16.07.22 00:51, SeongJae Park wrote:
> Introduction of 'feature_persistent' made two bugs.  First one is wrong
> overwrite of 'vbd->feature_gnt_persistent' in 'blkback' due to wrong
> parameter value caching position, and the second one is unintended
> behavioral change that could break previous dynamic frontend/backend
> persistent feature support changes.  This patchset fixes the issues.
> 
> Changes from v3
> (https://lore.kernel.org/xen-devel/20220715175521.126649-1-sj@kernel.org/)
> - Split 'blkback' patch for each of the two issues
> - Add 'Reported-by: Andrii Chepurnyi <andrii.chepurnyi82@gmail.com>'
> 
> Changes from v2
> (https://lore.kernel.org/xen-devel/20220714224410.51147-1-sj@kernel.org/)
> - Keep the behavioral change of v1
> - Update blkfront's counterpart to follow the changed behavior
> - Update documents for the changed behavior
> 
> Changes from v1
> (https://lore.kernel.org/xen-devel/20220106091013.126076-1-mheyne@amazon.de/)
> - Avoid the behavioral change
>    (https://lore.kernel.org/xen-devel/20220121102309.27802-1-sj@kernel.org/)
> - Rebase on latest xen/tip/linux-next
> - Re-work by SeongJae Park <sj@kernel.org>
> - Cc stable@
> 
> Maximilian Heyne (1):
>    xen-blkback: Apply 'feature_persistent' parameter when connect
> 
> SeongJae Park (2):
>    xen-blkback: fix persistent grants negotiation
>    xen-blkfront: Apply 'feature_persistent' parameter when connect
> 
>   .../ABI/testing/sysfs-driver-xen-blkback      |  2 +-
>   .../ABI/testing/sysfs-driver-xen-blkfront     |  2 +-
>   drivers/block/xen-blkback/xenbus.c            | 20 ++++++++-----------
>   drivers/block/xen-blkfront.c                  |  4 +---
>   4 files changed, 11 insertions(+), 17 deletions(-)
> 

For the series:

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
Jürgen Groß Aug. 14, 2022, 8:36 a.m. UTC | #4
On 16.07.22 00:51, SeongJae Park wrote:
> Introduction of 'feature_persistent' made two bugs.  First one is wrong
> overwrite of 'vbd->feature_gnt_persistent' in 'blkback' due to wrong
> parameter value caching position, and the second one is unintended
> behavioral change that could break previous dynamic frontend/backend
> persistent feature support changes.  This patchset fixes the issues.
> 
> Changes from v3
> (https://lore.kernel.org/xen-devel/20220715175521.126649-1-sj@kernel.org/)
> - Split 'blkback' patch for each of the two issues
> - Add 'Reported-by: Andrii Chepurnyi <andrii.chepurnyi82@gmail.com>'
> 
> Changes from v2
> (https://lore.kernel.org/xen-devel/20220714224410.51147-1-sj@kernel.org/)
> - Keep the behavioral change of v1
> - Update blkfront's counterpart to follow the changed behavior
> - Update documents for the changed behavior
> 
> Changes from v1
> (https://lore.kernel.org/xen-devel/20220106091013.126076-1-mheyne@amazon.de/)
> - Avoid the behavioral change
>    (https://lore.kernel.org/xen-devel/20220121102309.27802-1-sj@kernel.org/)
> - Rebase on latest xen/tip/linux-next
> - Re-work by SeongJae Park <sj@kernel.org>
> - Cc stable@
> 
> Maximilian Heyne (1):
>    xen-blkback: Apply 'feature_persistent' parameter when connect
> 
> SeongJae Park (2):
>    xen-blkback: fix persistent grants negotiation
>    xen-blkfront: Apply 'feature_persistent' parameter when connect
> 
>   .../ABI/testing/sysfs-driver-xen-blkback      |  2 +-
>   .../ABI/testing/sysfs-driver-xen-blkfront     |  2 +-
>   drivers/block/xen-blkback/xenbus.c            | 20 ++++++++-----------
>   drivers/block/xen-blkfront.c                  |  4 +---
>   4 files changed, 11 insertions(+), 17 deletions(-)
> 

Series pushed to xen/tip.git for-linus-6.0


Juergen