From patchwork Sat May 28 15:00:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?R=C3=BCdiger_Meier?= X-Patchwork-Id: 826212 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4SEwYFP011752 for ; Sat, 28 May 2011 15:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753518Ab1E1PAe (ORCPT ); Sat, 28 May 2011 11:00:34 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:44366 "HELO mailout-de.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753489Ab1E1PAe convert rfc822-to-8bit (ORCPT ); Sat, 28 May 2011 11:00:34 -0400 Received: (qmail invoked by alias); 28 May 2011 15:00:31 -0000 Received: from dslb-088-073-112-156.pools.arcor-ip.net (EHLO dslb-088-073-112-156.pools.arcor-ip.net) [88.73.112.156] by mail.gmx.net (mp062) with SMTP; 28 May 2011 17:00:31 +0200 X-Authenticated: #11967524 X-Provags-ID: V01U2FsdGVkX1/JdlwbehzJWt9VB6BFYYOjszARLM/i/K28HPmXmv B93ZO13YruhcZy From: =?iso-8859-1?q?R=FCdiger_Meier?= To: linux-nfs@vger.kernel.org Subject: Re: infinite getdents64 loop Date: Sat, 28 May 2011 17:00:29 +0200 User-Agent: KMail/1.9.10 References: <201105281502.32719.sweet_f_a@gmx.de> In-Reply-To: <201105281502.32719.sweet_f_a@gmx.de> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201105281700.30726.sweet_f_a@gmx.de> X-Y-GMX-Trusted: 0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 28 May 2011 15:00:35 +0000 (UTC) On Saturday 28 May 2011, RĂ¼diger Meier wrote: > I could track down the problem to: > > commit 0b26a0bf6ff398185546432420bb772bcfdf8d94 > Author: Trond Myklebust > Date: Sat Nov 20 14:26:44 2010 -0500 > > NFS: Ensure we return the dirent->d_type when it is known > > > After reverting the problem is gone. Actually it's enough to remove d_type from struct nfs_cache_array_entry again. It's not enough to set it DT_UNKNOWN always. I had to remove it from struct to let it work. Tested with kernels 2.6.37.6 and 2.6.39. commit c9799af304af2a22acffaae25e7e9c3b733a5b68 Author: Ruediger Meier Date: Sat May 28 15:26:15 2011 +0200 hotfix, opensuse bug 678123 this reverts the effect of 0b26a0bf if (ret) goto out; @@ -770,7 +768,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, ent = &array->array[i]; if (filldir(dirent, ent->string.name, ent->string.len, file->f_pos, nfs_compat_user_ino64(ent->ino), - ent->d_type) < 0) { + DT_UNKNOWN) < 0) { desc->eof = 1; break; } --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 7237672..48cfc27 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -202,7 +202,6 @@ struct nfs_cache_array_entry { u64 cookie; u64 ino; struct qstr string; - unsigned char d_type; }; struct nfs_cache_array { @@ -305,7 +304,6 @@ int nfs_readdir_add_to_array(struct nfs_entry *entry, struct page *page) cache_entry->cookie = entry->prev_cookie; cache_entry->ino = entry->ino; - cache_entry->d_type = entry->d_type; ret = nfs_readdir_make_qstr(&cache_entry->string, entry->name, entry->len);