From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbbDELFT (ORCPT ); Sun, 5 Apr 2015 07:05:19 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:35828 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752559AbbDELFM (ORCPT ); Sun, 5 Apr 2015 07:05:12 -0400 From: Dmitry Monakhov To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 02/16] vfs: check kiocb->ki_flags instead filp->fl_flags In-Reply-To: <20150404213621.GH889@ZenIV.linux.org.uk> References: <1428174805-853-1-git-send-email-dmonakhov@openvz.org> <1428174805-853-3-git-send-email-dmonakhov@openvz.org> <20150404213621.GH889@ZenIV.linux.org.uk> User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Sun, 05 Apr 2015 14:03:22 +0300 Message-ID: <871tjy96rp.fsf@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Al Viro writes: > On Sat, Apr 04, 2015 at 11:13:11PM +0400, Dmitry Monakhov wrote: >> generic_write_checks now accept kiocb as an argument >> Unfortunetly it is impossible to get rid of old interface because some crappy >> do not support write_iter interface so leave __generic_write_checks as backward >> compatibility helper. > > Check the current vfs.git#for-next (there's even some generic_write_checks() > work in it). The same goes for the rest of the series. Please, rebase it. Ok. Yes you right. I've prepared patches against vfs.git#for-next(48a0c62) but it is too old. Will rebase. Also it is reasonable to fold my fs-xxx conversion to one combo patch similar to (d04cfe7840) > > What's more, generic_write_checks() should take iov_iter *, not the address > of something its ->count had been copied into. Note that all callers of that > thing end up doing iov_iter_truncate() pretty soon afterwards. I hadn't > pushed that one out yet (there is some weirdness in ocfs2 which might be > a bug; I want to sort that out first), but that's where it's going. I'm not sure I have get your point about ocfs2 because it does iov_iter_truncate() right after generic_write_checks() But nfs definitely has a bug because iter was not truncated after generic_write_checks ->nfs_file_direct_write ->generic_write_checks(file, &pos, &count); dreq->bytes_left = count; task_io_account_write(count); ->nfs_direct_write_schedule_iovec(dreq, iter, pos); ###Ignore dreq->bytes_left(ala count) and submit non truncated iter > -- > 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/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJVIRZ6AAoJELhyPTmIL6kBxGkIAKP7SfJU4kegC9oG9rgM47LU npVDIey83CQdsoJGNogDed4lekzbWwFlDPdFvbEHS5MsK9WioqrvOtrNEUziz2u7 gnhYaQNmFKY1sqLcmwSLyOFtbcHpw5O/6qRWLbQZYLgfugyDnZy/A5g0wrjDr+Wv EL1p00ye7bsUa6j7XTf4VJ3DxWq7ODiiITPxEJ1SYgdYTLduh0NeKfchcbff675/ 3xt5PAksejQOAE/xoRQbUVe52C5EwRVjnHabDn0MXlT8fQG/Gt3UOC+JOYgaH5Y/ k0frxphrtcnqQ6oEcqvcCMX1ieBghPpckTvCWJyIf8Ql//lQ1rr+UobseyZHQ0Y= =Lm/v -----END PGP SIGNATURE----- --=-=-=--