From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH V2] xfstests: get fsstress DIO working on non-xfs filesystems
Date: Thu, 10 Oct 2013 14:20:23 +1100 [thread overview]
Message-ID: <20131010032023.GU4446@dastard> (raw)
In-Reply-To: <5256175C.6020000@sandeen.net>
On Wed, Oct 09, 2013 at 09:56:28PM -0500, Eric Sandeen wrote:
> Pretty sure all DIO IO fails in fsstress today since XFS_IOC_DIOINFO
> fails. If so, rather than just bailing out on the op, assign
> some sane default DIO parameters, getting min IO size from
> sector size if possible.
>
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---
>
> V2: factor out get_alignment, use BLKSSZGET for min DIO size
> rather than guessing at 512.
>
>
> diff --git a/ltp/fsstress.c b/ltp/fsstress.c
> index 5d5611f..af06059 100644
> --- a/ltp/fsstress.c
> +++ b/ltp/fsstress.c
> @@ -550,6 +550,27 @@ int main(int argc, char **argv)
> return 0;
> }
>
> +/*
> + * Get alignment via XFS_IOC_DIOINFO, else fall back to
> + * best guess from BLKSSZGET, else return -1.
> + */
> +static int
> +get_alignment(pathname_t *f, int fd, struct dioattr *dio)
> +{
> + if (xfsctl(f->path, fd, XFS_IOC_DIOINFO, dio) < 0) {
> + int sectorsize;
> +
> + if (ioctl(fd, BLKSSZGET, §orsize) < 0)
> + return -1;
> +
> + dio->d_maxiosz = -1U;
> + dio->d_miniosz = sectorsize;
> + dio->d_mem = sectorsize;
To be safe, shouldn't we align d_mem to page size given it is the
alignment of the data within the user page, not the alignment of the
offset of the IO?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2013-10-10 3:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 20:46 [PATCH] xfsteststs: get fsstress DIO working on non-xfs filesystems Eric Sandeen
2010-01-19 1:08 ` Dave Chinner
2010-01-19 9:13 ` Christoph Hellwig
2013-10-10 2:56 ` [PATCH V2] xfstests: " Eric Sandeen
2013-10-10 3:20 ` Dave Chinner [this message]
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=20131010032023.GU4446@dastard \
--to=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox