Bug 188503 - AIO using O_SYNC does not sync metadata
AIO using O_SYNC does not sync metadata
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2006-04-10 13:49 EDT by Jeff Moyer
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-17 14:59:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Honor O_SYNC for AIO writes (714 bytes, patch)
2006-04-10 13:49 EDT, Jeff Moyer
no flags Details | Diff
Honor the O_SYNC flag for AIO writes. (760 bytes, patch)
2006-04-10 15:13 EDT, Jeff Moyer
no flags Details | Diff

  None (edit)
Description Jeff Moyer 2006-04-10 13:49:32 EDT
The AIO write code path does not guarantee that metadata has been written out to
disk when the I/O completion is delivered.  This comment exists in the code:

/* By the time this function is called, all of the pages prior to
 * the current good_idx have been released appropriately.  The remaining
 * duties are to release any remaining pages and to honour O_SYNC.
static void __iodesc_finish_write(struct iodesc *io)

but the bit about honouring O_SYNC is not implemented.

I have not verified this with anything other than code inspection, at this
point.  I've attached a patch that should fix the problem.
Comment 1 Jeff Moyer 2006-04-10 13:49:33 EDT
Created attachment 127563 [details]
Honor O_SYNC for AIO writes
Comment 2 Jeff Moyer 2006-04-10 15:13:44 EDT
Created attachment 127568 [details]
Honor the O_SYNC flag for AIO writes.

The previous patch would call generic_osync_inode w/o the i_sem held, which
could result in a livelock.

Note that this patch is subject to change with testing/review.
Comment 3 Jeff Moyer 2007-01-17 14:59:29 EST
I don't believe that this bug fits the RHEL 3.9 release criteria, so I'm closing
it as WONTFIX.

Note You need to log in before you can comment on or make changes to this bug.