Re: still nfs problems [Was: Linux 2.6.37-rc8]

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trond Myklebust
Date: Thursday, December 30, 2010 - 12:25 pm

On Thu, 2010-12-30 at 10:50 -0800, Linus Torvalds wrote: 

uncached_readdir is not really a problem. The real problem is
filesystems that generate "infinite directories" by producing looping
combinations of cookies.

IOW: I've seen servers that generate cookies in a sequence of a form
vaguely resembling

1 2 3 4 5 6 7 8 9 10 11 12 3...

(with possibly a thousand or so entries between the first and second
copy of '3')

The kernel won't loop forever with something like that (because
eventually filldir() will declare it is out of buffer space), but
userland has a halting problem: it needs to detect that every
sys_getdents() call it is making is generating another copy of the
sequence associated with '4 5 6 7 8 9 10 11 12 3'...


We should never get an endless loop in _kernel mode_ with the current
scheme, and I can't see that anyone has demonstrated that yet.


Unfortunately we must. Call it an NFS protocol failure, but it really
boils down to the fact that POSIX readdir() generates a data stream with
no well-defined concept of an offset. As a result, each and every
filesystem has their own interesting ways of generating cookies to
represent that 'offset'.

Trond

-- 
Trond Myklebust
Linux NFS client maintainer

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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
still nfs problems [Was: Linux 2.6.37-rc8], Uwe Kleine-König, (Thu Dec 30, 10:14 am)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Linus Torvalds, (Thu Dec 30, 10:57 am)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Trond Myklebust, (Thu Dec 30, 10:59 am)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Trond Myklebust, (Thu Dec 30, 11:24 am)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Linus Torvalds, (Thu Dec 30, 11:50 am)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Uwe Kleine-König, (Thu Dec 30, 12:18 pm)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Trond Myklebust, (Thu Dec 30, 12:25 pm)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Linus Torvalds, (Thu Dec 30, 1:02 pm)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Uwe Kleine-König, (Mon Jan 3, 2:38 pm)
Re: still nfs problems [Was: Linux 2.6.37-rc8], Trond Myklebust, (Mon Jan 3, 5:22 pm)