Page MenuHomeFreeBSD

Fix inode birthtime updating.
ClosedPublic

Authored by fsu on Apr 22 2021, 5:25 PM.
Tags
None
Referenced Files
F58750603: D29929.diff
Thu, Mar 30, 8:47 AM
Unknown Object (File)
Tue, Mar 21, 3:07 PM
Unknown Object (File)
Thu, Mar 16, 9:47 AM
Unknown Object (File)
Sat, Mar 4, 9:37 PM
Unknown Object (File)
Feb 28 2023, 6:37 PM
Unknown Object (File)
Feb 22 2023, 6:00 PM
Unknown Object (File)
Feb 15 2023, 6:48 AM
Unknown Object (File)
Feb 11 2023, 7:57 PM
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 Not Applicable
Unit
Tests Not Applicable

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.