Skip to content

Update filename string sizes in block layer

Jeff Cody qemu-devel 2 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 2 repliesApplied
  2. v26 patches 14 repliesSuperseded

Changes in v3 from the cover letter

- Change stack allocations to dybnamic (Thanks Kevin)
- Update qcow/qcow2 ti perform safety checks for platforms that have a PATH_MAX < 1024 (thanks John, Kevin).

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/6block: vmdk - make ret variable usage clearblock/vmdk.c+8 -60 replies
2/6block: vmdk - move string allocations from stack to the heapblock/vmdk.c+23 -161 reply
3/6block: qapi - move string allocation from stack to the heapblock/qapi.c+4 -30 replies
4/6block: remove unused variable in bdrv_commitblock.c+0 -30 replies
5/6block: mirror - change string allocation to 2-bytesblock/mirror.c+2 -10 replies
6/6block: update string sizes for filename, backing_file, exact_filenameblock/qapi.c block/qcow.c block/qcow2.c +3 more+13 -120 replies

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchStefan HajnocziJohn Snow
1/6R-b R-b
2/6
3/6R-b
4/6
5/6R-b R-b
6/6R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/6] Update filename string sizes in block layer

The block layer uses a mixture of 'PATH_MAX' and '1024' string sizes for filenames (and backing filenames).

This series consolidates all that usage to 'PATH_MAX'. Since most platforms (especially the most common platforms for QEMU) have a PATH_MAX larger than 1024 bytes, this series also changes stack allocations of PATH_MAX to be dynamically allocated.

Note: checkpatch.pl complains about an extra space in a printf in
patches 1 & 2. The lines complained about are in the diff context and not the actual changes, so I did not fix them up to satisfy checkpatch.

Changes from v3:
- simplified extent_path handling in vmdk_parse_extents() (Thanks Stefan)
- moved declaration of backing_filename2 to inside if statement in bdrv_query_image_info() (Thanks Stefan)
- removed zombie variable in bdrv_commit (Thanks Stefan)
- fixed typo in commit message (Thanks Stefan)

Changes from v2:

- Change stack allocations to dybnamic (Thanks Kevin)
- Update qcow/qcow2 ti perform safety checks for platforms that have a PATH_MAX < 1024 (thanks John, Kevin).

Jeff Cody (6):
block: vmdk - make ret variable usage clear
block: vmdk - move string allocations from stack to the heap
block: qapi - move string allocation from stack to the heap
block: remove unused variable in bdrv_commit
block: mirror - change string allocation to 2-bytes
block: update string sizes for filename,backing_file,exact_filename

 block.c                   |  3 ---
 block/mirror.c            |  3 ++-
 block/qapi.c              |  7 ++++---
 block/qcow.c              |  2 +-
 block/qcow2.c             |  3 ++-
 block/vmdk.c              | 51 ++++++++++++++++++++++++++++-------------------
 block/vvfat.c             |  4 ++--
 include/block/block_int.h |  8 ++++----
 qemu-img.c                |  4 ++--
 9 files changed, 47 insertions(+), 38 deletions(-)
Signature · 1 line
1.9.3