Project

General

Profile

Bug #3249

HAMMER2 fsync(2) not working properly

Added by tkusumi about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
09/21/2020
Due date:
% Done:

0%

Estimated time:

Description

VOP_FSYNC in HAMMER2 doesn't flush chains all the way up to the root, because inodes are initially detached from its parent and they are still detached when fsync happens.

This is also mentioned in the below comment in hammer2_vnops.c.
"This function does not flush the root topology down to the inode."

But if that's part of the design, what's the point of fsync in HAMMER2 ?

e.g. In HAMMER2, a regular file is gone after creat() -> write() -> fsync() -> force-reboot.
To be exact, after force-reboot, nothing (no inode, dirent, data) from creat/write/fsync was allocated in freemap.

Also available in: Atom PDF