From: chrubis@suse.cz
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 16:47:40 +0200 [thread overview]
Message-ID: <20140506144740.GA7908@rei.Home> (raw)
In-Reply-To: <5368A32E.7070805@oracle.com>
Hi!
> > +
> > + 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.
If xfs has no limit or not reachable limit on number of links we should
skip the setup for EMLINK and return TCONF in the EMLINK test if xfs
filesystem is used.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• 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
next prev parent reply other threads:[~2014-05-06 14:48 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
2014-05-06 14:47 ` chrubis [this message]
[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=20140506144740.GA7908@rei.Home \
--to=chrubis@suse.cz \
--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