diff options
| author | Ojaswin Mujoo <[email protected]> | 2025-08-05 08:30:31 +0000 |
|---|---|---|
| committer | Theodore Ts'o <[email protected]> | 2025-08-13 03:15:05 +0000 |
| commit | 3ffbdd1f1165f1b2d6a94d1b1aabef57120deaf7 (patch) | |
| tree | 6f4912c0c0918716ea7038011b2583745aa0fc55 /drivers/pci/controller/vmd.c | |
| parent | ext4: fix fsmap end of range reporting with bigalloc (diff) | |
| download | kernel-3ffbdd1f1165f1b2d6a94d1b1aabef57120deaf7.tar.gz kernel-3ffbdd1f1165f1b2d6a94d1b1aabef57120deaf7.zip | |
ext4: fix reserved gdt blocks handling in fsmap
In some cases like small FSes with no meta_bg and where the resize
doesn't need extra gdt blocks as it can fit in the current one,
s_reserved_gdt_blocks is set as 0, which causes fsmap to emit a 0
length entry, which is incorrect.
$ mkfs.ext4 -b 65536 -O bigalloc /dev/sda 5G
$ mount /dev/sda /mnt/scratch
$ xfs_io -c "fsmap -d" /mnt/scartch
0: 253:48 [0..127]: static fs metadata 128
1: 253:48 [128..255]: special 102:1 128
2: 253:48 [256..255]: special 102:2 0 <---- 0 len entry
3: 253:48 [256..383]: special 102:3 128
Fix this by adding a check for this case.
Cc: [email protected]
Fixes: 0c9ec4beecac ("ext4: support GETFSMAP ioctls")
Signed-off-by: Ojaswin Mujoo <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Link: https://patch.msgid.link/08781b796453a5770112aa96ad14c864fbf31935.1754377641.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'drivers/pci/controller/vmd.c')
0 files changed, 0 insertions, 0 deletions
