public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kurt Garloff <garloff@suse.de>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Andrea Arcangeli <andrea@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: nfs MAP_SHARED corruption fix
Date: Tue, 8 May 2001 17:38:47 +0200	[thread overview]
Message-ID: <20010508173847.I22739@garloff.suse.de> (raw)
In-Reply-To: <20010508160050.F543@athlon.random> <shs3dafvpcx.fsf@charged.uio.no>
In-Reply-To: <shs3dafvpcx.fsf@charged.uio.no>; from trond.myklebust@fys.uio.no on Tue, May 08, 2001 at 05:21:02PM +0200

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

On Tue, May 08, 2001 at 05:21:02PM +0200, Trond Myklebust wrote:
> Could you instead detail exactly which corruption problem you are
> trying to fix?

int fd = open (name, O_RDWR);
char* adr = (char*) mmap (0, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
/* write to *adr through *(ard+len-1) */
/* Try adding here: msync (adr, len, MS_SYNC); */
munmap (adr, len);
close (fd);

The code works on files on local harddisks and on NFS volumes on a 2.2
kernel, but breaks on NFS drives on a 2.4.4 kernel.
msync() works around the bug.
Andrea's patch did help as well.

Regards,
-- 
Kurt Garloff  <garloff@suse.de>                          Eindhoven, NL
GPG key: See mail header, key servers         Linux kernel development
SuSE GmbH, Nuernberg, FRG                               SCSI, Security

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2001-05-08 15:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-08 14:00 nfs MAP_SHARED corruption fix Andrea Arcangeli
2001-05-08 15:21 ` Trond Myklebust
2001-05-08 15:38   ` Kurt Garloff [this message]
2001-05-09  7:30     ` Trond Myklebust
2001-05-09 13:25       ` Andrea Arcangeli
2001-05-09 22:02       ` Marcelo Tosatti
2001-05-10  0:08         ` Andrea Arcangeli
2001-05-09 22:38           ` Marcelo Tosatti
2001-05-10  1:16             ` Andrea Arcangeli
2001-05-10  0:00               ` Marcelo Tosatti
2001-05-10 10:11                 ` Trond Myklebust
2001-05-10 10:14                 ` Trond Myklebust
2001-05-09  2:48   ` Andrea Arcangeli
2001-05-09  7:00     ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2001-05-09 10:55 Kurt Garloff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010508173847.I22739@garloff.suse.de \
    --to=garloff@suse.de \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox