From: "Xin Zhao" Subject: Why NFS enforce size limit on readdirplus Date: Fri, 2 Jun 2006 01:54:45 -0400 Message-ID: <4ae3c140606012254i5fa92953rdd1ea229be9a02f9@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from wr-out-0506.google.com ([64.233.184.230]:2057 "EHLO wr-out-0506.google.com") by vger.kernel.org with ESMTP id S1751072AbWFBFyq (ORCPT ); Fri, 2 Jun 2006 01:54:46 -0400 Received: by wr-out-0506.google.com with SMTP id 50so438295wri for ; Thu, 01 Jun 2006 22:54:45 -0700 (PDT) To: linux-kernel Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Maybe this question is a little dumb. I am wondering why in NFS readdirplus can be used only for directories of size less than 8*PAGE_SIZE, otherwise, it will switch to use normal readdir? In nfs/inode.c, I noticed the following code: if (nfs_server_capable(inode, NFS_CAP_READDIRPLUS) && fattr->size <= NFS_LIMIT_READDIRPLUS) set_bit(NFS_INO_ADVISE_RDPLUS, &NFS_FLAGS(inode)); Can someone kindly explain the reason? Thanks a lot! Xin