Received: by 2002:ab2:7104:0:b0:1f7:f6c3:9cb1 with SMTP id z4csp41581lql; Tue, 7 May 2024 09:14:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWdceMK2keq7mQdNLR6AvA5rRrWFXjlb6MjI8h0I3e7M+Gfqq+dsg8H2kcVFy+i4/ZD6O67WXgLzDd8N9nNhQKlarOJuLcaM3YbuwZvnQ== X-Google-Smtp-Source: AGHT+IFwXwxgCQtW6qeaGZfoJvZ3O0bGUy/zX6IQCEhtMg34075QwEahj5dnLrEPnj64I1Vjy1gl X-Received: by 2002:a17:906:b84b:b0:a59:c319:f1e0 with SMTP id ga11-20020a170906b84b00b00a59c319f1e0mr4845506ejb.75.1715098498206; Tue, 07 May 2024 09:14:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715098498; cv=pass; d=google.com; s=arc-20160816; b=1FAHmzejiyZd41LYif9YjbL6GbGHPrgnX9Omlm0Rq359RVImyPr6nFvIUivOCY8KTt TsZQ3KtYuZgRtGMkS2AtdjrX4z7xp9anz69jqJVv3TRDbALur0708bubarz5ZY4FJlL0 ZibLpM+eKtk7+bktpZH6a+jdLvQ5PBGbO1zGIc8OCYZ6Q5rfjZtVz9+G0W3XtEkATriJ Q+FrsqCg1uQcqcdJjVbJPiHAeJIBuRZOT0A6XWRYxARfvqBHVLxLlBkTofbWYXCx6XjV oro97awRUJjtwVZDbuw93a0TVZHcYK7tk8d5WPUJ0L+ZNt5facKeDjp9gWpa7lcEFKlU zMPg== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=bqj+NSNknAKcKDogP9g0dp95XkIoSf3FKtqZnMGIcU0=; fh=zi25T5RDzu9Zua4K4bYkQoqB0CAzQEMZRWc/6RIGA7g=; b=gwane2mOt9V3RdYb8suDeW5CUzD2XLOCnegZhqd17sbfZRGf+YG4Ud3K/vbHtod4pI 3/eGl0nsaO2iZ5toBYbusxGsS46bAjbKnPM3WIfaaxlblGh8vKNyqrbA6MOy+u4vbiwp tfKH4K/wYzo6kBtC75tDygIXxNjSvrboRnC6p8cBnyaxFK47qNAAizN8Gp71q5AvqrCG trLtERUQqWRN1PGT3rc245lUrloez//uvTQo+BcioiSkOORP6TKTgCMP/OuZHb82uSXR NmZiNm1rh++1JXUoin+o0ZAWv24YIiNG1aNQXNcOTSjaLT9FIidkywxgwsxVrGDZPTUA e5Lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aXq8MApD; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-171761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id di3-20020a170906730300b00a59a8e9c383si4594326ejc.950.2024.05.07.09.14.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 09:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171761-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=@redhat.com header.s=mimecast20190719 header.b=aXq8MApD; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-171761-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3E3271F2C5E3 for ; Tue, 7 May 2024 16:06:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD18316C860; Tue, 7 May 2024 16:01:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aXq8MApD" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 B350E16ABF2 for ; Tue, 7 May 2024 16:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715097678; cv=none; b=Urz3IT6XqxE4WQQlUi4L7tMYIhrMKPU7RxzldypOa4GEI6zylGtw/5eR0QVZbU/OgQbNalEs7PCzhmt5qT3EDF7j2K+18mLdBYy9p0/Gh5qWfmwMu93L77q+zUkM21NnvR8FjP0+SvACHK+4SlPQax/MEKXOJPvNtY5xIyImn6s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715097678; c=relaxed/simple; bh=uDr94odQe8OoQaFPGiq0E+3/jKUcjGtIbbMd+XhGBRM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KMgyhl4cbTCPFPveUZq9rOEdEvRZ4d1HVcKQ+gliLyAh2x6cUIpkGvfS0E6obIy6v5BgQ5QJEAsWMvTLGoPrQy2euOx+p+Y+HRDGXbfRrxcEI34hyBBW5o8bze7CTn6k8TTKaUBM5HcRoo72Q1lCutXNC6LI5ZaMP2t1/CN1nDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=aXq8MApD; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715097675; 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: in-reply-to:in-reply-to:references:references; bh=bqj+NSNknAKcKDogP9g0dp95XkIoSf3FKtqZnMGIcU0=; b=aXq8MApDkbMsC/RFjpfsw4OVTfytYYt8dkhx+f0Rtq6SjylDzmx9xIalaZO2SirCjJQY3o DuxLmFCoRseBwM2s+HPWH0/l6aW18Fo5XI+zJPKSV2ggi+MfFxkeJ4+uP2u0NuyB3S3++w 3TaPhy/QOwUjuVzqzhC2Xjn3mhROCOs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-308-MowG0XtLM_SWxohaTA-HCQ-1; Tue, 07 May 2024 12:01:10 -0400 X-MC-Unique: MowG0XtLM_SWxohaTA-HCQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1260F185A783; Tue, 7 May 2024 16:01:09 +0000 (UTC) Received: from bfoster (unknown [10.22.32.146]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A04A43C25; Tue, 7 May 2024 16:01:08 +0000 (UTC) Date: Tue, 7 May 2024 12:01:27 -0400 From: Brian Foster To: Petr Vorel 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: 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: <20240507153757.150891-1-pvorel@suse.cz> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 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! 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 >