Bug 188503 - AIO using O_SYNC does not sync metadata
Summary: AIO using O_SYNC does not sync metadata
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: kernel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-04-10 17:49 UTC by Jeff Moyer
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-01-17 19:59:29 UTC
Target Upstream Version:
Embargoed:


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

Description Jeff Moyer 2006-04-10 17:49:32 UTC
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 17:49:33 UTC
Created attachment 127563 [details]
Honor O_SYNC for AIO writes

Comment 2 Jeff Moyer 2006-04-10 19:13:44 UTC
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 19:59:29 UTC
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.