From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/3] Vectorize aio_read/aio_write methods Date: Sat, 4 Feb 2006 13:28:38 +0000 Message-ID: <20060204132838.GA29549@infradead.org> References: <1138896758.28382.112.camel@dyn9047017102.beaverton.ibm.com> <1138896879.28382.114.camel@dyn9047017102.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Benjamin LaHaise , Zach Brown , lkml , linux-fsdevel Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:38083 "EHLO pentafluge.infradead.org") by vger.kernel.org with ESMTP id S1751493AbWBDN2o (ORCPT ); Sat, 4 Feb 2006 08:28:44 -0500 To: Badari Pulavarty Content-Disposition: inline In-Reply-To: <1138896879.28382.114.camel@dyn9047017102.beaverton.ibm.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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?)