linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Benjamin LaHaise <bcrl@kvack.org>,
	Zach Brown <zach.brown@oracle.com>,
	lkml <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/3] Vectorize aio_read/aio_write methods
Date: Sat, 4 Feb 2006 13:28:38 +0000	[thread overview]
Message-ID: <20060204132838.GA29549@infradead.org> (raw)
In-Reply-To: <1138896879.28382.114.camel@dyn9047017102.beaverton.ibm.com>

 	do {
-		ret = file->f_op->aio_read(iocb, iocb->ki_buf,
-			iocb->ki_left, iocb->ki_pos);
+		struct iovec iov = {
+			.iov_base = iocb->ki_buf,
+			.iov_len = iocb->ki_left
+		};
+
+		ret = file->f_op->aio_read(iocb, &iov, 1, iocb->ki_pos);

this still has the lifetime problems Ben pointed out.  aio might still
be outstanding when this thread returned to userspace, so we need to
dynamically allocated the iovec and free it later.  (or make it part
of the iocb?)


  reply	other threads:[~2006-02-04 13:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02 16:12 [PATCH 0/3] VFS changes to collapse all the vectored and AIO support Badari Pulavarty
2006-02-02 16:14 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-02-04 13:28   ` Christoph Hellwig [this message]
2006-02-04 22:10     ` Badari Pulavarty
2006-02-02 16:15 ` [PATCH 2/3] Remove readv/writev methods and use aio_read/aio_write instead Badari Pulavarty
2006-02-02 16:16 ` [PATCH 3/3] Zack's core aio changes to support vectored AIO Badari Pulavarty
  -- strict thread matches above, loose matches on Subject: below --
2006-03-08  0:19 [RFC PATCH 0/3] VFS changes to collapse all the vectored and AIO support Badari Pulavarty
2006-03-08  0:22 ` [PATCH 1/3] Vectorize aio_read/aio_write methods Badari Pulavarty
2006-03-08 12:44   ` christoph

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=20060204132838.GA29549@infradead.org \
    --to=hch@infradead.org \
    --cc=bcrl@kvack.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    --cc=zach.brown@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;
as well as URLs for NNTP newsgroup(s).