From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbbCaWW4 (ORCPT ); Tue, 31 Mar 2015 18:22:56 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:45488 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbbCaWWw (ORCPT ); Tue, 31 Mar 2015 18:22:52 -0400 Date: Tue, 31 Mar 2015 23:22:48 +0100 From: Al Viro To: Christoph Hellwig Cc: Ming Lei , Jens Axboe , Linux Kernel Mailing List , Maxim Patlasov Subject: Re: [PATCH 0/3] block: loop: switch to VFS ITER_BVEC Message-ID: <20150331222247.GK29656@ZenIV.linux.org.uk> References: <1427012095-4095-1-git-send-email-ming.lei@canonical.com> <20150324103219.GD7002@lst.de> <20150324180104.GA11236@lst.de> <20150325152748.GB12366@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150325152748.GB12366@lst.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2015 at 04:27:48PM +0100, Christoph Hellwig wrote: > On Wed, Mar 25, 2015 at 03:23:48PM +0800, Ming Lei wrote: > > > - mm_segment_t old_fs = get_fs(); > > > + > > > + iov_iter_bvec(&i, ITER_BVEC, bvec, 1, bvec->bv_len); > > > > > > file_start_write(file); > > > - set_fs(get_ds()); > > > - bw = file->f_op->write(file, buf, len, &pos); > > > - set_fs(old_fs); > > > + bw = vfs_iter_write(file, &i, ppos); > > > > This patch moves to support ->read_iter/->write_iter only, which > > might cause regression for backing file without defining read/write > > iter callback. > > ->read_iter/->write_iter is the main fs I/O path - by the time this is > ready ->aio_read/->aio_write should be gone. Umm... FWIW, it's not about ->aio_write - that conversion is practically complete; nothing with ->aio_write != NULL is plausible for backing store of /dev/loop anyway. Regression in question is about the files that have ->write(), but no ->write_iter(). Most of that won't be usable as backing store, but there are some exceptions: * ncpfs regular files. Ought to be switched to {read,write}_iter - it's a pretty mechanical work, I'll do that. Only marginally useful, but what the hell - why not do it right? * coda. Ought to switch to ->..._iter() and demand _its_ backing store to have those. Trivial, will do. * 9p. Cthulhu-awful mess. The trouble is, we'd need to support ITER_BVEC ones down in p9_client_write(). I'm actually trying to do that right now; if it works, this regression will become a non-issue.