Re: [PATCH 0/4] RFC Avoid expired credential keys for buffered writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-09-10 at 19:52 +0000, Adamson, Andy wrote:
> On Sep 10, 2012, at 2:57 PM, Jeff Layton wrote: 
> > My only concern is this behavior described in the last patch:
> > 
> > "If the buffered WRITE is using a credential key that will expire
> > within low watermark seconds, fail the WRITE in nfs_write_begin
> > _before_ the WRITE is buffered and return -EACCES to the application."
> > 
> > Shouldn't rejecting the write attempt be the purview of the server?
> 
> The TGT lifetime is shared by the client and the server - it's the same, so I don't think we'd gain anything by doing that.
> 
> > 
> > It seems to me that we'd be best off just switching to synchronous
> > writes when we start approaching credential expiration, and letting the
> > server handle the case where the credential expires.
> 
> You mean switching to direct IO? I believe that means taking a different path in the VFS layer which I found difficult to do from nfs_write_begin. But maybe I just didn't see a good way to do this.

Synchronous I/O is a completely different concept than direct I/O.

For ordinary writes, making them synchronous basically involves calling
vfs_fsync() before returning from the write() syscall (see
nfs_file_write()).

For direct I/O, making it synchronous means ensuring that we do wait in
nfs_direct_wait().

For mmap(), things are a bit more tricky since the dirtying process
happens via a callback from the page fault. I'm not sure how you could
force that to be synchronous.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux