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

Previous thread: Where are the semantics of MSC_SCAN & MSC_RAW input events defined? by George Spelvin on Friday, December 31, 2010 - 5:51 pm. (1 message)

Next thread: Important mail from Mr David by David Blake on Friday, December 31, 2010 - 9:21 pm. (1 message)
From: George Spelvin
Date: Friday, December 31, 2010 - 6:03 pm

1) Look again; it's O(1) work per entry, or O(n) work for an n-entry
   directory.  And O(1) space.  With very small constant factors, and
   very little code.  The only thing exponentially increasing is the
   interval at which you save the current cookie for future comparison.
2) You said it *was* a problem, so it seemed worth presenting a
   practical solution.  If you don't think it's worth it, I'm not
   going to disagree.  But it's not impossible, or even difficult.
--

From: Trond Myklebust
Date: Friday, December 31, 2010 - 6:18 pm

Yes. I was thinking about it this morning (after coffee).

One variant on those algorithms that might make sense here is to save
the current cookie each time we see that the result of a cookie search
is a filp->f_pos offset < the current filp->f_pos offset. That means we
will in general only detect the loop after going through an entire
cycle, but that should be sufficient...

Trond

-- 
Trond Myklebust
Linux NFS client maintainer

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

--

Previous thread: Where are the semantics of MSC_SCAN & MSC_RAW input events defined? by George Spelvin on Friday, December 31, 2010 - 5:51 pm. (1 message)

Next thread: Important mail from Mr David by David Blake on Friday, December 31, 2010 - 9:21 pm. (1 message)