lkml.org 
[lkml]   [1996]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Corrupted inode list?
Date


The supplied patch doesn't work, as lock_inode() and unlock_inode()
are internal to linux/fs/inode.c AFAIK.

--
Andrew E. Mileski mailto:aem@ott.hookup.net
Linux Plug-and-Play Kernel Project http://www.redhat.com/linux-info/pnp/
XFree86 Matrox Team http://www.bf.rmit.edu.au/~ajv/xf86-matrox.html


> > After exhaustive testing, and the loss of several hundred MB of data,
> > I can assure everyone that the FAT race fix in v2.1.14 doesn't work :-(
> > (this also affects VFAT of course)
> >
> > To review for anxious readers, three different solutions have been
> > posted on linux-kernel for this problem:
> > #1 by Benjamin LaHaise - see linux-kernel-digest #635
> > #2 by Stephen Tweedie - see linux-kernel-digest #636
> > #3 by Stephen Tweedie - see linux-kernel-digest #638
> > Solution #2 seems to be incorporated into v2.1.14 now.
> >
> > I'll try #3 now and report back after wringing it out a while.
>
> Hmmm... I haven't seen #3, but how about the patch below (untested,
> against 2.1.14). I investigated the msdos/vfat code a bit more, and
> depend/linked only seem to be used when renaming across directories
> (explains why most tests don't show the problem).
>
>
> --- linux/fs/fat/inode.c.orig Mon Dec 9 12:43:05 1996
> +++ linux/fs/fat/inode.c Mon Dec 9 12:44:20 1996
> @@ -32,6 +32,7 @@
> struct inode *depend, *linked;
> struct super_block *sb;
>
> + lock_inode(inode);
> depend = MSDOS_I(inode)->i_depend;
> linked = MSDOS_I(inode)->i_linked;
> sb = inode->i_sb;
> @@ -44,6 +45,7 @@
> MSDOS_I(inode)->i_linked = NULL;
> }
> if (MSDOS_I(inode)->i_busy) fat_cache_inval_inode(inode);
> + unlock_inode(inode);
> return;
> }
> inode->i_size = 0;
> @@ -69,6 +71,7 @@
> iput(linked);
> }
> done:
> + unlock_inode(inode);
> clear_inode(inode);
> }

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.092 / U:5.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site