Page MenuHomeFreeBSD

Fix inode birthtime updating.
ClosedPublic

Authored by fsu on Apr 22 2021, 5:25 PM.
Tags
None
Referenced Files
F105330340: D29929.diff
Sun, Dec 15, 12:10 AM
Unknown Object (File)
Tue, Nov 26, 2:03 PM
Unknown Object (File)
Sat, Nov 23, 3:43 AM
Unknown Object (File)
Sun, Nov 17, 2:35 PM
Unknown Object (File)
Sat, Nov 16, 5:11 PM
Unknown Object (File)
Oct 15 2024, 7:18 AM
Unknown Object (File)
Sep 28 2024, 11:13 AM
Unknown Object (File)
Sep 28 2024, 8:58 AM
Subscribers
None

Details

Summary

The birthtime field of struct vattr does not checked for VNOVAL in case of ext2_setattr() and produce incorrect inode birthtime values.

Test Plan

Found using pjdfstest: pjdfstest/tests/utimensat/03.t.
Testcase passed after fix.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

fsu requested review of this revision.Apr 22 2021, 5:25 PM
fsu created this revision.

Minor knits, otherwise LGTM.

sys/fs/ext2fs/ext2_vnops.c
380

Not needed because the macro has parenthesis already (standard practice).

509–512

Invert the order: whe should verify if E2DI_AS_XTIME first and only then check for VNOVAL.

This revision is now accepted and ready to land.Apr 22 2021, 8:05 PM

Fix and expression order.

This revision now requires review to proceed.Apr 23 2021, 2:32 PM
sys/fs/ext2fs/ext2_vnops.c
380

May be let's leave it as is. The concern is, that if expression without braces looks strange. Also, we have same if expressions with braces in the ext2_inode_cnv.c.

This revision is now accepted and ready to land.Apr 23 2021, 4:04 PM
This revision was automatically updated to reflect the committed changes.
fsu marked an inline comment as not done.