Skip to contentSkip to conversation

Creating written extents beyond EOF

DISCUSSION Chandan Babu R 2 participants 3 messages Sep 1, 2022 – Sep 6, 2022

lore
Share & tools
lore
#0 lore raw

Hi Dave,

7684e2c4384d5d1f884b01ab8bff2369e4db0bff
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7684e2c4384d5d1f884b01ab8bff2369e4db0bff)
is one of the commits that needs to be backported to 5.4.y stable kernel.

The commit message mentions that we could have written extents beyond EOF. I am unable to come up with a sequence of commands that could create such extents.

Can you please explain how a user could create a file having written extents beyond EOF?

Signature · 1 line
chandan
#1 lore raw
Quoted 6 lines · Chandan Babu R

Hi Dave,

7684e2c4384d5d1f884b01ab8bff2369e4db0bff
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7684e2c4384d5d1f884b01ab8bff2369e4db0bff)
is one of the commits that needs to be backported to 5.4.y stable kernel.

Quoted 6 lines

The commit message mentions that we could have written extents beyond EOF. I am unable to come up with a sequence of commands that could create such extents.

Can you please explain how a user could create a file having written extents beyond EOF?

That bug fix was committed in v5.5. We didn't convert delalloc to use unwritten extents until v5.8 via commit a5949d3faedf.

-Dave.

Signature · 2 lines
Dave Chinner
[email protected]
#2 lore raw
Quoted 11 lines · Dave Chinner
Quoted 10 lines · Chandan Babu R

Hi Dave,

7684e2c4384d5d1f884b01ab8bff2369e4db0bff
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7684e2c4384d5d1f884b01ab8bff2369e4db0bff)
is one of the commits that needs to be backported to 5.4.y stable kernel.

The commit message mentions that we could have written extents beyond EOF. I am unable to come up with a sequence of commands that could create such extents.

Quoted 6 lines
Quoted 2 lines

Can you please explain how a user could create a file having written extents beyond EOF?

That bug fix was committed in v5.5. We didn't convert delalloc to use unwritten extents until v5.8 via commit a5949d3faedf.

Ok. Thanks for clarifying my doubt. I can now recreate the bug on my test machine when running v5.4 LTS kernel.

Signature · 1 line
chandan