[PATCH v3 0/5] block/vvfat: introduce "fat-size" option

Clément Chigot posted 5 patches 2 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251127142417.710094-1-chigot@adacore.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
block/vvfat.c        | 350 +++++++++++++++++++++++++++++++------------
qapi/block-core.json |  16 +-
2 files changed, 270 insertions(+), 96 deletions(-)
[PATCH v3 0/5] block/vvfat: introduce "fat-size" option
Posted by Clément Chigot 2 months, 1 week ago
The main goal of this series is to introduce a new option "fat-size"
within the vvfat backend (patch 5).

This series also includes minor patches:
 - patch 1 introduces another option to create unpartitionned disks.
 - patch 2-4 are minor improvements easing the introducing of
   "fat-size" option

This was tested on with a aarch64-linux kernel taken from
functional/aarch64/test-virt and on aarch64-qnx over raspi4b with a
workaround, not included here (the SD bus must be associated to the EMMC2
port instead of through GPIOs).

Changes since v2:
 - patch 1:
   - change default: true for hard disk, false for false.
   - remove "unpartitioned" keyword within filename
 - patch 5
   - rename option "fs-size"

Clément Chigot (5):
  vvfat: introduce partitioned option
  vvfat: move fat_type check prior to size setup
  vvfat: add a define for VVFAT_SECTOR_BITS and VVFAT_SECTOR_SIZE
  vvfat: move size parameters within driver structure
  vvfat: add support for "fs-size" option

 block/vvfat.c        | 350 +++++++++++++++++++++++++++++++------------
 qapi/block-core.json |  16 +-
 2 files changed, 270 insertions(+), 96 deletions(-)

-- 
2.43.0


Re: [PATCH v3 0/5] block/vvfat: introduce "fat-size" option
Posted by BALATON Zoltan 2 months, 1 week ago
On Thu, 27 Nov 2025, Clément Chigot wrote:
> The main goal of this series is to introduce a new option "fat-size"
> within the vvfat backend (patch 5).
>
> This series also includes minor patches:
> - patch 1 introduces another option to create unpartitionned disks.
> - patch 2-4 are minor improvements easing the introducing of
>   "fat-size" option
>
> This was tested on with a aarch64-linux kernel taken from
> functional/aarch64/test-virt and on aarch64-qnx over raspi4b with a
> workaround, not included here (the SD bus must be associated to the EMMC2
> port instead of through GPIOs).
>
> Changes since v2:
> - patch 1:
>   - change default: true for hard disk, false for false.

Typo: false for floppy

>   - remove "unpartitioned" keyword within filename
> - patch 5
>   - rename option "fs-size"

I'm still not sure if it could be done simpler without adding a separate 
fs-size option and fix size to apply to vvfat instead of raw so it works 
as expected not how it works now. The idea I proposed was to try to set 
format to vvfat if file or protocol contains fat: which was discussed 
here:

https://lists.nongnu.org/archive/html/qemu-devel/2025-11/msg01487.html

but I did not understand Kevin's reply if it's possible or why not.

Regards,
BALATON Zoltan

> Clément Chigot (5):
>  vvfat: introduce partitioned option
>  vvfat: move fat_type check prior to size setup
>  vvfat: add a define for VVFAT_SECTOR_BITS and VVFAT_SECTOR_SIZE
>  vvfat: move size parameters within driver structure
>  vvfat: add support for "fs-size" option
>
> block/vvfat.c        | 350 +++++++++++++++++++++++++++++++------------
> qapi/block-core.json |  16 +-
> 2 files changed, 270 insertions(+), 96 deletions(-)
>
>
Re: [PATCH v3 0/5] block/vvfat: introduce "fat-size" option
Posted by Clément Chigot 1 month ago
On Thu, Nov 27, 2025 at 3:53 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> On Thu, 27 Nov 2025, Clément Chigot wrote:
> > The main goal of this series is to introduce a new option "fat-size"
> > within the vvfat backend (patch 5).
> >
> > This series also includes minor patches:
> > - patch 1 introduces another option to create unpartitionned disks.
> > - patch 2-4 are minor improvements easing the introducing of
> >   "fat-size" option
> >
> > This was tested on with a aarch64-linux kernel taken from
> > functional/aarch64/test-virt and on aarch64-qnx over raspi4b with a
> > workaround, not included here (the SD bus must be associated to the EMMC2
> > port instead of through GPIOs).
> >
> > Changes since v2:
> > - patch 1:
> >   - change default: true for hard disk, false for false.
>
> Typo: false for floppy
>
> >   - remove "unpartitioned" keyword within filename
> > - patch 5
> >   - rename option "fs-size"
>
> I'm still not sure if it could be done simpler without adding a separate
> fs-size option and fix size to apply to vvfat instead of raw so it works
> as expected not how it works now. The idea I proposed was to try to set
> format to vvfat if file or protocol contains fat: which was discussed
> here:
>
> https://lists.nongnu.org/archive/html/qemu-devel/2025-11/msg01487.html
>
> but I did not understand Kevin's reply if it's possible or why not.

My understanding is while it's possible to change the default format
dynamically, we'd rather not go in that direction. It's not that
trivial, meaning a much wider series of patches, and could change
existing behavior, meaning some warnings to be introduced before
making such changes.

Overall, I'd rather keep that series small (time you know...). So
@Kevin Wolf, would you mind making a review pass on the current V3 ?
The V4 has just a few comments/strings updates as per Zoltan
feedbacks.

TIA
Clément

> Regards,
> BALATON Zoltan
>
> > Clément Chigot (5):
> >  vvfat: introduce partitioned option
> >  vvfat: move fat_type check prior to size setup
> >  vvfat: add a define for VVFAT_SECTOR_BITS and VVFAT_SECTOR_SIZE
> >  vvfat: move size parameters within driver structure
> >  vvfat: add support for "fs-size" option
> >
> > block/vvfat.c        | 350 +++++++++++++++++++++++++++++++------------
> > qapi/block-core.json |  16 +-
> > 2 files changed, 270 insertions(+), 96 deletions(-)
> >
> >