Hi,

On 05/06/2014 04:54 PM, Shuang Qiu wrote:
> Hello,
> On 02/25/2014 02:26 PM, Zeng Linggang wrote:
>> +
>> +    SAFE_TOUCH(cleanup, TEST_EMLINK, 0666, NULL);
>> +
>> +    while (1) {
>> +            sprintf(lname, "%s%ld", BASENAME, ++link_max);
>> +            TEST(link(TEST_EMLINK, lname));
>> +            if (TEST_RETURN == -1) {
>> +                    switch (TEST_ERRNO) {
>> +                    case EMLINK:
>> +                            tst_resm(TINFO, "for %s the max links is %ld",
>> +                                     fstype, link_max);
>> +                            break;
>> +                    default:
>> +                            tst_brkm(TBROK | TTERRNO, cleanup,
>> +                                     "Unexpected error: ");
>> +                            break;
>> +                    }
>> +                    break;
>> +            }
>> +    }
>> +}
>>
> Should it give a limit max number here when test EMLINK to handler the 
> filesystems which unlimited link count.
> AFAIK,it use 2^31 - 1 with xfs:
> /*
>   * The 32 bit link count in the inode theoretically maxes out at UINT_MAX.
>   * Since the pathconf interface is signed, we use 2^31 - 1 instead.
>   * The old inode format had a 16 bit link count, so its maximum is 
> USHRT_MAX.
>   */
> #define XFS_MAXLINK             ((1U << 31) - 1U)
> #define XFS_MAXLINK_1           65535U
>
> We are not able to reach such limitation.

Yeah, I think so.
Or we should make the file system hard coded to ext2/3/4.

Regards,
Xiaoguang Wang
>
> Thanks
> Shuang
>
> ------------------------------------------------------------------------------
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> &#149; 3 signs your SCM is hindering your productivity
> &#149; Requirements for releasing software faster
> &#149; Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> _______________________________________________
> Ltp-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ltp-list
>


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to