Bug 161985
Summary: | O_DIRECT on RHEL v4 may not return correct number of bytes when concurrent I/O | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Richard Fields <safemail12-redhatbugzilla> |
Component: | kernel | Assignee: | Peter Staubach <staubach> |
Status: | CLOSED DUPLICATE | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | CC: | jbaron, sct |
Target Milestone: | --- | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-03-09 14:41:12 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Richard Fields
2005-06-28 20:44:06 UTC
I don't suppose that anyone has written a program which reproduces the problem? That would help me to do the analysis plus to verify the changes when they become available. I really do need some sort of testcase which shows the problem. Without it, I am not sure what I can do. Would you let me know whether there is something that can be used? It seems a little odd to be accessing something like a database using O_DIRECT, but backing it up while not using O_DIRECT. O_DIRECT avoids the use of the page cache, while regular i/o uses the page cache, ie. a copy of the data from the disk, but not necessarily the most recent copy, due to i/o occuring which does not update the page cache. Shouldn't the two applications be using the same kind of i/o and perhaps also be using something to synchronize between the two? Hello, We are running the MySQL database server with the O_DIRECT option to enhance performance. The server runs fine without a problem. We use the InnoDB Hot Backup utility, so that we can make live backups consistently without having to take the database server down. It does not use O_DIRECT. Mixed O_DIRECT and normal file I/O seems to work ok in earlier Red Hat distros than RHEL 4, and similar types of I/O work ok in Windows NT/2000/XP. Every single machine that we upgrade from RHEL 3 (or earlier versions) has the problem when we upgrade to RHEL 4, so it seems to only be a problem there. MySQL says that they could optionally make ibbackup (the Hot Backup program) use O_DIRECT to read the files. But, they have to test if THAT does work. Using synchronization between mysqld and ibbackup is difficult. Red Hat should document in the manual if a file cannot be accessed with normal file I/O when it has been opened with O_DIRECT by another process, if this behavior is intentional. There does not seem to be any indication of this in the man pages currently. And again, this is only a problem on RHEL 4. Thanks, -Richard No, there is no reason that a particular file can not be accessed via buffered and direct i/o at the sametime. As Stephen pointed out, the contents returned are undefined when one process is writing using direct i/o to the same region that another process is reading using buffered i/o, but that, of course, is the same situation which occurs even if the two processes are both using direct i/o. I am looking into this race. |