On Thu, Dec 30, 2021 at 03:07:25AM -0500, Hans Montero wrote: > Furthermore, why doesn't VFS do the `O_APPEND` check itself instead of > delegating the task to the filesystems? It seems like a universal check, > especially given the following snippet on `O_APPEND` from the man page for > open(2): > > APPEND > The file is opened in append mode. Before each write(2), the file offset > is positioned at the end of the file, as if with lseek(2). Because we need to make sure that no other thread will grow the file between the check and actual IO? And exclusion might very well differ for different filesystems. Incidentally, what kind of semantics could you assign to O_APPEND on a block device? Other than "ignore it", that is...