Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932066AbXAPDYN (ORCPT ); Mon, 15 Jan 2007 22:24:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751517AbXAPDYN (ORCPT ); Mon, 15 Jan 2007 22:24:13 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:53865 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751459AbXAPDYM (ORCPT ); Mon, 15 Jan 2007 22:24:12 -0500 Date: Tue, 16 Jan 2007 03:23:47 +0000 From: Christoph Hellwig To: Nate Diller Cc: Nate Diller , Andrew Morton , Alan Cox , Trond Myklebust , Benjamin LaHaise , Alexander Viro , Suparna Bhattacharya , Kenneth W Chen , David Brownell , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-aio@kvack.org, xfs-masters@oss.sgi.com Subject: Re: [PATCH -mm 0/10][RFC] aio: make struct kiocb private Message-ID: <20070116032347.GA3697@infradead.org> Mail-Followup-To: Christoph Hellwig , Nate Diller , Nate Diller , Andrew Morton , Alan Cox , Trond Myklebust , Benjamin LaHaise , Alexander Viro , Suparna Bhattacharya , Kenneth W Chen , David Brownell , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-aio@kvack.org, xfs-masters@oss.sgi.com References: <20070116015450.9764.37697.patchbomb.py@nate-64.agami.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070116015450.9764.37697.patchbomb.py@nate-64.agami.com> User-Agent: Mutt/1.4.2.2i X-SRS-Rewrite: SMTP reverse-path rewritten from by pentafluge.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1642 Lines: 30 On Mon, Jan 15, 2007 at 05:54:50PM -0800, Nate Diller wrote: > This series is an attempt to generalize the async I/O paths to be > implementation agnostic. It completely eliminates knowledge of > the kiocb structure in the generic code and makes it private within the > current aio code. Things get noticeably cleaner without that layering > violation. > > The new interface takes a file_endio_t function pointer, and a private data > pointer, which would normally be aio_complete and a kiocb pointer, > respectively. If the aio submission function gets back EIOCBQUEUED, that is > a guarantee that the endio function will be called, or *already has been > called*. If the file_endio_t pointer provided to aio_[read|write] is NULL, > the FS must block on I/O completion, then return either the number of bytes > read, or an error. I don't really like this patchet at all. At some point it's a lot nicer to have a lot of paramaters that are related and passed down a long callchain into a structure, and I think the aio code is over that threshold. The completion function cleanups look okay to me, but I'd rather add that completion function to struct kiocb instead of removing kiocb use. I have this slight feeling you want to use this completions for something else than the current aio code, if that's the case it would help if you could explain briefly in what direction your heading. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/