lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <495062D1.6010805@jp.fujitsu.com>
Date:	Tue, 23 Dec 2008 13:02:25 +0900
From:	Toshiyuki Okajima <toshi.okajima@...fujitsu.com>
To:	Zhang Xiliang <zhangxiliang@...fujitsu.com>
CC:	linux-ext4@...r.kernel.org
Subject: Re: Problems with the max value for create directory

Hi,

Zhang Xiliang wrote:
> Hi,
> 
> I creat 65537 long directories and failed when the block size is 1024.
> 
> # mkfs.ext4dev -b 1024 -I 256 /dev/hda3
> # tune2fs -E test_fs -O extents /dev/hda3
> # mount -t ext4dev /dev/hda3 /mnt
> # ./create_long_dirs 65537 /mnt
> 
> The code of create_long_dirs.c:

ext4 filesystem cannot make over 65000 links toward a file.
(ext3 filesystem cannot make over 32000 links toward a file.)
This test makes over 65000 links toward /mnt-directory.
(Creating 65000 sub-directories makes 65000 links toward /mnt-directory.)

static int ext4_mkdir(struct inode *dir, struct dentry *dentry, int mode)
{
          handle_t *handle;
          struct inode *inode;
          struct buffer_head *dir_block;
          struct ext4_dir_entry_2 *de;
          int err, retries = 0;

          if (EXT4_DIR_LINK_MAX(dir))
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^    
                  return -EMLINK;

This limit is ext4's specification.

Regards,
Toshiyuki Okajima

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ