Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1242356lfc; Wed, 1 Jun 2022 12:51:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYtdIOsVPMqEYRGrTZ6kS4oBT9uaN+PGVvE+XzJed9U/njCoQH391tTJ6y69TmuyL/1RN3 X-Received: by 2002:a63:84c3:0:b0:3fc:87ff:cdfa with SMTP id k186-20020a6384c3000000b003fc87ffcdfamr858016pgd.460.1654113060344; Wed, 01 Jun 2022 12:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113060; cv=none; d=google.com; s=arc-20160816; b=RwI9CY4GsTx39l2MCT3ho88jtTQ5LiGnkbLbCn7CCCCDVjfp72AORyMcNjnqpTxSAU S4dAWxlwvw+5ybdtSVlj1KQYX0DfxvSaOVChoiQvQ72w8DDF7XnEjKPLZeWB817x7d7Y nQ27GMdfFhMOaBODsi+rjM3FTQ4M5uI/Cx9wt4cO/NTVD5P7pZ9I5cAf4cT8Hpj9/iF9 uT98YnuHK8JPv5ULDVX4+J3moYLH9y7/8V5QwLD3krWRfhUfuTRYra6rIbuo/4UMZv8s BT7kDyUxg9riZ1BENzrrFfj1+1f/g7nAAjm47R4CoN+Imp0groDL5kuO+jYJGJ59x3ld 4BpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=AgVnwmFym81i9mNHrlcOn2tQIACC8qJ2aaxzi3vn4LM=; b=KRfV1Oaep/4cPN0fhRoMEAIbBY/5aKAhLVFTmQsKG/4wHcNWakFuHdEV11CoSB4yfN ZfcELTZYwAe/QY2ZVroP+Iujj/7Jt9oDGrUwrEhXdpiU1a4FTdRSYCEg0JaiN2IENdgO IEud4N0nuDY8ZWCTnDiM7Vuu6ueadBvJgVhwUspQDsWq40pVuCoAgSuehttMpQNDQNrX Pe2C/rchx4Z+1mof5qFz5unKAc8gPuSTZXUrcFy3FDu4XfUTwFwvEN2ISUoK3facMVWn wsNGBwDq7WzJj8HnAbZm0+uJYvNGq0oKyFEJxbDO2hklGgoPc2sQFn/YsOOzPaBJlFhe t9bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MKpNKsts; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=cuWA+GkU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i193-20020a639dca000000b003fc8e9e61ecsi3637094pgd.278.2022.06.01.12.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:51:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MKpNKsts; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=cuWA+GkU; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 671AE1F62FE; Wed, 1 Jun 2022 12:13:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353263AbiFANaR (ORCPT + 99 others); Wed, 1 Jun 2022 09:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242653AbiFANaO (ORCPT ); Wed, 1 Jun 2022 09:30:14 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36A054FC46; Wed, 1 Jun 2022 06:30:13 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D0B1D1F8F6; Wed, 1 Jun 2022 13:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1654090211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AgVnwmFym81i9mNHrlcOn2tQIACC8qJ2aaxzi3vn4LM=; b=MKpNKstsCkvVMbEBKSDuOXwzWe06ZUv+Ic/6qv6Pz0dvYOGtW4cYRZCwwD+OsxZDXvtd3X dudW8phVh0/qUmvoLJ7mDTRJ6S6lQeT/amNCnFJYrEYtr+RS1Se5LIS5f2sALQJ7BZS/Au BwrtUQRgLD9eKiKCf9EDOIxAwkx2BWo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1654090211; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AgVnwmFym81i9mNHrlcOn2tQIACC8qJ2aaxzi3vn4LM=; b=cuWA+GkUy67eXQVSGNMWg8oSiRpc6x6bDccXfWIJbRVw27QD5uMXoJ/DihDWh1vQHeQw2/ +0ekPW7WXmDjSXCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9B3871330F; Wed, 1 Jun 2022 13:30:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id MfLsJONpl2KwdQAAMHmgww (envelope-from ); Wed, 01 Jun 2022 13:30:11 +0000 Date: Wed, 1 Jun 2022 15:25:45 +0200 From: David Sterba To: "Fabio M. De Francesco" Cc: Chris Mason , Josef Bacik , David Sterba , Ira Weiny , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] btrfs: Replace kmap() with kmap_local_page() Message-ID: <20220601132545.GM20633@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, "Fabio M. De Francesco" , Chris Mason , Josef Bacik , David Sterba , Ira Weiny , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220531145335.13954-1-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220531145335.13954-1-fmdefrancesco@gmail.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, May 31, 2022 at 04:53:32PM +0200, Fabio M. De Francesco wrote: > This is the first series of patches aimed towards the conversion of Btrfs > filesystem from the use of kmap() to kmap_local_page(). We've already had patches converting kmaps and you're changing the last ones, so this is could be the last series, with two exceptions. 1) You've changed lzo.c and zlib. but the same kmap/kunmap pattern is used in zstd.c. 2) kmap_atomic in inode.c, so that's technically not kmap but it's said to be deprecated and also can be replaced by kmap_local_page. The context in check_compressed_csum is atomic (in end io) so the kmap hasn't been used there. > tweed32:~ # btrfs check -p ~zoek/dev/btrfs.file That won't verify if the kmap conversion is OK, it's a runtime thing while 'check' verifies the data on device. Have you run any kind of stress test with enabled compression before running the check? > Opening filesystem to check... > Checking filesystem on /home/zoek/dev/btrfs.file > UUID: 897d65c5-1167-45b4-b811-2bfe74a320ca > [1/7] checking root items (0:00:00 elapsed, 1774 items checked) > [2/7] checking extents (0:00:00 elapsed, 135 items checked) > [3/7] checking free space tree (0:00:00 elapsed, 4 items checked) > [4/7] checking fs roots (0:00:00 elapsed, 104 items checked) > [5/7] checking csums (without verifying data) (0:00:00 elapsed, 205 items checked) > [6/7] checking root refs (0:00:00 elapsed, 3 items checked) > [7/7] checking quota groups skipped (not enabled on this FS) > found 47394816 bytes used, no error found > total csum bytes: 44268 > total tree bytes: 2064384 > total fs tree bytes: 1720320 > total extent tree bytes: 180224 > btree space waste bytes: 465350 > file data blocks allocated: 45330432 > referenced 45330432 > > Fabio M. De Francesco (3): > btrfs: Replace kmap() with kmap_local_page() in inode.c > btrfs: Replace kmap() with kmap_local_page() in lzo.c > btrfs: Replace kmap() with kmap_local_page() in zlib.c Please send patches converting zstd.c and the remaining kmap_atomic usage in inode.c, otherwise the 3 patches are now in misc-next, thanks.