From patchwork Mon Oct 31 19:33:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 13026290 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 4CC02FA3741 for ; Mon, 31 Oct 2022 19:34:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbiJaTeF (ORCPT ); Mon, 31 Oct 2022 15:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiJaTd6 (ORCPT ); Mon, 31 Oct 2022 15:33:58 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED0C513D2C for ; Mon, 31 Oct 2022 12:33:57 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 857641F45B; Mon, 31 Oct 2022 19:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1667244836; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PB656fbs8zEZy84sXm6lRLo/pMgC4WJ+8jjIyAjW3II=; b=gB5bvUEy4aSffbWMtY8Ih5xTHaiB/jyO32L2DYXXGihZaQROXxfnCJT9+KANDCkX02rXmL b+NK1utkUiIiHWUlcRAvsDJIlvyPFdkKLL8jwne2iKogJmPMVLqh0ZvAiJGrvLDXaAze4H IHK6YWm6AN9K26mJ1F6jrOvVbvyLAB8= Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 7D7842C141; Mon, 31 Oct 2022 19:33:56 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id 6787FDA79D; Mon, 31 Oct 2022 20:33:40 +0100 (CET) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba Subject: [PATCH 1/4] btrfs: zlib: use copy_page for full page copy Date: Mon, 31 Oct 2022 20:33:40 +0100 Message-Id: <5f5b4513ded109bd87c5aa5105608fa8363d72d2.1667244568.git.dsterba@suse.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The copy_page helper may use an optimized version for full page copy (eg. on s390 there's a special instruction for that), there's one more left to convert. Signed-off-by: David Sterba Reviewed-by: Anand Jain --- fs/btrfs/zlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c index b4f44662cda7..c5275cb23837 100644 --- a/fs/btrfs/zlib.c +++ b/fs/btrfs/zlib.c @@ -155,8 +155,8 @@ int zlib_compress_pages(struct list_head *ws, struct address_space *mapping, in_page = find_get_page(mapping, start >> PAGE_SHIFT); data_in = kmap_local_page(in_page); - memcpy(workspace->buf + i * PAGE_SIZE, - data_in, PAGE_SIZE); + copy_page(workspace->buf + i * PAGE_SIZE, + data_in); start += PAGE_SIZE; } workspace->strm.next_in = workspace->buf;