[Ocfs2-users] Lots of questions & lustre

Jeffrey W. Baker jwbaker at acm.org
Mon Aug 8 13:20:38 CDT 2005


On Mon, 2005-08-08 at 10:54 -0700, Sunil Mushran wrote:
> Jeffrey W. Baker wrote:
> 
> >I ask this question because ext2/ext3 have a limit of 32,000
> >subdirectories.
> >
> >  
> >
> Yes, we have the same limit.... considering the directory handling
> in ocfs2 is based upon ext2/3's. :)
> 
>  #define OCFS2_LINK_MAX          32000
> 
>       if (S_ISDIR(mode) && (dir->i_nlink >= OCFS2_LINK_MAX)) {
>                 mlog(ML_ERROR, "inode %"MLFu64" has i_nlink of %u\n",
>                      OCFS2_I(dir)->ip_blkno, dir->i_nlink);
>                 status = -EMLINK;
>                 goto leave;
>         }
> 
> However, we could safely bump the number to 65000 as i_nlink is u16
> in ocfs2.

You might consider borrowing the patch from Lustre that allows them to
have unlimited subdirectory entries (in versions higher than 1.2.6).
Lustre is also based on ext3.

Any hard limit on subdirectories will eventually be annoying to at least
some of your users.

-jwb


More information about the Ocfs2-users mailing list