Skip to content

fs: incorrect use of O_SYNC? #6730

Closed
Closed
@saghul

Description

@saghul
  • Version: Node >= 0.7.9
  • Platform: Unix
  • Subsystem: fs

I somehow ran into fs.open's 'rs' mode, which is basically O_RDONLY | O_SYNC. All the docs I can find point out that O_SYNC is to be used for writing, making a write equivalent to write + fsync. The documentation mentions bypassing caches, which sounds more like O_DIRECT to me.

Is there something I'm missing or does the flag basically do nothing when used with a readonly file?

R=@bnoordhuis, since you landed the commit which introduced it: dfcdd5b

If it's indeed incorrect, i can PR a removal for the next major release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions