Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp360042lqb; Tue, 16 Apr 2024 19:59:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW90+jGJPHN+dX6EZvEqZ7NpXAX+RgsjBvwNJ8wPKskd31kevQOXje/3eKHe0hX35KFfhAKMGKNmI7VC6OG/kGiFssPnvUBGo1WUaGp1w== X-Google-Smtp-Source: AGHT+IESZ5FvOhMPGfJLv1lkGVOMv+8IZARPG/WKjA7on9WJt/uQYLVCaS6rvHA5JTqY+GH4MyX5 X-Received: by 2002:a50:9b55:0:b0:56e:edc:9837 with SMTP id a21-20020a509b55000000b0056e0edc9837mr13923341edj.35.1713322790422; Tue, 16 Apr 2024 19:59:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713322790; cv=pass; d=google.com; s=arc-20160816; b=wLH7EtcM3c9w3UEwk1ewROs52J0xlFwJQlHrYdLp+5dLCOKUFg3437tO/7fdX5JYIy MQdQI/2DZ6e064QLQvcePYQR3Lfk6keOnslNZybjvb5lY+rOgaC1d4ftXamaEj4FwqB5 alq7q/7AmTDawoSC6yw5t27V0y7Tq3Gy6fT9HEheWaoF4Ot4BRP7aaTLrqWXdHMp23xC Sucd1OWMRaIDHNfUNWxiERwmdzAmkIQ0ztglgGaMjUwJbkf/p5AlJfu18psMLc1OzNR8 5rW9exZBlmuMXdWnSirlr8RSfin/vwhzjtaDYawPAN9RYepOclbdg8t4uqf0JE57Cx0x 1pLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:dkim-signature:date; bh=j9m+kCUmrYL1S2pLAT21wcG4kuuMpS6hSz6ardhvzbY=; fh=md2kVIsEU7q/zkmNauO0psAe7KGpSwAVgu0ObQLKXes=; b=CGVaIt1RzRouys5JdUVaDkoklqcZQwLFdF+W23YTv7tLKYH+OjlH26ipmyscpUOwgf cci16+Ud874lqjGPKAWV1vvB5cr7LLH/8CbdMKNUf9/yewXul1msTFQFpNd7I1J+1SS8 feisEaMynMad8KUB+E2eZFXLIC0VprmGSll9Q8ka5HnbLbNi2UCDIu/a+v0fKhJEgmmC s3z0jTQuefgy6d65zN7UQk5hmqF80ZBxaWFNmG/W5rqUMVpJyobiHPrSR0nbkHM46MUn LYgCQba7n5eCeMQQcNhwKnyFuJONdVQ0L0ftuUTXouHtu7oqoq2nfxFro91QjDwTHGAH garg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ixY8b4Op; 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-147871-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147871-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. [147.75.80.249]) by mx.google.com with ESMTPS id b68-20020a509f4a000000b005705e81c465si138129edf.500.2024.04.16.19.59.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 19:59:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147871-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ixY8b4Op; 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-147871-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147871-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 F35931F22073 for ; Wed, 17 Apr 2024 02:59:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3A8879C0; Wed, 17 Apr 2024 02:59:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ixY8b4Op" Received: from out-189.mta0.migadu.com (out-189.mta0.migadu.com [91.218.175.189]) (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 C38336AAD for ; Wed, 17 Apr 2024 02:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713322783; cv=none; b=sNna1paatx40oRTpoZ7mDBrCCju/YrE1hAHtVqaCZGJvryyndx2YAuDMA4cPyGK4Oo72FBpS9cYNvbtM6E6b5/D1CwAH1x+2BUF5Bh5zqZYbgFogxePM03al3d5vw7HeoEgB4g6TjVWAKwbxPaMJ+pWNChm18jWiAT0p7gNG0Rk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713322783; c=relaxed/simple; bh=1Sz8qWQGGkRx+TmU1xHfA1jN9CMtaXGFfIdA3CGeDvM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bRYuSsTQkzCuzAWs3Z3dUW4lOb0J8XHPUuG2XcsSgb1k5kNFa0EnTcHVlcv+UXqZ13XisM4yQzE8t3qhxAVWUsmHiHpU9llTjbH6gME76ZcGQOqNOCO6dKXiFlHvXYuZK435e6AoSDXBwrd2K1t5la1cQ/gx6Uc+zYYWmIcIxmo= 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=ixY8b4Op; arc=none smtp.client-ip=91.218.175.189 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 Date: Tue, 16 Apr 2024 22:59:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1713322778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=j9m+kCUmrYL1S2pLAT21wcG4kuuMpS6hSz6ardhvzbY=; b=ixY8b4Opw9WyD1h2lNYAiERCaVGskVVsmeaO9hkcBttGfo0yPbEQVYr5yLShoR5evJvr/0 QFECLyuouQsJioGN39kbGWYnytraf5dyIYmefG6ZnCYZNL1IenK1sphcobb5b+kQS/20HK LT4XlZPrD9qUp02RDz5tTkFd225yN10= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Youling Tang Cc: linux-bcachefs@vger.kernel.org, linux-kernel@vger.kernel.org, Youling Tang Subject: Re: [PATCH] bcachefs: Align the display format of `btrees/inodes/keys` Message-ID: References: <20240417015448.84294-1-youling.tang@linux.dev> <66ecea56-e4d3-4241-a1dc-378d70555321@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <66ecea56-e4d3-4241-a1dc-378d70555321@linux.dev> X-Migadu-Flow: FLOW_OUT On Wed, Apr 17, 2024 at 10:50:10AM +0800, Youling Tang wrote: > Hi, Kent > On 17/04/2024 10:20, Kent Overstreet wrote: > > On Wed, Apr 17, 2024 at 09:54:48AM +0800, 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) > > > ``` > > > > > > After patch: > > > ``` > > > #cat btrees/inodes/keys > > > u64s 17 type inode_v3 0:4096:U32_MAX len 0 ver 0: > > > mode=40755 > > > flags= (16300000) > > This would print a newline for keys that don't have a value... > The original intention was to make the display of the printed content in > '__bch2_inode_unpacked_to_text ()' consistent, without considering other > callbacks. > > Or just modify it in the following way? Yeah, that's better Do it off my master branch though, there's some printbuf imprevements in there. https://evilpiepirate.org/git/bcachefs.git > --- a/fs/bcachefs/inode.c > +++ b/fs/bcachefs/inode.c > @@ -534,6 +534,8 @@ 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_newline(out); > + >         printbuf_indent_add(out, 2); >         prt_printf(out, "mode=%o", inode->bi_mode); >         prt_newline(out); > > > Thanks, > Youling.