Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 2.1 product line. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 150162

Summary: msync(..., ..., MS_SYNC) returning before data written to disk
Product: Red Hat Enterprise Linux 2.1 Reporter: Jim Paradis <jparadis>
Component: kernelAssignee: Jim Paradis <jparadis>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1CC: peterm, riel
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-04-28 15:05:55 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 Jim Paradis 2005-03-03 04:10:52 UTC
This bug is to track the RHEL2.1 variant of Bug 147969.

From that bug report:

Description of problem:
Calling msync(p, size, MS_SYNC) on a memory mapped file is not waiting for the
data to be flushed to disk [eg a 128Mb chunk of data is claiming to be flushed
in 1-2ms : cf 2.4.21-15 / 2.6.8-1.521 where the same test code takes 2-3s to do
this]

This means that there is no way for code to know that the data it has just
written to a memory mapped file has actually made it to disk.

Version-Release number of selected component (if applicable):
kernel-2.4.21-20.EL and kernel-2.4.21-27.0.2.EL

How reproducible:
Always

Steps to Reproduce:
1.mmap a (large-ish) file
2.write some data into the memory region
3.call msync with the MS_SYNC option
4.reboot the PC by hitting the power switch once msync has completed... [or time
how long it takes to sync the data]
5.look at the contents of the file
    

Actual Results:  Data missing from file on disk (was present in file (ie disk
buffers) prior to hitting power)

Expected Results:  msync should wait for the data to be written to disk when the
MS_SYNC flag is used.

Comment 1 Jim Paradis 2005-03-03 04:11:36 UTC
A fix for this problem has just been committed to the RHEL2.1 U7
patch pool this evening (in kernel version 2.4.9-61).


Comment 2 John Flanagan 2005-04-28 15:05:55 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-283.html