grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [PATCH] fs/xfs: Handle non-continuous data blocks in directory extents
Date: Sat, 16 Mar 2024 02:26:55 +0300

On Sat, Feb 17, 2024 at 12:39 AM Jon DeVree <nuxi@vault24.org> 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
> they are close to what the regular C malloc() guarantees then it should
> be fine.

grub_malloc design guarantees the largest natural alignment of all types.
grub_malloc implementation guarantees alignment of 4 * sizeof(void*).

My concern was that the pointer is moved after alloc but it turns own
it was not the case.
So there are no unaligned access concerns

The code still violates cast-align and strict aliasing invariants but
so is the rest of XFS code.
So I'm happy to merge this patch

Reviewed-By: Vladimir Serbinenko <phcoder@gmail.com>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]