Received: by 2002:a05:7208:20d2:b0:82:bbfa:f723 with SMTP id z18csp35482rbz; Tue, 7 May 2024 09:49:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXp7c7VAdY9XClv/bnoK2+YCfhp161OQ/MQLtL6aqNYmUZfJV3nT5OQDe/Vy6XOr9H0AXHFnEeXKlWAE5CvjcsamlXFxQjabw0OeYiJcA== X-Google-Smtp-Source: AGHT+IFlr+HJikJuctH7RHuSnVuTq7b5fP13O4Ev8e1iYJmHm3hFm7XzYPyDrq2+B8syaIeoI/L6 X-Received: by 2002:a9d:6a0d:0:b0:6f0:7ddb:c198 with SMTP id 46e09a7af769-6f0b7e96cb6mr13418a34.23.1715100550042; Tue, 07 May 2024 09:49:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715100550; cv=pass; d=google.com; s=arc-20160816; b=UHarlt/WOOZIe79ttfKyTWsr97HzkVckty2/8CaYuuoBUh9pJt0y0Rccw5GuCkzgAA Td/WoyjOU5d5UH/WfTWBuBP31cmHTBNKnnkDEyuCwQyZ/SKhiEygOT/S0Z9N+clzhHGA 2ka2uk3c3k78bfGnEaSjZeJ4fOVKA8E2Qa2gMm/w3PQRR0k4bmu1UrF/be/kt0OrAh1h PL0yeTiXZcGK5EJvmlc4B05+B7wvrAyifkuHyuPnB2BUnKbMA3qK5jff6sx9jfJzUEWq nm8C2l3+XhsTMV65R7kXrJqy77Oa/edg1WD5YvQY0+XvxFp54IvHEHdTF0FQqOqtLNkg 47cQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature :dkim-signature:dkim-signature; bh=DRUKIk56AMBa83RB7gUeR1KP/QLaFZJMu5dlZQb6BZ4=; fh=LYCkKu44qtlNJJdYpcwRPZykNc0goL9NTqoa1o8u288=; b=lVHUh2BCIdAbRflOZFzhj9xzjeZBHQWDWTcGnC3MzqAxFBt3dQ/CQ0kXq7Tk6qr8IY JuQ4XQDTEt8cd4QOyJX2a5vSrTAGr+D6zCC12DGKCPGiAbDSkYp+I3BEyK5REbUh49s1 oyu51jOOPbqTJcIE3MCR3xqP9FBvn6RtMfsRqEEAmytS+WiKN4MebXoL+Vxyy/gu4Q4B CSku223yqroENfyu0F/RH+/o/vPgVL8EQ/1crcqzWILPFLlHMOqcorGtcrI1YFyJmbAL JOKLtheO42fYJvuWjiDCFl7K+Y9UP5f8pGEjNhwLYPWwBdNDjoWhcyb8EZ+L0arX8fXX fKXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=IlhhHAXT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=IlhhHAXT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-171866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171866-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a4-20020a05620a066400b007929a1ad783si4663590qkh.421.2024.05.07.09.49.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:49:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=IlhhHAXT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=IlhhHAXT; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-171866-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171866-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B48F71C21065 for ; Tue, 7 May 2024 16:49:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18BF453E28; Tue, 7 May 2024 16:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="IlhhHAXT"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="et8FFqUq"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="IlhhHAXT"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="et8FFqUq" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5983938DD6; Tue, 7 May 2024 16:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715100280; cv=none; b=Tf0d6AVp+VFMJj93ygVBqIVPiN1CG5GXJYe1/nbP3eIvG/ESq6L4AiVRoWnuy+N3DAh5iOpMmg9T37SXBldKzULEsUcshFRlKM50Vk57GrBHuUhWK1FKdU0dwsV/2Hgyo6thzZpCMLoJkTAq70xJszPRGmqEbpJY8hb+PSCl0QE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715100280; c=relaxed/simple; bh=kAKlVw87PPuSWXnb3AnyFkrp/Eif5CHqGGcqc9qtqpY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Twa23Q8/ndV9jBMoeVhz7ly2o8SMUwYWpJmBXXFdjY769j3G7yemtPCWYoe6gBCt8D3Y+JKZllH/8GClxOWK0wMpZ5jm9KkZ9oG/chKsHcTlyRTF1qrMR6pWWWOtPk+LecnfsEY1ssoULadKI3cRgbFGPt83BkS/zeUPB5dPwiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=IlhhHAXT; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=et8FFqUq; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=IlhhHAXT; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=et8FFqUq; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 7373C3422A; Tue, 7 May 2024 16:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715100276; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DRUKIk56AMBa83RB7gUeR1KP/QLaFZJMu5dlZQb6BZ4=; b=IlhhHAXTY8L0W7QnTFgiES7pmtNsDhum3EzUSRSQSeQ5NKVJ9Dj86e/SOtUf4JvMz3K/dD jgZbU/azE4V6zepUIC9VQFry66yTz7Vf08L3W0tph5R5WJJlw35o2yFXTZ5N46uzNo5BDZ MFD1KNdeQ3t3mahs8plWp1RkTxEUHxs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715100276; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DRUKIk56AMBa83RB7gUeR1KP/QLaFZJMu5dlZQb6BZ4=; b=et8FFqUqj9uixX+E6fz0+sQVMVqu8BLSKYBERLZSZUmkKtA6kE1VODoMTiT6lhonCp5QfQ cybSIrStt+OrcGCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715100276; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DRUKIk56AMBa83RB7gUeR1KP/QLaFZJMu5dlZQb6BZ4=; b=IlhhHAXTY8L0W7QnTFgiES7pmtNsDhum3EzUSRSQSeQ5NKVJ9Dj86e/SOtUf4JvMz3K/dD jgZbU/azE4V6zepUIC9VQFry66yTz7Vf08L3W0tph5R5WJJlw35o2yFXTZ5N46uzNo5BDZ MFD1KNdeQ3t3mahs8plWp1RkTxEUHxs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715100276; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DRUKIk56AMBa83RB7gUeR1KP/QLaFZJMu5dlZQb6BZ4=; b=et8FFqUqj9uixX+E6fz0+sQVMVqu8BLSKYBERLZSZUmkKtA6kE1VODoMTiT6lhonCp5QfQ cybSIrStt+OrcGCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2E30913A2D; Tue, 7 May 2024 16:44:36 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id c5IdCXRaOmbHbgAAD6G6ig (envelope-from ); Tue, 07 May 2024 16:44:36 +0000 Date: Tue, 7 May 2024 18:44:30 +0200 From: Petr Vorel To: Brian Foster Cc: linux-bcachefs@vger.kernel.org, Kent Overstreet , Su Yue , Coly Li , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/1] bcachefs: Move BCACHEFS_STATFS_MAGIC value to UAPI magic.h Message-ID: <20240507164430.GD138935@pevik> Reply-To: Petr Vorel References: <20240507153757.150891-1-pvorel@suse.cz> 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=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Level: X-Spamd-Result: default: False [-3.50 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; HAS_REPLYTO(0.30)[pvorel@suse.cz]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.cz:replyto,suse.cz:email]; REPLYTO_EQ_FROM(0.00)[] X-Spam-Score: -3.50 X-Spam-Flag: NO > On Tue, May 07, 2024 at 05:37:57PM +0200, Petr Vorel wrote: > > Move BCACHEFS_STATFS_MAGIC value to UAPI under > > BCACHEFS_SUPER_MAGIC definition (use common approach for name) and reuse the > > definition in bcachefs_format.h BCACHEFS_STATFS_MAGIC. > > There are other bcachefs magic definitions: BCACHE_MAGIC, BCHFS_MAGIC, > > which use UUID_INIT() and are used only in libbcachefs. Therefore move > > only BCACHEFS_STATFS_MAGIC value, which can be used outside of > > libbcachefs for f_type field in struct statfs in statfs() or fstatfs(). > > Suggested-by: Su Yue > > Signed-off-by: Petr Vorel > > --- > I was thinking you'd just rename the STATFS_MAGIC def locally as well, > but whatever.. LGTM, thanks for the tweaks! Ah, I thought it'd be more readable this way from bcachefs point. Kent, just let me know if you prefer Brian's way and I'll send v4. Kind regards, Petr > Acked-by: Brian Foster > > Changes v2->v3: > > * Align tab with other entries. > > Changes v1->v2 (all suggested by Brian Foster - thanks!): > > * rename constant to BCACHEFS_SUPER_MAGIC, > > * keep BCACHEFS_STATFS_MAGIC in bcachefs_format.h, just include > > and use BCACHEFS_SUPER_MAGIC definition, > > * move the constant to the first chunk. > > Kind regards, > > Petr > > fs/bcachefs/bcachefs_format.h | 3 ++- > > include/uapi/linux/magic.h | 1 + > > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/bcachefs/bcachefs_format.h b/fs/bcachefs/bcachefs_format.h > > index f7fbfccd2b1e..3b831415409b 100644 > > --- a/fs/bcachefs/bcachefs_format.h > > +++ b/fs/bcachefs/bcachefs_format.h > > @@ -76,6 +76,7 @@ > > #include > > #include > > #include > > +#include > > #include "vstructs.h" > > #ifdef __KERNEL__ > > @@ -1275,7 +1276,7 @@ enum bch_compression_opts { > > UUID_INIT(0xc68573f6, 0x66ce, 0x90a9, \ > > 0xd9, 0x6a, 0x60, 0xcf, 0x80, 0x3d, 0xf7, 0xef) > > -#define BCACHEFS_STATFS_MAGIC 0xca451a4e > > +#define BCACHEFS_STATFS_MAGIC BCACHEFS_SUPER_MAGIC > > #define JSET_MAGIC __cpu_to_le64(0x245235c1a3625032ULL) > > #define BSET_MAGIC __cpu_to_le64(0x90135c78b99e07f5ULL) > > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h > > index 1b40a968ba91..bb575f3ab45e 100644 > > --- a/include/uapi/linux/magic.h > > +++ b/include/uapi/linux/magic.h > > @@ -37,6 +37,7 @@ > > #define HOSTFS_SUPER_MAGIC 0x00c0ffee > > #define OVERLAYFS_SUPER_MAGIC 0x794c7630 > > #define FUSE_SUPER_MAGIC 0x65735546 > > +#define BCACHEFS_SUPER_MAGIC 0xca451a4e > > #define MINIX_SUPER_MAGIC 0x137F /* minix v1 fs, 14 char names */ > > #define MINIX_SUPER_MAGIC2 0x138F /* minix v1 fs, 30 char names */ > > -- > > 2.43.0