Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp948485lqo; Wed, 8 May 2024 23:17:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi8qtZIsCHFyinPC+WFH4czpdwCpYNlp4zMqxSLhp2YxW5QDaDohelLaG17/t9E9kNYk6nfP6EQYCIQYj/3MKUs1jmyiVYo7o1i+p4tw== X-Google-Smtp-Source: AGHT+IGws29msdc2Z6RT1irlIORkwB8ko7htjo+IYUsWyPNfs6sksqiCAGtDWweEHgSuHCGASs4N X-Received: by 2002:a50:d696:0:b0:572:a6fe:f7e7 with SMTP id 4fb4d7f45d1cf-5733294be26mr1135416a12.20.1715235462991; Wed, 08 May 2024 23:17:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715235462; cv=pass; d=google.com; s=arc-20160816; b=W98noyT/DdO6BqAxvLzkg8DPhyMHuZyoLl9VKt+597DjFnzxqFsu0Uc15Teizi8r69 miHn5fRDsyGFpbkAMXIbMZY5b8uh07nNcOv0qGTRm3oaVtbMhNkf2GQokhjCcUSVlba1 QmuSDBxrh8safAZVby1zoDDQ58HX1B7kQTHn/Chr3kyeFvJrBywR4jxKAmQOpxxzaBS4 PeUK2WijIYqZF/wBlp+BSV0KFvRy6YxC73hJldHCswCmw/TqcLN0m0Ommx8xRsg7RZ62 nhOKDrhlI1D61yx/hDGS44Ez+AQhDUMlTVMrDUcauYEEO4mTgNmEvqcjrEvYXeJAFvhM eMaQ== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=pDZDLMSsx3H/rJjZy/vs+WtnK86c8QRZBsSMgF8f4SU=; fh=/s+HFwmxb4Roq5NgmtdSxpwFnvt5btFJWJ2evexeedc=; b=YcDbf/f4Uj4zEIpj2HQTAdzA7j3QITA0enmhEwXN/ekFFOhUgGfVaN5UJB6HYznJ+c Kb+3BixRn+LFYhF2XG799TAMaTM2EBLcQGp5Qnj2LKLbpx+/d43a+13ALwI+AXKcyPOk ab1qpNX3/A3mDbDhOBx1MjLpORLytmgVOLCtKe3XJYqu0CM44HeoeWGGgt2rSlq0wsbF 4g4vj3ZTTAS84Q97+no7/X5HE8dSAADHiItPHRy2tmyd5orm+cSIZvJM7PVNzEFR4BH6 OtlUUFG8VL9gTzfKMmEO7vibNiCdpkUeTZxtFyzS62yjeAi3IGFwdxLLCz6YlILcC9PJ +7wA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MBwGDLNX; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MFj2YLUf; 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-174189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174189-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c32d024si450608a12.456.2024.05.08.23.17.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 23:17:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174189-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=@suse.cz header.s=susede2_rsa header.b=MBwGDLNX; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MFj2YLUf; 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-174189-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174189-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 8D4C21F236A6 for ; Thu, 9 May 2024 06:17:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B0DA14A087; Thu, 9 May 2024 06:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="MBwGDLNX"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="x2+cVxy1"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="MFj2YLUf"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="lu2L4sDi" 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 B6338149C71; Thu, 9 May 2024 06:17:24 +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=1715235454; cv=none; b=dwze82Y3LIr0aRCjMk4IFmwI4xLOZmgM2wBW6fwYXwsUq0+FSorDG4SMLC4Xt/R0xzhr79V3HZa+bhsqykyYzSJVDO6LplvqUfdHT7d/Vk2+spx0GHks5BCUqcRKu08gSEUCXLeFaXsaDjbBGB+39BRtHVG7XoisaeAQlHZzpA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715235454; c=relaxed/simple; bh=bOfBY0JRENHjmcmy2f9640NSh1AJPQ45xTEljPOZTVc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lvO/LH9QfmBLOhTclJfDKOK5CgmXvoFeCtBSERq2YDLzqNKGf7+BhOWnO+Xhhr388TkJZTJ2zo4w1qABncOFQLZdhHyePJEwlXlwLPg+FswMbwFid8BFK934rP543FT/UC5Ar+YKQFltGM/p0jQEITbGNggBcjHHzrwB/g217Og= 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=MBwGDLNX; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=x2+cVxy1; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=MFj2YLUf; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=lu2L4sDi; 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 [IPv6:2a07:de40:b281:104: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 59B9F37E5E; Thu, 9 May 2024 06:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715235441; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pDZDLMSsx3H/rJjZy/vs+WtnK86c8QRZBsSMgF8f4SU=; b=MBwGDLNX/eXktk3v4fpiLecLGA9SppHwlDPZ1lZI85e7C+7TTyPfeYGAdVFRCiq6AYcDDt qms4cfR2vqP+8JrzH56MjLD61uEwN20Zbg9XB+3ixSxbi4CEI3Nd0uE7bhz5EEzN7HXGF6 6t7Ig0rsJ20Obr+ALgW7+jIRJI8kswA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715235441; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pDZDLMSsx3H/rJjZy/vs+WtnK86c8QRZBsSMgF8f4SU=; b=x2+cVxy1fYHK6+9Dj4gSLrYEpIy1pM7xjSWbjXHt/99S0DZLlwAdSd+G45+3wjGfkWAH51 ALfx4gLVWCfnczDA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=MFj2YLUf; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=lu2L4sDi DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715235440; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pDZDLMSsx3H/rJjZy/vs+WtnK86c8QRZBsSMgF8f4SU=; b=MFj2YLUfIbyelUVzJKz3bM4f+Zi3tngcESqCFKBpSRQizpPJJkGprkb5KxlRzdlIy1Ovsl r4u4QtvhOwiEPPJTL7IipY+/6VtGwIGcpZT2jwPLp/ICfGstxBSMW4GcXdEOpLpde5GxJL UfbyegAkPwT5+pPhvP4ySqmYH6V3lco= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715235440; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pDZDLMSsx3H/rJjZy/vs+WtnK86c8QRZBsSMgF8f4SU=; b=lu2L4sDiyFkQnLarg5PBRkIHMbAHXeaqVONsiKMZ26vCDGFDRIlMtXAbKJIdiSE7bjCe1f z31xsjUl+AH9fYCg== 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 2748D13941; Thu, 9 May 2024 06:17:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id cW+jCHBqPGZkeQAAD6G6ig (envelope-from ); Thu, 09 May 2024 06:17:20 +0000 Date: Thu, 9 May 2024 08:17:18 +0200 From: Petr Vorel To: Kent Overstreet Cc: Glass Su , linux-bcachefs@vger.kernel.org, Su Yue , Brian Foster , 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: <20240509061718.GA231218@pevik> Reply-To: Petr Vorel References: <20240507153757.150891-1-pvorel@suse.cz> <6D9FCB08-480D-4CA0-82E2-284B1F2BF8FD@suse.com> <20240508211759.GA209026@pevik> 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: X-Spam-Level: X-Spamd-Result: default: False [-3.71 / 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]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.com:email,suse.cz:dkim,suse.cz:replyto,suse.cz:email,damenly.org:email,evilpiepirate.org:url]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; MISSING_XM_UA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DKIM_TRACE(0.00)[suse.cz:+]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Action: no action X-Rspamd-Queue-Id: 59B9F37E5E X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Score: -3.71 Hi Kent, > On Wed, May 08, 2024 at 11:17:59PM +0200, Petr Vorel wrote: > > Hi Su, Kent, > > > > On May 7, 2024, at 23:37, 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 > > > Would you kindly amend it to Su Yue or > > > Kent can help if the patch is going to be applied. > > Unfortunately Kent was faster, it's already merged without your SUSE address > > (and your RBT you added in the end): > > https://evilpiepirate.org/git/bcachefs.git/commit/?h=for-next&id=ce8f9355f23be9756e499682d0d642a741db6c3a > > @Kent: Maybe it can be even now amended (with Su Yue's RBT). > ...sure, make me invalidate my test results :) Thank you! FYI there was also his RBT (Reviewed-by: Su Yue ) https://lore.kernel.org/linux-bcachefs/6D9FCB08-480D-4CA0-82E2-284B1F2BF8FD@suse.com/ Kind regards, Petr > > > > Signed-off-by: Petr Vorel > > > > --- > > > > Changes v2->v3: > > > > * Align tab with other entries. > > ... > > > > #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 > > > IIUC, due to some historical reasons bcachefs used to switched > > > ondisk sb magic from BCACHE_MAGIC to BCHFS_MAGIC. > > > Other major fses uses *_SUPER_MAGIC both for ondisk > > > sb magic, kstatfs::f_type and super_block::s_magic. > > > However, for bcacehfs there are three magic numbers. > > Thanks for info. But for struct statfs in statfs() or fstatfs() only 0xca451a4e > > is needed, right? I would not expose the other(s) unless it's really needed. > > Also we'd need to backport UUID_INIT() into UAPI :(. > > > Anyway, it looks good to me so far: > > > Reviewed-by: Su Yue > > And also without your RBT. > > Kind regards, > > Petr > > > — > > > Su