linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why NFS enforce size limit on readdirplus
@ 2006-06-02  5:54 Xin Zhao
  2006-06-02 18:44 ` Trond Myklebust
  0 siblings, 1 reply; 2+ messages in thread
From: Xin Zhao @ 2006-06-02  5:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-fsdevel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Why NFS enforce size limit on readdirplus
  2006-06-02  5:54 Why NFS enforce size limit on readdirplus Xin Zhao
@ 2006-06-02 18:44 ` Trond Myklebust
  0 siblings, 0 replies; 2+ messages in thread
From: Trond Myklebust @ 2006-06-02 18:44 UTC (permalink / raw)
  To: Xin Zhao; +Cc: linux-kernel, linux-fsdevel

On Fri, 2006-06-02 at 01:54 -0400, Xin Zhao wrote:
> 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?

Efficiency: READDIRPLUS requires a lookup for each entry. If there are
too many entries, the whole thing gets really really slow...

Cheers,
  Trond


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-02 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02  5:54 Why NFS enforce size limit on readdirplus Xin Zhao
2006-06-02 18:44 ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).