From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v2 1/4] aio: add aio_kernel_() interface Date: Mon, 26 Jan 2015 09:00:48 -0800 Message-ID: <20150126170048.GA2080@infradead.org> References: <1421163888-21452-1-git-send-email-ming.lei@canonical.com> <1421163888-21452-2-git-send-email-ming.lei@canonical.com> <20150125133147.GA19445@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Linux Kernel Mailing List , Dave Kleikamp , Jens Axboe , Zach Brown , Maxim Patlasov , Andrew Morton , Alexander Viro , Benjamin LaHaise , Linux FS Devel , "open list:AIO" To: Ming Lei Return-path: Received: from bombadil.infradead.org ([198.137.202.9]:53587 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719AbbAZRAs (ORCPT ); Mon, 26 Jan 2015 12:00:48 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jan 27, 2015 at 12:18:23AM +0800, Ming Lei wrote: > > Also it might make sense to just offer aio_kernel_read/write intefaces > > instead of the common submit wrapper, as that's much closer to other > > kernel APIs, e.g. > > > > int aio_kernel_read(struct kiocb *iocb, struct file *file, > > struct iov_iter *iter, loff_t off, > > void (*complete)(struct kiocb *iocb, long res)); > > int aio_kernel_write(struct kiocb *iocb, struct file *file, > > struct iov_iter *iter, loff_t off, > > void (*complete)(struct kiocb *iocb, long res)); > > It is like style of sync APIs, looks submit/complete is common > for async APIs, like io_submit(). io_submit is a fairly horrible API. While Posix AIO isn't too much better it does have separate APIs for read/write. Given that there isn't much code shared I'd keep an API that feels familar.