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 B7D1BC77B78 for ; Tue, 18 Apr 2023 12:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231717AbjDRMa6 (ORCPT ); Tue, 18 Apr 2023 08:30:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbjDRMap (ORCPT ); Tue, 18 Apr 2023 08:30:45 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF81ACC23 for ; Tue, 18 Apr 2023 05:30:25 -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 C2233631D6 for ; Tue, 18 Apr 2023 12:29:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9715C433B4; Tue, 18 Apr 2023 12:29:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681820998; bh=1my8N7GzDVOL3cyL5Y1drwb3CmzROzT87VWlXT/H0Os=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HHlKSNhgILx/y1nCYjY0yCKrGL1u5gUNyiIwqVXnvvjaexhjN78hkP4B68V9SSAOL OmGg4JL0uJCZsa8ILrwc3h/UHJ9Zi2f/M3z6EM6phLNgBBslsCPNzWG9ZeuGl8e1+u QeJudkPjYLAu6uc98rZKOzDeRUjmSB1aTV2lEyW4= 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.4 52/92] btrfs: print checksum type and implementation at mount time Date: Tue, 18 Apr 2023 14:21:27 +0200 Message-Id: <20230418120306.670844740@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230418120304.658273364@linuxfoundation.org> References: <20230418120304.658273364@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 @@ -2239,6 +2239,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; }