Page MenuHomeFreeBSD

dirent is now 8-byte aligned after ino64.
AcceptedPublic

Authored by bdrewery on Jun 21 2018, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 25 2025, 11:25 PM
Unknown Object (File)
Dec 2 2025, 5:51 PM
Unknown Object (File)
Nov 16 2025, 4:11 AM
Unknown Object (File)
Nov 8 2025, 3:52 AM
Unknown Object (File)
Oct 6 2025, 3:10 PM
Unknown Object (File)
Sep 30 2025, 12:33 PM
Unknown Object (File)
Sep 30 2025, 12:01 PM
Unknown Object (File)
Sep 29 2025, 3:36 AM
Subscribers
None

Details

Reviewers
kib
jhb

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17526
Build 17349: arc lint + arc unit

Event Timeline

This is fine.

Since you are changing the line, I believe two additional bugs should be fixed. long is the wrong type to use, uintptr_t is correct. Also please do the explicit comparision with 0, since the result of and is not boolean:

if (((uintptr_t)dp & 0x7) != 0)
   break;

address findings and add a comment as it is otherwise somewhat obscure.

As I said I believe it is fine functionally.

One note I have about it is that the change makes libc incompatible with pre-ino64 kernel. IMO this is fine, but note that other people do not agree. In particular, I think that imp' forward-compat shims for the ino64-changed syscalls are now less useful.

If you consider this important enough, you can do something like this:

	... & (__getosreldate() >= INO64_FIRST ? 0x7 : 0x3)) != 0)
This revision is now accepted and ready to land.Jun 22 2018, 8:56 AM