From mboxrd@z Thu Jan 1 00:00:00 1970 From: Badari Pulavarty Subject: Re: [PATCH 1/3] Vectorize aio_read/aio_write methods Date: Sat, 04 Feb 2006 14:10:10 -0800 Message-ID: <43E52642.9040104@us.ibm.com> References: <1138896758.28382.112.camel@dyn9047017102.beaverton.ibm.com> <1138896879.28382.114.camel@dyn9047017102.beaverton.ibm.com> <20060204132838.GA29549@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Benjamin LaHaise , Zach Brown , lkml , linux-fsdevel Return-path: Received: from e4.ny.us.ibm.com ([32.97.182.144]:9957 "EHLO e4.ny.us.ibm.com") by vger.kernel.org with ESMTP id S1030180AbWBDWKM (ORCPT ); Sat, 4 Feb 2006 17:10:12 -0500 To: Christoph Hellwig In-Reply-To: <20060204132838.GA29549@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Christoph Hellwig wrote: > 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?) I left that intentionally alone. I was planning to make it a special case of Zach's vector IO handling code. Thanks, Badari