Hi!
> Note: int rename(const char *old, const char *new);
> For EMLINK error value test: the file named by old is a directory and the
> link count of the parent directory of new would exceed {LINK_MAX}.
>
> This test will work on ext2 and ext3 filesystem. But there is some difference
> in some
> linux distributions.
>
> For example, in fedora19 and RHEL7.0Beta, the kernel configs for
> ext2/ext3/ext4 filesystems
> list below:
> # CONFIG_EXT2_FS is not set
> # CONFIG_EXT3_FS is not set
> CONFIG_EXT4_FS=m
> CONFIG_EXT4_USE_FOR_EXT23=y
> CONFIG_EXT4_FS_POSIX_ACL=y
> CONFIG_EXT4_FS_SECURITY=y
>
> If kernel has the above config, ext2 or ext3 is disabled. Then when we mount
> ext2 or
> ext3 filesystem, the ext4 filesystem driver code will be used for ext2 or
> ext3 file
> system mounts. This allows users to reduce their compiled kernel size by
> using one
> file system driver for ext2, ext3, and ext4 file systems. That means though
> we mount
> a block device with ext2 filesystem in it, the kernel will possibely use ext4
> driver
> code instead.
>
> So for this EMLINK error value test, we have test in ext4 directly. But the
> max
> subdirectories(per directory) in ext4 is unlimited default(When the link
> count exceeds
> 65,000, it is reset to 1 and no longer increases.).
Is this expected behavior? Because if the ref counting resets to 1 the
fs will break when somebody tries to delete the file. Or is just the
number reported to userspace wrong?
> But EMLINK error value test need the directory have a valid LINK_MAX,
> so for ext4, we use mkfs to clear "dir_index" filesystem feature, then
> ext4 has a LINK_MAX:65000: mkfs.ext4 -O ^dir_index device
So this is the same problem as with XFS.
I still think that correct solution to this problem is to write a
function that detects if there is a limit on number of links given a
filesystem path. Then we can simply skip the EMLINK test if the number
of links is unlimited.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list