5 Commits

Author SHA1 Message Date
肖在
15ec184dc9 Handle non-continuous data blocks in directory extents
(cherry picked from commit eaccc141e1795ac3b376afe158a54a6f52fc6b62)
2024-05-11 15:47:50 +08:00
肖在
3e8531a1a5 Revert "Handle non-continuous data blocks in"
This reverts commit e0cd43f8a5486debeba17349abbb088001164d70.

(cherry picked from commit 88a9257d4914cb2aca40f3b0494a0dcb8927482d)
2024-05-11 15:47:50 +08:00
肖在
10587ba6bf Handle non-continuous data blocks in
directory extents

The directory extent list does not have to be a continuous list of data
blocks. When GRUB tries to read a non-existant member of the list,
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
a zero'ed magic number is sufficient to skip this non-existant data block.

Prior to commit 07318ee7e (fs/xfs: Fix XFS directory extent parsing)
this was handled as a subtle side effect of reading the (non-existant)
tail data structure. Since the block was zero'ed the computation of the
number of directory entries in the block would return 0 as well.

(cherry picked from commit e0cd43f8a5486debeba17349abbb088001164d70)
2024-05-11 15:47:50 +08:00
肖在
a2b94147ab Revert " Handle non-continuous data blocks in"
This reverts commit 242fa05f2412202b241bbea01dc2bd69214b2e33.

(cherry picked from commit fd1e9fdd653fbd874133cbfd0a7885bd1fb2916f)
2024-05-11 15:47:50 +08:00
肖在
23a4c6f1d0 Handle non-continuous data blocks in
directory extents

The directory extent list does not have to be a continuous list of data
blocks. When GRUB tries to read a non-existant member of the list,
grub_xfs_read_file() will return a block of zero'ed memory. Checking for
a zero'ed magic number is sufficient to skip this non-existant data block.

(cherry picked from commit 242fa05f2412202b241bbea01dc2bd69214b2e33)
2024-05-11 15:47:50 +08:00