linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* O_NONBLOCK for regular files
@ 2004-03-18  8:36 Christoph Hellwig
  2004-03-18  8:42 ` viro
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Christoph Hellwig @ 2004-03-18  8:36 UTC (permalink / raw)
  To: linux-fsdevel

Guy,

any opinion on whether we should allow O_NONBLOCK for regular files?
XFS currently has this in as a leftover from IRIX, it's used to to allow
the HSM support code in XFS (not in the kernel.org code due to the horrible
design, just in the oss.sgi.com tree) to return EAGAIN to the nfs server
so it doesn't block all nfsd threads on possible long-enduring HSM operations.

People want to bring that thing over to Linux now which brought that
O_NONBLOCK thing on my radar.   I don't see any direct problems with this
thing, but I don't want it as an undocumented XFS extension.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: O_NONBLOCK for regular files
@ 2004-03-20  9:24 Greg Banks
  2005-04-13  0:45 ` Greg Banks
  0 siblings, 1 reply; 11+ messages in thread
From: Greg Banks @ 2004-03-20  9:24 UTC (permalink / raw)
  To: Linux Filesystem Development List

Jamie Lokier wrote:
> Christoph Hellwig wrote:
> > It's used to [...] return EAGAIN to the nfs server so it doesn't block all
> > nfsd threads on possible long-enduring HSM operations.
> 
> How does nfsd get notified when the operation is possible? 

It doesn't; the nfsd sends an RPC reply containing the NFSERR_JUKEBOX
error to the NFS client, which sleeps and retries the operation after a
few seconds.  If the operation is not yet possible the cycle repeats.

This is according to the RFC for NFSv3 and NFS clients (including Linux)
know how to handle it.  The point is to free the nfsd and corresponding
client-side resources for other NFS traffic while HSM operation continues.
Also, without this there's a pathological situation where the client
keeps retrying, getting a new nfsd each time, until all the nfsds are
blocked on the same file and all NFS traffic to the server stops.

Greg.
-- 
Greg Banks, R&D Software Engineer, SGI Australian Software Group.
I don't speak for SGI.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-04-13  7:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-18  8:36 O_NONBLOCK for regular files Christoph Hellwig
2004-03-18  8:42 ` viro
2004-03-18  8:45   ` Christoph Hellwig
2004-03-18 10:48 ` Stephen Rothwell
2004-03-18 12:05 ` Jamie Lokier
  -- strict thread matches above, loose matches on Subject: below --
2004-03-20  9:24 Greg Banks
2005-04-13  0:45 ` Greg Banks
2005-04-13  5:56   ` Trond Myklebust
2005-04-13  6:03     ` Greg Banks
2005-04-13  6:31       ` Trond Myklebust
2005-04-13  7:06         ` Greg Banks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).