Re: [RFC PATCH] fpathconf() for fsync() behavior

Jamie Lokier
2009-04-23T11:21:23Z

Andrew Morton wrote:
> Would it be better to implement new syscall(s) with finer-grained control
> and better semantics? Then userspace would just need to to:
>
> fsync_on_steroids(fd, FSYNC_BEFORE_RENAME);
>
> and that all gets down into the filesystem which can then work out what
> it needs to do to implement the command.

+1 from me. Several flags come to mind for discussion.
FSYNC_HARDWARE. FSYNC_ORDER_ONLY, FSYNC_FLUSH.
FSYNC_DATA_BEFORE_SIZE. FSYNC_BEFORE_NEW_FILE.

Nick Piggin was working on fsync_range().

Maybe it's time to do fsync properly?

-- Jamie