Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2121320imw; Sun, 17 Jul 2022 01:47:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHIrPehYVa04puckrq69ZwEhymSulWcWb2dCwKuogyDadO5pmfKOdCvKArLUoh+oDM4Ivk X-Received: by 2002:a63:6cc4:0:b0:408:b022:8222 with SMTP id h187-20020a636cc4000000b00408b0228222mr20385639pgc.435.1658047676644; Sun, 17 Jul 2022 01:47:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658047676; cv=none; d=google.com; s=arc-20160816; b=hA77pfbx7VemxjkKtT653F9DcRWPLVL+ff1txq83IIotbeKB39UqoWyP6Z501dAnMp mxt85atQWfRhJTj5UdHeI0OOLqci3cNBD6SMWa7KRARm7Gke9pt9glYEYlcUULbjzIdD giYXWzpSMBTbx3t4nmG3Rjll0MXHrJ0IYTw3K0v+6INYOJU7quhQjjlAxy+PxmcMyUyD ewNjrLR7vmgozNgMK0/BTtfMVyIOk/8r/oCNz/icZQRQUSYylt3NXr4jratJ9d4eL3R0 rQWQJpdeIJfsxMDaESfqMExrpKAEq17ClJZeinTguB/fQiZ1Ypk9vkNODVBzFFjeit3W BKtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ng6rzazS6Tk6UvbQ3R5jjWEIXMg8N4bQvPfxnlyfNbo=; b=yDtq3pfJiJFJTTuFwZj9cQkgK+BOOBjhl/px/DsSQgFmxUfOt/wZc7bGX4a5mGJXuJ eizUgfEQI54vmXd4qc7cb4pF1lXERio7vnyO7+XjSozP7EbQqvZ1v6YZuvb0GmcGSn+Y 170nmajRk6ZHlXoF2h3fvXEY66rgaRKaFg3gA5pOM/nPAcjwvtcAWQI+Rsj1+qMpxfS9 7x/s2K8lj22s/umbIp0gvyOHXi5yaQiE1Ftak/pYduOWg6eCsXEvgDAwQDuvaC7drura yQec3jFcDHaPrDPAZM6dVw+PgaP4kgL/Yz8KuZIsWZowfudEsoL1DtK6Hs25whIliA+P LL8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CmxKx+nQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a170903018800b00153b2d165f6si12919216plg.510.2022.07.17.01.47.42; Sun, 17 Jul 2022 01:47:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CmxKx+nQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbiGQIpE (ORCPT + 99 others); Sun, 17 Jul 2022 04:45:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231390AbiGQIpD (ORCPT ); Sun, 17 Jul 2022 04:45:03 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FCF819013 for ; Sun, 17 Jul 2022 01:45:01 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id q9so12812298wrd.8 for ; Sun, 17 Jul 2022 01:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ng6rzazS6Tk6UvbQ3R5jjWEIXMg8N4bQvPfxnlyfNbo=; b=CmxKx+nQvad3HTpNlJ+avnudMtN9Xm9fUthF9bwqnIyq4X2u5I1j5jJ291kh14HPOX hWcHS0gJKQyuWaTG8JR5BewIbjlvCzHQUf9ThjOi9vax59L8X7IOHcOnSUcUmO++MWMQ rw0hSi1NyV6t0l8nVrcpGoQs0DnW3cD58YkAc+YKINqm4+bqKGD3JyIxKM6E+FjkNO0L NAF04D/Rb9NJkS9CjbdJYHWw6uZT2ZXWJMiaHOHRGS76ccA+NqDeSftnSBQ6kojdeQeC RAXTnf7+jwyc1ff8/awsOdy71tRoHnTecbTPgwg3u+Oc46bithtxnCI30Q3QVbbAJrr9 fMFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ng6rzazS6Tk6UvbQ3R5jjWEIXMg8N4bQvPfxnlyfNbo=; b=OW7g5EvU4c9I7Tzwp9uBYIUFksZ5O8v9rlZk/+2y8e8ddgX1+DgZJcy7jegQhbnrBt ke3f8URI6CLu1sDir5MEsZpAfuiSReo3cY6Oh3d0ndcVh91D1jQbn3XBy7Bbx6YuJnWR ONbk7CSePgyQsT2hlS5BDWt+Sb93u00kbdJUv05Aipzqa8bZ8n8RU/271ZXN+GKd5nB1 vfxugm7oqWi0zrqTlJBirKmYfWOb3kBxX1A2NJr3gx8TIxQFjXiYmzd7oi8NLSRwLK12 k+sqQQhjxV2Y0DvhtFPU0Zw/W3MLmJx23euWnY3fVEaNC30Zuun/2X6idWNsfyNRfs22 wsng== X-Gm-Message-State: AJIora8rvhbiFG/jGXPmbvHsqSUnD+LINAGKLKc8n6iy+OsHaUV7adWz 4dgDRASe8qVNoPvuSgEHf7c= X-Received: by 2002:a05:6000:508:b0:21d:4105:caf9 with SMTP id a8-20020a056000050800b0021d4105caf9mr19435437wrf.699.1658047500076; Sun, 17 Jul 2022 01:45:00 -0700 (PDT) Received: from opensuse.localnet (host-95-235-102-55.retail.telecomitalia.it. [95.235.102.55]) by smtp.gmail.com with ESMTPSA id f2-20020a1c6a02000000b003a2e89d1fb5sm14360941wmc.42.2022.07.17.01.44.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 01:44:58 -0700 (PDT) From: "Fabio M. De Francesco" To: Christoph Hellwig Cc: Jaegeuk Kim , Chao Yu , Nick Terrell , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Ira Weiny Subject: Re: [PATCH] f2fs: Use memcpy_page() in f2fs_copy_page() Date: Sun, 17 Jul 2022 10:44:57 +0200 Message-ID: <4431767.LvFx2qVVIh@opensuse> In-Reply-To: References: <20220716204353.22049-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On domenica 17 luglio 2022 08:55:20 CEST Christoph Hellwig wrote: > On Sat, Jul 16, 2022 at 10:43:53PM +0200, Fabio M. De Francesco wrote: > > static inline void f2fs_copy_page(struct page *src, struct page *dst) > > { > > - char *src_kaddr = kmap(src); > > - char *dst_kaddr = kmap(dst); > > > > - memcpy(dst_kaddr, src_kaddr, PAGE_SIZE); > > - kunmap(dst); > > - kunmap(src); > > + memcpy_page(dst, 0, src, 0, PAGE_SIZE); > > Please remove f2fs_copy_page entirely and open code this in the only > caller. > I've changed the subject of the new patch, therefore we won't have a second version of this: "f2fs: Delete f2fs_copy_page() and replace with memcpy_page()" is at https://lore.kernel.org/lkml/20220717083613.3861-1-fmdefrancesco@gmail.com/ Thanks for your suggestion, Fabio