public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
To: Shuang Qiu <shuang.qiu@oracle.com>
Cc: ltp-list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH v3] linkat/linkat02.c: add new error number tests
Date: Tue, 6 May 2014 18:01:55 +0800	[thread overview]
Message-ID: <5368B313.4010201@cn.fujitsu.com> (raw)
In-Reply-To: <5368A32E.7070805@oracle.com>

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
> Ltp-list@lists.sourceforge.net
> 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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-05-06 10:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 11:29 [LTP] [PATCH] linkat/linkat02.c: add new error number tests Zeng Linggang
2014-01-11  3:13 ` [LTP] [PATCH v2] " Zeng Linggang
2014-02-24 19:33   ` chrubis
     [not found]     ` <1393309618.1952.52.camel@G08JYZSD130126>
2014-02-25 12:53       ` [LTP] [PATCH v3] " chrubis
2014-05-06  8:54       ` Shuang Qiu
2014-05-06 10:01         ` Xiaoguang Wang [this message]
2014-05-06 14:47         ` chrubis
     [not found]           ` <1399450341.2397.16.camel@G08JYZSD130126>
2014-05-07 12:27             ` [LTP] [PATCH 2/2] linkat/linkat02.c: fix xfs with EMLINK issue chrubis
     [not found]               ` <1399517273.2102.8.camel@G08JYZSD130126>
2014-05-13 11:46                 ` chrubis
     [not found]                   ` <1400048364.2768.1.camel@G08JYZSD130126>
2014-05-14 16:02                     ` [LTP] [PATCH v2] " chrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5368B313.4010201@cn.fujitsu.com \
    --to=wangxg.fnst@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=shuang.qiu@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox