Question about synchronous I/O

Solution Unverified - Updated -

Issue

  • when a file is opened with O_SYNC flag, the operating systems sends the IO to underlying hardware (virtual in this case) bypassing the disk cache (or immediately invalidating it) and return from "write" function only when the scsi bus returns OK. This has to be true for both file data and metadata.

From open man page :

Before Linux 2.6.33, Linux implemented only the O_SYNC flag for open().  However, when that flag was specified, most filesystems actually provided the equivalent of synchronized I/O data integrity completion (i.e., O_SYNC was actually implemented as the equivalent of O_DSYNC).

Could you tell us if this behaviour is the same in RHEL for EXT3?

If yes, could you confirm that there is actually a risk to lose data using synchronous write?

Environment

  • Red Hat Enterprise Linux (RHEL) 5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.