]> git.ipfire.org Git - thirdparty/grub.git/commit
fs/jfs: Use full 40 bits offset and address for a data extent
authorLidong Chen <lidong.chen@oracle.com>
Mon, 16 Dec 2024 20:22:39 +0000 (20:22 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Jan 2025 15:22:46 +0000 (16:22 +0100)
commitbd999310fe67f35a66de3bfa2836da91589d04ef
tree69f2789cf4e46b93005eebcf9818db1efe9daf20
parentab09fd0531f3523ac0ef833404526c98c08248f7
fs/jfs: Use full 40 bits offset and address for a data extent

An extent's logical offset and address are represented as a 40-bit value
split into two parts: the most significant 8 bits and the least
significant 32 bits. Currently the JFS code uses only the least
significant 32 bits value for offsets and addresses assuming the data
size will never exceed the 32-bit range. This approach ignores the most
significant 8 bits potentially leading to incorrect offsets and
addresses for larger values. The patch fixes it by incorporating the
most significant 8 bits into the calculation to get the full 40-bits
value for offsets and addresses.

https://jfs.sourceforge.net/project/pub/jfslayout.pdf

  "off1,off2 is a 40-bit field, containing the logical offset of the first
   block in the extent.
   ...
   addr1,addr2 is a 40-bit field, containing the address of the extent."

Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/fs/jfs.c