From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 601992566 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 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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; }