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 5E46FC77B75 for ; Tue, 18 Apr 2023 12:39:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231379AbjDRMjF (ORCPT ); Tue, 18 Apr 2023 08:39:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231797AbjDRMjE (ORCPT ); Tue, 18 Apr 2023 08:39:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACBE119A4 for ; Tue, 18 Apr 2023 05:39:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 26020632C2 for ; Tue, 18 Apr 2023 12:39:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38632C433D2; Tue, 18 Apr 2023 12:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681821541; bh=gJleLW6bg7ntG8ihwYxRUcJ0eA9AqXpPFHotb/8krJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bIUSlWpJCMcUtA//XIzi44njz2tM8LEgW4lApFT0rXVsacBnpdHxHCLmD5OBSZ+8X a1TyMmJb6G41IdXiYzzOUxZEvvkw2sG80ro47McyDexOURJSQGFv9KyB2bA3LenH4X imsXIpcyDaUBy/+0ioJ2D/6JpERNqjVeN5KjmSIo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Johannes Thumshirn , Nikolay Borisov , David Sterba Subject: [PATCH 5.15 10/91] btrfs: print checksum type and implementation at mount time Date: Tue, 18 Apr 2023 14:21:14 +0200 Message-Id: <20230418120305.904694785@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418120305.520719816@linuxfoundation.org> References: <20230418120305.520719816@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: David Sterba commit c8a5f8ca9a9c7d5c5bc31d54f47ea9d86f93ed69 upstream. Per user request, print the checksum type and implementation at mount time among the messages. The checksum is user configurable and the actual crypto implementation is useful to see for performance reasons. The same information is also available after mount in /sys/fs/FSID/checksum file. Example: [25.323662] BTRFS info (device vdb): using sha256 (sha256-generic) checksum algorithm Link: https://github.com/kdave/btrfs-progs/issues/483 Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/disk-io.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2318,6 +2318,9 @@ static int btrfs_init_csum_hash(struct b fs_info->csum_shash = csum_shash; + btrfs_info(fs_info, "using %s (%s) checksum algorithm", + btrfs_super_csum_name(csum_type), + crypto_shash_driver_name(csum_shash)); return 0; }