Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp964025lqo; Thu, 9 May 2024 00:03:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIyCeEFbSclZJ1ZFdS27UgF74YnKr61dVAUwoyjvWW5Nlb4PMWm32xXRAuMQQUIuEEgB7nqu70BIZj9hfPlxdYV8FUnLNRhvYXUI1Clg== X-Google-Smtp-Source: AGHT+IERDbKHBlWWhf3lgC/xeK71goRkDr6rtxbLggw5EzjCBM8qQr2U3WmruwfM3WHposyW0D3A X-Received: by 2002:a05:6358:7694:b0:17e:53f9:6985 with SMTP id e5c5f4694b2df-192d2a26af0mr566811055d.14.1715238187027; Thu, 09 May 2024 00:03:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715238186; cv=pass; d=google.com; s=arc-20160816; b=jNdCoWncy404LiqXSQ1/aB4swkuY2DuDK5nG/lciwQuwKJau9X/gw7GJ463zqKmHFE xOUMJgYrxW07HEs0bKwUB4m2dkXA2znnesG5rd1lmmSIRFLHTsfoa55R2+1CqkqfT1ak issqJ53vg1Mie8u7oidcO9eTio8oxlE6otF30XHmIZ8UtKHy/nwjBe549Cv0SMhMcHwK CnzLK72/bl8rgACd6TvUCFf/b4mm1fZLk2lhuh63D8MQvvK6vk+EO8Orh32vwneZIjPn 9dtTbCjl0wR/j/Dmr9mylEelUPm2alZap91AdaI4J1GdZ38/rNz3GiP9e2OLbyD7F5xf ah2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=e41S4BwwMsWXaNjFvLtDtQWWdZXnGXjA1B5HEHxantk=; fh=8JM3ed5/yHyl7l0CNHjtY4gn/nA+9MdykX/AJGD/3xA=; b=KsSE0DbXpY69tsGMiSjRdnuPueob2p/Xr0luFyluWOz4rFVZeODK9gDLK3gbIodUFO ps74Y5ZuWUbbMwF/wQr7mrjWobGVE0Av6T+a1Bvy20THOiPwPT7rduCMk3GchakMtVMO o2Kr7WaDV5sOJE9akXl6YGjuiAfXKcd+rnWqfzeG4BLvc2Ue3qubLt/mvRFuMJuU+Nk3 OEFZAcnmXfwJ6s3xrg9OVkzqzCuepe6mTaNcLe6YC1vrbN1JeDDS3i65HgqgyFHUqC5M gjEb6Yq5vZfs497N+P1OYQ0gLk7j6b2eE1fL8cu1j54rRfNgtrhj8dhzxzlf4U+esRor TLAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=gdb0OgJO; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-174226-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 41be03b00d2f7-6340a34a657si814520a12.35.2024.05.09.00.03.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 00:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174226-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; dkim=pass header.i=@suse.com header.s=google header.b=gdb0OgJO; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-174226-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174226-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 27EA0B22312 for ; Thu, 9 May 2024 07:01:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5687A13C9AC; Thu, 9 May 2024 07:01:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="gdb0OgJO" Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 2275D12FF99 for ; Thu, 9 May 2024 07:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715238113; cv=none; b=XjFCPhbp1IpGN1Q5QB+acNJFmA27D7i2yD5b1ChVmNVUDkCZ+iPK+Zl8wnS0uiGYGHZzJUJarbDaOeBaiMWpC8UIPfL8LiP3ncVSn8DAPGVNExJzo5V+pB7VKsoaDiFE69I1VWv9iVFzsz/zCOYo68u4Y7XGWzyyRhPRzJZaI1g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715238113; c=relaxed/simple; bh=R/YwftwUnrsnD2ekPwpf6DG41P3dbIZt6arqycGLRs0=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=rR7A5R6iDgh9MwUpx+SGZmlAXmmGXsI/nGpDKt22JetVOn16eskswFlCxDZn/p071R+cBagqr9jEu1HgZn587oFGFgnwJ3jMFNtnM0hYkxea03GE79C7nGqKc82Jj5mmvnGiCgR4hbY8q9x55EahhXc1JWDGBaiG+q3zQeNmYhs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=gdb0OgJO; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2db101c11beso7455911fa.0 for ; Thu, 09 May 2024 00:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1715238109; x=1715842909; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=e41S4BwwMsWXaNjFvLtDtQWWdZXnGXjA1B5HEHxantk=; b=gdb0OgJOuJFGRDaLsCqOVeLfakNxtHcd0r3Ghc8IgdMPciMJIdI0sv3N7jib6kI0cv G6p30Q0SQ92Q3UK1BC1daPxgZRRYWWwCBRgXQjbxxjhWSTBE4e14c+jZoOmfSnKWh4yv /156jZd9fey3+a54oe5fA0ndsaiVg/8eDCa3ldDC13SIf8jWfbGNfwzmvlxg6ySykn5m sAqvRtcSPDxTwoUEXzW+TygonQH+gMJoG2JpDnTy0aYaf5G2VfVjeTf/p+K4xrShX9Mb O3YD2FGiQcUN2KgMyXT4hngiiFdBDVc/8IIrozGdVeQ951ue3N6BGpBU13++MWYKm1x4 6Ivg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715238109; x=1715842909; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e41S4BwwMsWXaNjFvLtDtQWWdZXnGXjA1B5HEHxantk=; b=tGxbFZBVqzBTLBJpDWe2za3ayBIgr0dTP+D0SQLu10sRImAwfC+SEc3EApIRPCUCz5 aLWbSPIvkfU/ihA98SegT2RGR0Ixrd/R1CrY5AYW1ULXQpWKo/lK8HUfK6N1Zlq4KYHN JocbSqeCWN2V2kRSpuVAhB6de8MkPZAaBk5HyH1BuXo3EyY4W7E8X/P5C5Hyq89D0gOD Ixh0VrUhcqWmdPyqc7xm1QYnQQ++UywA29hmFWD94LTafAq9ctJAvEM3i1hdkK0+gA7g lJdYCGzn1B7mkpDjGzCHTTJSUUBCpVrL/YSCnq0tH9o65Fvojqh33t+kRqylF1tyf5SG QbVA== X-Forwarded-Encrypted: i=1; AJvYcCVKCotbGb7sj03SCDUlYc4GcAWSdzTXjgQVz0M/GUG0NkA+kmSOO+tGZVxJB/esK6N/82gqZuYd7Fh4xc9DvSTsCKYKylAUOaS3OJQz X-Gm-Message-State: AOJu0YxLG81ot9821ulK6cGl8ELmqjLyBwsyZZqE72znz78IlUQYlCQL ooJH9HxfZzWXThkBCf3i8PuK2s6Blu2cgBrNXsG8phMrebNZ2Ng7vhAATB38HBQ= X-Received: by 2002:a2e:b60a:0:b0:2de:7046:b8f8 with SMTP id 38308e7fff4ca-2e446d86159mr31015791fa.5.1715238109246; Thu, 09 May 2024 00:01:49 -0700 (PDT) Received: from smtpclient.apple ([23.247.139.60]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2b671783519sm705720a91.57.2024.05.09.00.01.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2024 00:01:48 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [PATCH v3 1/1] bcachefs: Move BCACHEFS_STATFS_MAGIC value to UAPI magic.h From: Glass Su In-Reply-To: <20240509061718.GA231218@pevik> Date: Thu, 9 May 2024 15:01:33 +0800 Cc: Kent Overstreet , linux-bcachefs@vger.kernel.org, Su Yue , Brian Foster , Coly Li , linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <37665ED1-9929-444F-B9A0-3CC7EADBC064@suse.com> References: <20240507153757.150891-1-pvorel@suse.cz> <6D9FCB08-480D-4CA0-82E2-284B1F2BF8FD@suse.com> <20240508211759.GA209026@pevik> <20240509061718.GA231218@pevik> To: Petr Vorel X-Mailer: Apple Mail (2.3774.500.171.1.1) > On May 9, 2024, at 14:17, Petr Vorel wrote: >=20 > Hi Kent, >=20 >> On Wed, May 08, 2024 at 11:17:59PM +0200, Petr Vorel wrote: >>> Hi Su, Kent, >=20 >>>>> On May 7, 2024, at 23:37, Petr Vorel wrote: >=20 >>>>> 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. >=20 >>>>> 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(). >=20 >>>>> Suggested-by: Su Yue >=20 >>>> Would you kindly amend it to Su Yue or >>>> Kent can help if the patch is going to be applied. >=20 >>> Unfortunately Kent was faster, it's already merged without your SUSE = address >>> (and your RBT you added in the end): >=20 >>> = https://evilpiepirate.org/git/bcachefs.git/commit/?h=3Dfor-next&id=3Dce8f9= 355f23be9756e499682d0d642a741db6c3a >=20 >>> @Kent: Maybe it can be even now amended (with Su Yue's RBT). >=20 >> ...sure, make me invalidate my test results :) >=20 > Thank you! FYI there was also his RBT (Reviewed-by: Su Yue = ) >=20 Thanks both for you Petr and Kent :- ) Sorry for inconvenience due to = my email quirk... =E2=80=94=20 Su > = https://lore.kernel.org/linux-bcachefs/6D9FCB08-480D-4CA0-82E2-284B1F2BF8F= D@suse.com/ >=20 > Kind regards, > Petr >=20 >>>>> Signed-off-by: Petr Vorel >>>>> --- >>>>> Changes v2->v3: >>>>> * Align tab with other entries. >>> ... >>>>> #include >>>>> +#include >>>>> #include "vstructs.h" >=20 >>>>> #ifdef __KERNEL__ >>>>> @@ -1275,7 +1276,7 @@ enum bch_compression_opts { >>>>> UUID_INIT(0xc68573f6, 0x66ce, 0x90a9, \ >>>>> 0xd9, 0x6a, 0x60, 0xcf, 0x80, 0x3d, 0xf7, 0xef) >=20 >>>>> -#define BCACHEFS_STATFS_MAGIC 0xca451a4e >>>>> +#define BCACHEFS_STATFS_MAGIC BCACHEFS_SUPER_MAGIC >=20 >>>>> #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 >=20 >>>> 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=20 >>>> sb magic, kstatfs::f_type and super_block::s_magic. >>>> However, for bcacehfs there are three magic numbers. >=20 >>> 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 :(. >=20 >>>> Anyway, it looks good to me so far: >>>> Reviewed-by: Su Yue =20 >=20 >>> And also without your RBT. >=20 >>> Kind regards, >>> Petr >=20 >>>> =E2=80=94=20 >>>> Su