Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-03-18 Thread Daniel Kiper
On Sat, Mar 16, 2024 at 02:26:55AM +0300, Vladimir 'phcoder' Serbinenko wrote: > On Sat, Feb 17, 2024 at 12:39 AM Jon DeVree wrote: > > > > On Thu, Feb 15, 2024 at 20:33:13 +0300, Vladimir 'phcoder' Serbinenko wrote: > > > Is the pointer guaranteed to be aligned? If not you have to use unaligned >

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-03-15 Thread Vladimir 'phcoder' Serbinenko
On Sat, Feb 17, 2024 at 12:39 AM Jon DeVree wrote: > > On Thu, Feb 15, 2024 at 20:33:13 +0300, Vladimir 'phcoder' Serbinenko wrote: > > Is the pointer guaranteed to be aligned? If not you have to use unaligned > > access. > > I don't know what alignment guarantees grub_malloc() makes. As long as >

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-03-05 Thread Nicolas Frayer
Tested with a VM disk that has unmapped blocks and that fixes it. On Thu, Feb 15, 2024 at 3:54 PM Nicolas Frayer wrote: > > On Thu, Feb 15, 2024 at 2:51 PM Daniel Kiper wrote: > > > > Adding Marta, Nicolas, Sebastian and Vladimir... > > > > Jon, thank you for the patch! > > > > Marta, Nicolas an

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-16 Thread Jon DeVree
On Thu, Feb 15, 2024 at 20:33:13 +0300, Vladimir 'phcoder' Serbinenko wrote: > Is the pointer guaranteed to be aligned? If not you have to use unaligned > access. I don't know what alignment guarantees grub_malloc() makes. As long as they are close to what the regular C malloc() guarantees then it

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-15 Thread Vladimir 'phcoder' Serbinenko
Is the pointer guaranteed to be aligned? If not you have to use unaligned access. Any reason not to check it against correct magic and not just zero-out? Le dim. 11 févr. 2024, 18:36, Jon DeVree a écrit : > The directory extent list does not have to be a continuous list of data > blocks. When GR

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-15 Thread Marta Lewandowska
Thank you, Jon. I am also happy to test. Nicolas and I are all too familiar with this now! -marta On 2/15/24 14:51, Daniel Kiper wrote: Adding Marta, Nicolas, Sebastian and Vladimir... Jon, thank you for the patch! Marta, Nicolas and Sebastian, may I ask you to run tests with this fix? Dan

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-15 Thread Nicolas Frayer
On Thu, Feb 15, 2024 at 2:51 PM Daniel Kiper wrote: > > Adding Marta, Nicolas, Sebastian and Vladimir... > > Jon, thank you for the patch! > > Marta, Nicolas and Sebastian, may I ask you to run tests with this fix? Thanks Jon, Daniel. Sure, I will give it a try. I was actually about to send my ow

Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-15 Thread Daniel Kiper
Adding Marta, Nicolas, Sebastian and Vladimir... Jon, thank you for the patch! Marta, Nicolas and Sebastian, may I ask you to run tests with this fix? Daniel On Sun, Feb 11, 2024 at 10:34:58AM -0500, Jon DeVree wrote: > The directory extent list does not have to be a continuous list of data > b

[PATCH] fs/xfs: Handle non-continuous data blocks in directory extents

2024-02-11 Thread Jon DeVree
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 co