Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp994971lqb; Wed, 17 Apr 2024 18:10:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvlnyZFAhJxKGpmP50kx0dSUF/LawDskdVIzIPJHlAVEQyoa1GBi0aYisFeFmk2lofK+nTFml0tZi5sKZc+vYCl+OJvL3VRE8Hxny2PA== X-Google-Smtp-Source: AGHT+IHTkt5Jj1Tj4rhUyYcMLy5d3pV8zKPnh0zlZ+3qsJ1RoKE3eXrrUzs8o4H2UNxEieYFb2tC X-Received: by 2002:a17:90a:bb0c:b0:2aa:47f6:21ea with SMTP id u12-20020a17090abb0c00b002aa47f621eamr1228951pjr.9.1713402609370; Wed, 17 Apr 2024 18:10:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713402609; cv=pass; d=google.com; s=arc-20160816; b=ZcfboKfZaSppw+Oj45LqahMJAqNvRwUgYipbRvnWVu9DW68rTjgehsqJsGFW8S69UN 4fj2Zpa1q+h2ovyuU789aPnvCMhjMMS6qYyaBej+oo9N1fN8MymZLqcRUdm9VlMLlpGJ VW7yvdwtPgtBATbmclesdUZKW9qMjNcaQmxV1cKSrdpLtxqV/gZ/UR8GBakJZrMfIL5T rX6sQQ7fifp/dJ4PrJ0hDbK8lgK4dsIHfdZzk8xLVzwOEopPO+GuQEcKeAXy97Zc2Krr kUFfO/g2Fv1Ey99qF4dkgU8RY33OET00rygJxLuEpq/DtD8mReSF96bJmYDZxXTK4q3a UWtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=puK33a/mJB5sGPiglEa8MaX2Lt7I4T5EMnTZLT+1A/A=; fh=s+Fs7hysBe9Lb5B3+Zi3CWNCJ4/uaeB94zwf9CFSQIk=; b=P3EaDNrXVCas7Kjs6GKBk0eQtlyZ/z1q8UqSU+7iFjEupAbLfXN7lriBrfI9G6oO39 T7exF5xqtatG9fEwU+XdF2+/6AI3dnJWrcdIcrUsdPuZlp1rcbQs477gh+vjulFG/izN rzRTYrORkDAQvAtNtYtw9tZIK762ykFwM6FMa8pNz2K4m1R29mtx5x/0/mFVf0vjU6hi lqtzXhLtZsIqb5aKESSyc08Xqs5jqfehfNM5Ldu8jtjnjydSAajAF6i2ozrH+WBSevfg izl2C+wHkllJXFLTN2Dd+CkHBDqXZmm6/us1FYqBy8+nTcjFph1lzJ5C+PnWk2Lsjhzo gx3g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-149382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h9-20020a17090adb8900b002a297239055si432312pjv.71.2024.04.17.18.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 18:10:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-149382-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149382-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DFAAFB21572 for ; Thu, 18 Apr 2024 01:10:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C9748F66; Thu, 18 Apr 2024 01:09:53 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 8E0664411; Thu, 18 Apr 2024 01:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713402592; cv=none; b=kk4c7Zk/FG7fIMITSesDJrIRYNCCn4tChmSRK1opd/nlFF8fRIQ940FEotVXyyQJ1kY1ubiJ8T5vWpXx8z9f1jaLx318zUIc0zRxn4N2s4lxSkvlK025ornCeMRUmpQsR8BMFKNHP2/T1PkhC88DUuQK3JzBP4diHQ2lSRQEZaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713402592; c=relaxed/simple; bh=lvGFpFWG/c5SJn5k6EpKDjuGe+uh1Zqt7Kd70bAY8Ys=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=GIy2MUIsHcaTt2pOjOlcaBhz4NgVO9a685i4QWUDVYLyz4ER6t3o9v058B3efMte5vkW4xbJNRWnTGpO82qjO8ZHjrusXlbpGBGl1Z38G7gzCSIBYY00BCk1Ux2sAfLfBgEz6xwR5CCv33QCtaTOf75/Tt92aTb0qbW5ADXVUhk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4VKfkB3yl6zwSkL; Thu, 18 Apr 2024 09:06:42 +0800 (CST) Received: from dggpeml500022.china.huawei.com (unknown [7.185.36.66]) by mail.maildlp.com (Postfix) with ESMTPS id 557C3140120; Thu, 18 Apr 2024 09:09:46 +0800 (CST) Received: from [10.67.111.104] (10.67.111.104) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Thu, 18 Apr 2024 09:09:46 +0800 Message-ID: Date: Thu, 18 Apr 2024 09:09:45 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] bcachefs: Align the display format of `btrees/inodes/keys` To: Youling Tang , Kent Overstreet CC: , , Youling Tang References: <20240418005055.45482-1-youling.tang@linux.dev> Content-Language: en-US From: Hongbo Li In-Reply-To: <20240418005055.45482-1-youling.tang@linux.dev> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500022.china.huawei.com (7.185.36.66) On 2024/4/18 8:50, Youling Tang wrote: > 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); Reviewed-by: Hongbo Li Thanks. Hongbo Li