Return-Path: Date: Wed, 7 Dec 2016 08:30:26 -0800 From: Christoph Hellwig To: Benjamin Coddington Cc: Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org Subject: Re: [PATCH] NFS: Serialize nfs_readdir() Message-ID: <20161207163026.GA9166@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: List-ID: On Wed, Dec 07, 2016 at 08:37:02AM -0500, Benjamin Coddington wrote: > Optimizations to NFS to choose between READDIR and READDIRPLUS don't expect > concurrent users of nfs_readdir(), and can cause the pagecache to > repeatedly be invalidated unnecessarily for this case. Fix this by > serializing nfs_readdir() on the directory's rwsem. Just implement .iterate instead of .iterate_shared and you'll get the serialization for free. While doing that please add a comment on why it's serialized.