Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp987316lqb; Wed, 17 Apr 2024 17:51:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxxMdU7P0F9V+pP1LG3zwNJ0Bh3+B9cU6MgctOGXEn6vQLQdlLWrVx5GWkSNJlXqILvUz+V4/PY/ThmoOV0H8/6SFejFknWeNfgWLizA== X-Google-Smtp-Source: AGHT+IENwTOmws4X+2b/gXC9ZBhaS13hEgmwUKBZ5dD/sQQw00yo+8HPQBUXAurCqjPdUbaEeI6D X-Received: by 2002:a17:906:b78c:b0:a52:57a6:2f45 with SMTP id dt12-20020a170906b78c00b00a5257a62f45mr833118ejb.21.1713401481617; Wed, 17 Apr 2024 17:51:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713401481; cv=pass; d=google.com; s=arc-20160816; b=yIs/j6i99WmNbQeKOB1h6UQ02qDgx0/rNQmdkkNyljzZS+3yDU+squ+sNURsibOTRd X1TgkJfl3S1BMLeibPncnkx1dBSKw/rvaeVk8RKiqcQfm0Y/6oFvp9uv2OcPUv5hyDJU ZGe8wuIBIq8NwDmomVMwkb+gRyw2EtUvI8Nsa4Dkh74F4ii2ye/Llspo0yhnC0riECTH BIXEi49elSfWJrbwBn3p5uZQl1LFvxAGUswqNsaQ9MbjIzMx7vnhXJk81KQc26zA4pRq RCbuYgr8P3hBOOPgIirVRkgwyE+uEuHp2MdXn215CRZp28FFkT+3onEIHxzgIhI1364C wP0A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=LhIN91+VDRSgFAPqx1f6TgLIdjqG8AF5Ss9VnxYQdN0=; fh=aE4cEAUa/EWT+RWDRhU10/mdVcgwvWFzBrn9YOWUgU8=; b=VtOhn+EngA4QlKReKxco3dPnGj1e6q3KysrnLWotZ80Mm4BzKJMwZHwDznnonrzBJ/ YdoYMCbIIu6o2QLZWMVe4ZooptYyuDugJADDOzmqCx7PznNSHRY7rDLQk1zIaZmVul4M H9aCmhL9qXHORD90PiwQGUVqJLqAfBGQpXGZDXT/LPqzQ8D+aCES1vVPmD7cyQOpvGW5 YVb0fcfo6K2+Uon9K+Hz87F+YjF0xH1y5gUCbVJeJ2SADndBCmJekU0x16fBocsqLvdK s8xjZjJZzO73C/mcGIdUPYkh3HlxDPpGlY+7hJ0UFC4Od8/cmW/dk03V+uXNrUXH0Pal VSZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=d2XVpF4e; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-149369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e18-20020a17090681d200b00a524edf6846si195243ejx.100.2024.04.17.17.51.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 17:51:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=d2XVpF4e; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-149369-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 59A641F21CD7 for ; Thu, 18 Apr 2024 00:51:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E95255660; Thu, 18 Apr 2024 00:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="d2XVpF4e" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 A24DB5231 for ; Thu, 18 Apr 2024 00:51:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713401475; cv=none; b=W7pB9r0hcMvYDre5/sfb9j9TLbxJFTUJVSPV4sGrzP7op+Jb1MvRWTPVGF7A2aaAvUM7/ECzi1yUgvTuZcBveAie84hhwsC8m8wjRWE+r+/zNgw/O4APxMoCB1exR/gSXUPTRbK3p8ku5YnUfCxy9Re+S4+Ye/jkbpUUkTWXH44= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713401475; c=relaxed/simple; bh=07ffA8kkXrVvn46Tku4SoiLPrhU77jqOGLiZCbjdHrw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=hkPQNGTbnDFJm9aN/11TshZzAR8fUw5OpMqUWM/4K8jhgs5wZufROSP10AS/puBteKbq/1h05kycGQDxgRLYv3avCHCpzVb2DBLm5MU5wN0a5cAksyyIcFUVd8a/Wh24b8xk1BC34XcTT2eiesUWbEg3Loyd5a3ls0RoU7BgYuo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=d2XVpF4e; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713401471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=LhIN91+VDRSgFAPqx1f6TgLIdjqG8AF5Ss9VnxYQdN0=; b=d2XVpF4eZJNBfbcmhditqQUyAqA4RtZGFCXPszP1rbJnng+99LaY+UXD7dz/qxuZm/UwAd ZYnpQyIZ1a1VgHHWBSnstVXlC/x+U/O1PZxhPQdBIqTYLN1OpkDWrgsyMWa0uQxe0aFzWc iI8i08361Flbft+Ed2qiaeTwGszZl+0= From: Youling Tang To: Kent Overstreet Cc: Hongbo Li , linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, Youling Tang Subject: [PATCH v2] bcachefs: Align the display format of `btrees/inodes/keys` Date: Thu, 18 Apr 2024 08:50:55 +0800 Message-Id: <20240418005055.45482-1-youling.tang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Youling Tang Before patch: ``` #cat btrees/inodes/keys u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags= (16300000) bi_size=0 ``` After patch: ``` #cat btrees/inodes/keys u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: mode=40755 flags=(16300000) bi_size=0 ``` Signed-off-by: Youling Tang --- v2: - Adjust where to add new lines of code. - Remove flags ` ` by Hongbo suggestion. fs/bcachefs/inode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index f0da2b0048cc..5c9ee41baa72 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -534,12 +534,13 @@ int bch2_inode_v3_invalid(struct bch_fs *c, struct bkey_s_c k, static void __bch2_inode_unpacked_to_text(struct printbuf *out, struct bch_inode_unpacked *inode) { + prt_printf(out, "\n"); printbuf_indent_add(out, 2); prt_printf(out, "mode=%o\n", inode->bi_mode); prt_str(out, "flags="); prt_bitflags(out, bch2_inode_flag_strs, inode->bi_flags & ((1U << 20) - 1)); - prt_printf(out, " (%x)\n", inode->bi_flags); + prt_printf(out, "(%x)\n", inode->bi_flags); prt_printf(out, "journal_seq=%llu\n", inode->bi_journal_seq); prt_printf(out, "bi_size=%llu\n", inode->bi_size); -- 2.34.1