public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 2/3] xfs_io: implement preadv for vectored reads
Date: Thu, 09 Aug 2012 15:08:49 -0500	[thread overview]
Message-ID: <502418D1.6040008@sgi.com> (raw)
In-Reply-To: <1343255450-28559-3-git-send-email-david@fromorbit.com>

On 07/25/12 17:30, Dave Chinner wrote:
> From: Dave Chinner<dchinner@redhat.com>
>
> When looking at KVM based direct IO patterns, I noticed that it was
> using preadv and pwritev, and I could not use xfs_io to simulate
> these IO patterns. Extend the pread command to be able to issue
> vectored read IO to enable use to simulate KVM style direct IO.
>
> Also document the new parameters as well as all the missing pread
> command parameters in the xfs_io(8) man page.
>
> Signed-off-by: Dave Chinner<dchinner@redhat.com>
> ---
  +int	vectors;
> +struct iovec *iov;
> +
> +static int
> +alloc_iovec(
> +	size_t		bsize,
> +	int		uflag,
> +	unsigned int	seed)
> +{
> +	int		i;
> +
> +	iov = calloc(vectors, sizeof(struct iovec));
> +	if (!iov)
> +		return -1;
> +
> +	buffersize = 0;
> +	for (i = 0; i<  vectors; i++) {
> +		iov[i].iov_base = memalign(pagesize, bsize);
                 ^^^^^
Okay, make sense.

> +		buffer = memalign(pagesize, bsize);
> +		if (!buffer) {
	        ^^^^^^

Here I am bit confused. Did you want to allocate to the buffer for the 
iovec case?

Thank-you,

Mark.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2012-08-09 20:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-25 22:30 [PATCH 0/3] xfs_io: new functions Dave Chinner
2012-07-25 22:30 ` [PATCH 1/3] xfs_io: add sync_file_range support Dave Chinner
2012-07-28 23:56   ` Christoph Hellwig
2012-07-25 22:30 ` [PATCH 2/3] xfs_io: implement preadv for vectored reads Dave Chinner
2012-07-28 23:57   ` Christoph Hellwig
2012-08-09 20:08   ` Mark Tinguely [this message]
2012-07-25 22:30 ` [PATCH 3/3] xfs_io: implement pwritev for vectored writes Dave Chinner
2012-07-28 23:57   ` Christoph Hellwig
2012-09-24 21:51 ` [PATCH 0/3] xfs_io: new functions Mark Tinguely
2012-10-09 19:07   ` Eric Sandeen
2012-10-09 20:47     ` Mark Tinguely
2012-10-09 20:51       ` Eric Sandeen
2012-10-09 21:53         ` Mark Tinguely

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=502418D1.6040008@sgi.com \
    --to=tinguely@sgi.com \
    --cc=david@fromorbit.com \
    --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