Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] NFS - Fix for Infinite loop during syncing
Date: Mon, 13 Dec 2004 16:20:09 -0500	[thread overview]
Message-ID: <41BE0789.8070001@RedHat.com> (raw)
In-Reply-To: <1102970704.15627.8.camel@lade.trondhjem.org>

Trond Myklebust wrote:

>m=E5 den 13.12.2004 Klokka 15:23 (-0500) skreiv Steve Dickson:
> =20
>
>>It was brought to my attention that following series of events
>>would cause an infinite loop in the 2.4 nfs kernels.
>>
>>1) Mount the fileystem with acregmin=3D1,acregmax=3D1 from two clients.
>>2) On client 1, create a process that continuously writes to a file.
>>3) On client 2, remove that file that is being written
>>4) On client 1, interrupted out of the writing process (which is failin=
g
>>     with ESTALEs) and type sync
>>
>>The sync process loops in wait_on_locked(), when called from
>>sync_inodes_sb(), since the "broken" inode can not be cleared
>>from the locked inode list.
>>   =20
>>
>
>Isn't this pretty much a generic problem of mmapped files? AFAICS, sync
>can loop here no matter what filesystem one is using.
> =20
>
maybe, but these were not mmapped files... here is perl script I used

open $file, "> filetje.$$" or die "Open failed: $!";
while ( 1 ) {
   print $file time(), " The quick brown fox jumps over the lazy dog,=20
1234567890\n"
}

>If you use ordinary writes, then all is well, since the
>nfs_revalidate_inode() in nfs_file_write() should set the NFS_INO_STALE
>flag for you.
> =20
>
Right... nfs_revalidate_inode() does "break" the inode only after a (in=20
this case)
seconded ESTALE  failure .... By setting NFS_INO_STALE in nfs_write_done(=
)
it breaks the inode earlier, which means the nfs_revalidate_inode() is=20
not even
tried.

Now that I think about it... probably makes sense to set NFS_INO_STALE in
nfs_commit_done() as well... From my debugging, it just seems the=20
earlier we
break the inode... the better....

steved.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2004-12-13 21:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-13 20:23 [PATCH] NFS - Fix for Infinite loop during syncing Steve Dickson
2004-12-13 20:45 ` Trond Myklebust
2004-12-13 21:20   ` Steve Dickson [this message]
2004-12-14  0:14     ` Steve Dickson
2005-01-31 17:44 ` Steve Dickson

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=41BE0789.8070001@RedHat.com \
    --to=steved@redhat.com \
    --cc=nfs@lists.sourceforge.net \
    --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