From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64563C001DF for ; Mon, 24 Jul 2023 15:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbjGXP4O (ORCPT ); Mon, 24 Jul 2023 11:56:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjGXP4M (ORCPT ); Mon, 24 Jul 2023 11:56:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27ADF8E; Mon, 24 Jul 2023 08:56:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A3A5261231; Mon, 24 Jul 2023 15:56:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03878C433C8; Mon, 24 Jul 2023 15:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690214171; bh=/aFTmn5z1V6emeV4oYUCR+s8o3isT1XhkAue3pePv6o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p78V6weFFOtwros4/l7SxkdjW5dhv++5GPTrCbshCiBEQiuavCKJ/Zhw0Jrat37Fu yqrNCz2BVc4foHI+2RuZNfyoTo0nNwNsTdCnSenuPcKHP7vL1etAreh8x3/LDkk47C BO5BJA+IQGUQBNPx6/XKU4RskPPDDULEKru5I0dlFNVE8qI3Ja7THauJsFyN4npweW fbhw+CMlCl3b5qhDSYBuSxfcJsJN4PrEMm0ajwfoBw3BtWKfMlpHxoAzwK4rtfTbi4 +bu9nOIYzm/EXQnbAJbyT7ik5lIS+36sU/8/vvzL8JWOd30/+PuXAyKBiUPAAPQy3h y1ZrFatHvsb/A== Date: Mon, 24 Jul 2023 08:56:10 -0700 From: "Darrick J. Wong" To: "Matthew Wilcox (Oracle)" Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, Wang Yugui , Dave Chinner , Christoph Hellwig , Kent Overstreet Subject: Re: [PATCH v4 2/9] iov_iter: Add copy_folio_from_iter_atomic() Message-ID: <20230724155610.GA11336@frogsfrogsfrogs> References: <20230710130253.3484695-1-willy@infradead.org> <20230710130253.3484695-3-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230710130253.3484695-3-willy@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Jul 10, 2023 at 02:02:46PM +0100, Matthew Wilcox (Oracle) wrote: > Add a folio wrapper around copy_page_from_iter_atomic(). > > Signed-off-by: Matthew Wilcox (Oracle) Wellllll crap. I got all ready to push this to for-next, but then my maintainer checkpatch interlock scripts pointed out that this commit doesn't have /any/ RVB attached to it. Apparently I forgot to tag this one when I went through all this. Matthew, can you please add: Reviewed-by: Darrick J. Wong and redo the whole branch-push and pull-request dance, please? (Also could you put a sob tag on the tag message so that the merge commit can have full authorship details?) --D > --- > include/linux/uio.h | 9 ++++++++- > lib/iov_iter.c | 2 +- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/include/linux/uio.h b/include/linux/uio.h > index ff81e5ccaef2..42bce38a8e87 100644 > --- a/include/linux/uio.h > +++ b/include/linux/uio.h > @@ -163,7 +163,7 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs) > return ret; > } > > -size_t copy_page_from_iter_atomic(struct page *page, unsigned offset, > +size_t copy_page_from_iter_atomic(struct page *page, size_t offset, > size_t bytes, struct iov_iter *i); > void iov_iter_advance(struct iov_iter *i, size_t bytes); > void iov_iter_revert(struct iov_iter *i, size_t bytes); > @@ -184,6 +184,13 @@ static inline size_t copy_folio_to_iter(struct folio *folio, size_t offset, > { > return copy_page_to_iter(&folio->page, offset, bytes, i); > } > + > +static inline size_t copy_folio_from_iter_atomic(struct folio *folio, > + size_t offset, size_t bytes, struct iov_iter *i) > +{ > + return copy_page_from_iter_atomic(&folio->page, offset, bytes, i); > +} > + > size_t copy_page_to_iter_nofault(struct page *page, unsigned offset, > size_t bytes, struct iov_iter *i); > > diff --git a/lib/iov_iter.c b/lib/iov_iter.c > index c728b6e4fb18..8da566a549ad 100644 > --- a/lib/iov_iter.c > +++ b/lib/iov_iter.c > @@ -566,7 +566,7 @@ size_t iov_iter_zero(size_t bytes, struct iov_iter *i) > } > EXPORT_SYMBOL(iov_iter_zero); > > -size_t copy_page_from_iter_atomic(struct page *page, unsigned offset, > +size_t copy_page_from_iter_atomic(struct page *page, size_t offset, > size_t bytes, struct iov_iter *i) > { > size_t n, copied = 0; > -- > 2.39.2 >