From: Eric Sandeen <sandeen@sandeen.net>
To: Lukas Czerner <lczerner@redhat.com>, linux-ext4@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 6/8] fsstress: translate flags in fiemap_f
Date: Fri, 28 Feb 2014 11:55:11 -0600 [thread overview]
Message-ID: <5310CD7F.7090902@sandeen.net> (raw)
In-Reply-To: <1393603865-26198-6-git-send-email-lczerner@redhat.com>
On 2/28/14, 10:11 AM, Lukas Czerner wrote:
> Translate flags in fiemap_f output to human readable strings.
This looks fine, w/ the caveats about translate_flags that I mentioned
on the earlier patch.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
> ltp/fsstress.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index 24864db..869a8ac 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -2252,6 +2252,18 @@ fdatasync_f(int opno, long r)
> free_pathname(&f);
> close(fd);
> }
> +
> +#ifdef HAVE_LINUX_FIEMAP_H
> +struct print_flags fiemap_flags[] = {
> + { FIEMAP_FLAG_SYNC, "SYNC"},
> + { FIEMAP_FLAG_XATTR, "XATTR"},
> + { -1, NULL}
> +};
> +
> +#define translate_fiemap_flags(mode) \
> + ({translate_flags(mode, "|", fiemap_flags);})
> +#endif
> +
> void
> fiemap_f(int opno, long r)
> {
> @@ -2314,9 +2326,10 @@ fiemap_f(int opno, long r)
>
> e = ioctl(fd, FS_IOC_FIEMAP, (unsigned long)fiemap);
> if (v)
> - printf("%d/%d: ioctl(FIEMAP) %s%s %lld %lld %x %d\n",
> + printf("%d/%d: ioctl(FIEMAP) %s%s %lld %lld (%s) %d\n",
> procid, opno, f.path, st, (long long)fiemap->fm_start,
> - (long long) fiemap->fm_length, fiemap->fm_flags, e);
> + (long long) fiemap->fm_length,
> + translate_fiemap_flags(fiemap->fm_flags), e);
> free(fiemap);
> free_pathname(&f);
> close(fd);
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-28 17:55 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 16:10 [PATCH 1/8] xfstests: Create single function for testing xfs_io commands Lukas Czerner
2014-02-28 16:10 ` Lukas Czerner
2014-02-28 16:10 ` [PATCH 2/8] xfstests: create _test_block_boundaries in common/punch Lukas Czerner
2014-02-28 16:10 ` Lukas Czerner
2014-02-28 16:11 ` [PATCH 3/8] generic/008: Add test for fallocate zero range at block boundary Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 16:11 ` [PATCH 4/8] xfstests: Move fallocate include into global.h Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 17:17 ` Eric Sandeen
2014-02-28 17:17 ` Eric Sandeen
2014-02-28 22:31 ` Dave Chinner
2014-02-28 22:31 ` Dave Chinner
2014-02-28 16:11 ` [PATCH 5/8] xfstests: Add fallocate zero range operation to fsstress Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 17:40 ` Eric Sandeen
2014-03-03 12:16 ` Lukáš Czerner
2014-03-03 12:16 ` Lukáš Czerner
2014-02-28 16:11 ` [PATCH 6/8] fsstress: translate flags in fiemap_f Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 17:55 ` Eric Sandeen [this message]
2014-02-28 16:11 ` [PATCH 7/8] xfstests: Add fallocate zero range operation to fsx Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 18:11 ` Eric Sandeen
2014-02-28 18:11 ` Eric Sandeen
2014-02-28 19:08 ` Andreas Dilger
2014-03-03 12:21 ` Lukáš Czerner
2014-02-28 16:11 ` [PATCH 8/8] ext4/001: Add ext4 specific test for fallocate zero range Lukas Czerner
2014-02-28 16:11 ` Lukas Czerner
2014-02-28 16:40 ` [PATCH 1/8] xfstests: Create single function for testing xfs_io commands Eric Sandeen
2014-02-28 16:51 ` Lukáš Czerner
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=5310CD7F.7090902@sandeen.net \
--to=sandeen@sandeen.net \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.