lkml.org 
[lkml]   [1997]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[: Re: 2.0.3[01]: reproducable vfat fs corruption]
I still have the message from Gordon Chaffee with the patch.

Wolfgang

-----Forwarded message from Gordon Chaffee <chaffee@shmoo.cs.berkeley.edu>-----

Return-Path: <owner-linux-kernel-outgoing@vger.rutgers.edu>
Delivered-To: walterw-linux-kernel@wuerli.h3.stusta.mhn.de
Received: (qmail 1876 invoked from network); 22 Oct 1997 14:25:57 -0000
Received: from nic.funet.fi (128.214.248.6)
by wuerli.h3.stusta.mhn.de with SMTP; 22 Oct 1997 14:25:57 -0000
Received: from vger.rutgers.edu ([128.6.190.2] EHLO vger.rutgers.edu ident: root [port 18996]) by nic.funet.fi with ESMTP id <10423-642>; Wed, 22 Oct 1997 17:13:19 +0300
Received: by vger.rutgers.edu id <970855-248>; Wed, 22 Oct 1997 08:41:33 -0400
Received: from shmoo.CS.Berkeley.EDU ([128.32.131.88] EHLO shmoo.cs.berkeley.edu ident: IDENT-NOT-QUERIED [port 1805]) by vger.rutgers.edu with ESMTP id <970853-248>; Wed, 22 Oct 1997 08:41:02 -0400
Received: (from chaffee@localhost) by shmoo.cs.berkeley.edu (8.8.5/8.6.9) id FAA26443; Wed, 22 Oct 1997 05:42:18 -0700 (PDT)
Date: Wed, 22 Oct 1997 05:42:18 -0700 (PDT)
Message-Id: <199710221242.FAA26443@shmoo.cs.berkeley.edu>
From: Gordon Chaffee <chaffee@shmoo.cs.berkeley.edu>
To: linux-kernel@vger.rutgers.edu
Subject: Re: 2.0.3[01]: reproducable vfat fs corruption
CC: fw@cygnus.stuttgart.netsurf.de
X-Orcpt: rfc822;linux-kernel@vger.rutgers.edu
Sender: owner-linux-kernel@vger.rutgers.edu
Precedence: bulk

Florian Weimer (fw@cygnus.stuttgart.netsurf.de) writes:
> A few days ago, I unpacked some ZIP archives and forget to specify the
> -L parameter. As a result, all the filenames were uppercase. So I
> used the `ired mode of XEmacs 20.2 to convert them to lower case.
> Unfortunately, the files were located on a vfat filesystem, revealing
> a bug in the corresponding Linux code: the first file which was
> renamed disappeared completely, the others were truncated after the
> first few bytes. In addition, ScanDisk discovered a few cross-linked
> files.

Here is a patch that fixes the problem, but not in an ideal way.
It will return an -EEXIST error when you run your example. It is
more difficult to make it work the way one would like. It runs into
the problems associated with longnames and short aliases, and I don't
feel like dealing with that at the moment.

- Gordon

--- linux/fs/vfat/namei.c.orig Sun Sep 21 02:28:16 1997
+++ linux/fs/vfat/namei.c Wed Oct 22 05:27:26 1997
@@ -1515,10 +1515,12 @@
PRINTK(("vfat_rename 8\n"));
if (res < 0) goto rename_done;
} else {
- PRINTK(("vfat_rename 9\n"));
- res = vfat_unlinkx(new_dir,new_name,new_len,1);
- PRINTK(("vfat_rename 10\n"));
- if (res < 0) goto rename_done;
+ if (new_inode != old_inode) {
+ PRINTK(("vfat_rename 9\n"));
+ res = vfat_unlinkx(new_dir,new_name,new_len,1);
+ PRINTK(("vfat_rename 10\n"));
+ if (res < 0) goto rename_done;
+ }
}
}

-----End of forwarded message-----
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.019 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site