From: Amir Goldstein <amir73il@gmail.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Eryu Guan <guaneryu@gmail.com>,
linux-xfs <linux-xfs@vger.kernel.org>,
fstests <fstests@vger.kernel.org>,
Deepa Dinamani <deepa.kernel@gmail.com>
Subject: Re: [PATCH 3/4] xfs: detect time limits from filesystem
Date: Thu, 29 Oct 2020 12:47:32 +0200 [thread overview]
Message-ID: <CAOQ4uxhNpej-U-7NjA1VuU3OH=ttT7npwYrzODqThdta5Qka1A@mail.gmail.com> (raw)
In-Reply-To: <160382545348.1203848.12227735405144915534.stgit@magnolia>
On Wed, Oct 28, 2020 at 10:24 PM Darrick J. Wong
<darrick.wong@oracle.com> wrote:
>
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Teach fstests to extract timestamp limits of a filesystem using the new
> xfs_db timelimit command.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> common/rc | 2 +-
> common/xfs | 14 ++++++++++++++
> tests/xfs/911 | 44 ++++++++++++++++++++++++++++++++++++++++++++
> tests/xfs/911.out | 15 +++++++++++++++
> tests/xfs/group | 1 +
> 5 files changed, 75 insertions(+), 1 deletion(-)
> create mode 100755 tests/xfs/911
> create mode 100644 tests/xfs/911.out
>
>
> diff --git a/common/rc b/common/rc
> index 41f93047..162d957a 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2029,7 +2029,7 @@ _filesystem_timestamp_range()
> echo "0 $u32max"
> ;;
> xfs)
> - echo "$s32min $s32max"
> + _xfs_timestamp_range "$device"
> ;;
> btrfs)
> echo "$s64min $s64max"
> diff --git a/common/xfs b/common/xfs
> index e548a0a1..19ccee03 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -994,3 +994,17 @@ _require_xfs_scratch_inobtcount()
> _notrun "inobtcount not supported by scratch filesystem type: $FSTYP"
> _scratch_unmount
> }
> +
> +_xfs_timestamp_range()
> +{
> + local use_db=0
> + local dbprog="$XFS_DB_PROG $device"
> + test "$device" = "$SCRATCH_DEV" && dbprog=_scratch_xfs_db
> +
> + $dbprog -f -c 'help timelimit' | grep -v -q 'not found' && use_db=1
> + if [ $use_db -eq 0 ]; then
> + echo "-$((1<<31)) $(((1<<31)-1))"
This embodies an assumption that the tested filesystem does not have
bigtime enabled if xfs_db tool is not uptodate.
Maybe it makes sense, but it may be safer to return "-1 -1" and not_run
generic/402 if xfs_db is not uptodate, perhaps with an extra message
hinting the user to upgrade xfs_db.
Thanks,
Amir.
next prev parent reply other threads:[~2020-10-29 10:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-27 19:03 [PATCH RFC v6 0/4] xfstests: widen timestamps to deal with y2038+ Darrick J. Wong
2020-10-27 19:04 ` [PATCH 1/4] generic: check userspace handling of extreme timestamps Darrick J. Wong
2020-10-29 10:34 ` Amir Goldstein
2020-10-29 21:00 ` Darrick J. Wong
2020-10-29 21:40 ` Amir Goldstein
2020-10-29 21:59 ` Darrick J. Wong
2020-10-27 19:04 ` [PATCH 2/4] xfs/122: add legacy timestamps to ondisk checker Darrick J. Wong
2020-10-29 11:28 ` Amir Goldstein
2020-10-29 18:28 ` Darrick J. Wong
2020-10-27 19:04 ` [PATCH 3/4] xfs: detect time limits from filesystem Darrick J. Wong
2020-10-29 10:47 ` Amir Goldstein [this message]
2020-10-29 18:27 ` Darrick J. Wong
2020-10-29 18:56 ` Amir Goldstein
2020-10-27 19:04 ` [PATCH 4/4] xfs: test upgrading filesystem to bigtime Darrick J. Wong
2020-10-29 13:06 ` Amir Goldstein
2020-10-29 18:22 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2021-04-21 0:23 [PATCHSET v4 0/4] fstests: widen timestamps to deal with y2038+ Darrick J. Wong
2021-04-21 0:23 ` [PATCH 3/4] xfs: detect time limits from filesystem Darrick J. Wong
2021-04-22 21:16 ` Allison Henderson
2021-03-31 1:08 [PATCHSET 0/4] fstests: widen timestamps to deal with y2038+ Darrick J. Wong
2021-03-31 1:08 ` [PATCH 3/4] xfs: detect time limits from filesystem Darrick J. Wong
2020-08-17 23:00 [PATCH RFC 0/4] xfstests: widen timestamps to deal with y2038 Darrick J. Wong
2020-08-17 23:01 ` [PATCH 3/4] xfs: detect time limits from filesystem Darrick J. Wong
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='CAOQ4uxhNpej-U-7NjA1VuU3OH=ttT7npwYrzODqThdta5Qka1A@mail.gmail.com' \
--to=amir73il@gmail.com \
--cc=darrick.wong@oracle.com \
--cc=deepa.kernel@gmail.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).