lkml.org 
[lkml]   [2011]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Add "-e" option to rpc.gssd to allow error on ticket expiry. Try 2 with added man pages.
From
Date
On Fri, 2011-11-18 at 15:47 -0500, Nick Bowler wrote: 
> On 2011-11-18 22:33 +0200, Trond Myklebust wrote:
> > On Fri, 2011-11-18 at 20:19 +0100, John Hughes wrote:
> > > On 11/18/2011 07:35 PM, Trond Myklebust wrote:
> > > > On Fri, 2011-11-18 at 15:34 +0100, John Hughes wrote:
> > > >
> > > >> Description: Add "-e" (ticket expiry is error) option to rpc.gssd
> > > >> In kernels starting around 2.6.34 the nfs4 server will block all I/O
> > > >> when a user ticket expires. In earlier kernels the I/O would fail
> > > >> with an EACCESS error. This patch adds a "-e" option to rpc.gssd
> > > >> which allow the earlier behaviour (EKEYEXPIRED is converted to
> > > >> EACCESS). This behaviour is particularly useful when user home
> > > >> directories are nfs4 mounted with krb5 security - if the user is
> > > >> absent from their workstation for long enough for the ticket to
> > > >> expire a new ticket will be obtained (via pam_krb5) by the screen
> > > >> unlock process.
> > > >>
> > > > You need a big fat warning somewhere that enabling this option WILL
> > > > cause data corruption...
> > > >
> > > Why?
> > >
> > > Because some process may get the EACCES error half way through it's
> > > operation.
> >
> > No. Because the process can receive a reply to the write() syscall that
> > indicates that the data is safe, but the EKEYEXPIRED error will cause
> > the data to be lost when the client tries to actually commit the data to
> > disk.
>
> But on a local disk, a successful return from the write syscall doesn't
> mean "the data is safe". It seems odd to me that NFS should provide
> this guarantee while a local disk does not.

The guarantee that POSIX offers is that if the close() or fsync()
succeeds, then the data is guaranteed to be on disk. That is the same
guarantee that NFS is supposed to offer.

Allowing data to disappear into a black hole after a successful write()
and before the client has a chance to fsync() is not sanctioned by POSIX
or anything else.

> Is this guarantee documented anywhere?

Yes. It is the same guarantee as POSIX offers.

--
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com



\
 
 \ /
  Last update: 2011-11-18 21:57    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site