From nobody Sun Feb 8 01:34:27 2026 Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (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 A07EBD52E for ; Fri, 15 Mar 2024 03:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474802; cv=none; b=KjlnH3+ydItNoQv5USZZqFyxWjCwC2MZF3K9Ivoutr44nSmAmDM0ALvuBkjt7Yd/CV+BbPtfS4Ah72DP/rYzMLcr0OyuSwIX17ou8NqXY6an5UOjTRTpQ2H/mexKPs0D1iCseHJdYO8Kda7F27q7dJaQ6BbZLo5qTocg/5AeC5Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474802; c=relaxed/simple; bh=/LueQ1G13mqVU1G0GdjbjC3M2usr9mpEcPu/Uaxz5sA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZmqdHHreAlivbqis2pnoNDXXfCakk5PsPJa0QbGHYEyPL4y7Z1uC0lqgb9r9Ni59vfCqiG3ske/GKZJ/VzDDyH/5WbxXuzf1dRrTY0qMOrlHcuuZtGE1Ccr0Dd0zsS61SdqmUJYvh1NWm9VWg83vaK/Ql9mGjF5mTrIsXYrx1PI= 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=jh0/rgLs; arc=none smtp.client-ip=95.215.58.175 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jh0/rgLs" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1710474798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0gsmBQw4bUZ2D0XG7tW7X5KxLNhuOa5nEfyJ0hbF4Nw=; b=jh0/rgLsvq+FTJEEueBkFHFB0Y2sj+exqZBFAxRCPMtcQ0cm9Kh3AzXvnvBgaXxhKk9cLW LNreMPbNb5jXwQNOl2E9v4O7CL9Ge78QBx1R88jMTtkBRzMeQGxkWJE5YAd1Zo4opcg9pk /J/JdcenZfUvnDwy9IKOYkC99Nr4+NY= From: Kent Overstreet To: torvalds@linux-foundation.org Cc: Kent Overstreet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Brauner Subject: [PATCH 1/3] bcachefs: Switch to uuid_to_fsid() Date: Thu, 14 Mar 2024 23:53:00 -0400 Message-ID: <20240315035308.3563511-2-kent.overstreet@linux.dev> In-Reply-To: <20240315035308.3563511-1-kent.overstreet@linux.dev> References: <20240315035308.3563511-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" switch the statfs code from something horrible and open coded to the more standard uuid_to_fsid() Signed-off-by: Kent Overstreet --- fs/bcachefs/fs.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 77ae65542db9..ec9cf4b8faf1 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1572,7 +1572,6 @@ static int bch2_statfs(struct dentry *dentry, struct = kstatfs *buf) * number: */ u64 avail_inodes =3D ((usage.capacity - usage.used) << 3); - u64 fsid; =20 buf->f_type =3D BCACHEFS_STATFS_MAGIC; buf->f_bsize =3D sb->s_blocksize; @@ -1583,10 +1582,7 @@ static int bch2_statfs(struct dentry *dentry, struct= kstatfs *buf) buf->f_files =3D usage.nr_inodes + avail_inodes; buf->f_ffree =3D avail_inodes; =20 - fsid =3D le64_to_cpup((void *) c->sb.user_uuid.b) ^ - le64_to_cpup((void *) c->sb.user_uuid.b + sizeof(u64)); - buf->f_fsid.val[0] =3D fsid & 0xFFFFFFFFUL; - buf->f_fsid.val[1] =3D (fsid >> 32) & 0xFFFFFFFFUL; + buf->f_fsid =3D uuid_to_fsid(c->sb.user_uuid.b); buf->f_namelen =3D BCH_NAME_MAX; =20 return 0; --=20 2.43.0 From nobody Sun Feb 8 01:34:27 2026 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 B34BDD53C for ; Fri, 15 Mar 2024 03:53:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474803; cv=none; b=ls1RPyWCVy2aTwRZEVBxN3+cU0gqe9hYSnqKaH2EVmg6xGLbREH3iGaFhKtlD+F7+/PVTFmh8mfahKqWEaka6mJiSeRPRA4fSIX2+g4Vkrjllzo/fBad4akEotBvPQnmkL6I1uZW/YtVz6loWdH7F9BRUsM/XA8B/BSrU8P2URk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474803; c=relaxed/simple; bh=ETe7xjHWW1b2dyWEqu+mzr7jH/S4kWsRcee5sNWNUGs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RWqikZ9XZ07JZbk3nKpwIPds2nNiDQoMxbtDBqxLCGQrcHDQwlORFld19jMeeMx0fB8L3d5fTBfwZePTpATcBO89Wd5Xoghe9k2pFecYskwDMdhuGr92DteyHK6maSKt/ulr1UCp3LlfLVxOKG8f/1d97cc2u8BHETROFYxh1Ws= 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=u5D6vHOw; arc=none smtp.client-ip=95.215.58.183 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="u5D6vHOw" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1710474799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=38/wt83nJ9aR6snVd8vXn5qYmIdiido/GJdtnp1qpj0=; b=u5D6vHOwZvchQp6ixuQd6dz4r6idaKFDKTcaZiRCoPeUnOz8dkiLIFPU+hPcDyLUey1wgr IX7H4UpcQloK5ugvhmpX6jlrV0aR6xfjja6TYxY+toxhvkT82pa+KrWZel/Nwjx0dwoGmU h6sds6520v3+duicIQ6eg7ID/7ou+Hw= From: Kent Overstreet To: torvalds@linux-foundation.org Cc: Kent Overstreet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Brauner Subject: [PATCH 2/3] bcachefs: Initialize super_block->s_uuid Date: Thu, 14 Mar 2024 23:53:01 -0400 Message-ID: <20240315035308.3563511-3-kent.overstreet@linux.dev> In-Reply-To: <20240315035308.3563511-1-kent.overstreet@linux.dev> References: <20240315035308.3563511-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Need to fix this oversight for the new UUID/sysfspath ioctls; also, initialize the sysfs path. Signed-off-by: Kent Overstreet --- fs/bcachefs/fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index ec9cf4b8faf1..cfc9d90ab179 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1881,6 +1881,9 @@ static struct dentry *bch2_mount(struct file_system_t= ype *fs_type, c->vfs_sb =3D sb; strscpy(sb->s_id, c->name, sizeof(sb->s_id)); =20 + super_set_uuid(sb, c->sb.user_uuid.b, 16); + super_set_sysfs_name_uuid(sb); + ret =3D super_setup_bdi(sb); if (ret) goto err_put_super; --=20 2.43.0 From nobody Sun Feb 8 01:34:27 2026 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 A75BCDDB3 for ; Fri, 15 Mar 2024 03:53:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474804; cv=none; b=RJaCuQjtlpl7LxC/FJk6A/5A7Gy22ny/HXrHg32QcgYOgtE9PR7OjR63HdgT4+jiKKienywIldqq0k/phw3y8cMoLaRoRiMvGNhIzbX5Ye9HuXni/7gd4yePfkLM4olu8894uPN/zeoGBP9m2s1NU4GxP+XDizR2lFriWermqrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710474804; c=relaxed/simple; bh=2qMcRbP6ZzThdZGcEPqIsQjXmXA3HO46JfwlDTtZ19U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qKT48RgtwGtKVyna92wMTTcdPXg4BxbF1K1O1jLI9OHboyQAD3BYT3uLGS3EeP3b8wBssFMJQpCn3FJsNSRjMieEkia5aUxQfXyRNiYEWJpUzFGEqAgJF4sL2404cypHw3Z33iKh6B7Fv5GOK/1dNWba/4yR1fhV5XINqCyFuU0= 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=TnHAHl0j; arc=none smtp.client-ip=95.215.58.182 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TnHAHl0j" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1710474801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b3OAWR1YN5Ue1DLQYdfxGHPlfZVSaTst3605+wbzFMA=; b=TnHAHl0jBxYCvli6JJtoKK/AtikrGpOLfgq7u/0ZkCZQOE2uOLetAjUV0IUkWDUBWea72i cLleOiAoaNZld7uFCI+Y8geW8Kjdgt+4waqGIp+DLgJObRUzJDTaJSzSYHHxgpqsGhJDrH r5RjBjisWhBPThMRlpbLGRbcqqFbR8I= From: Kent Overstreet To: torvalds@linux-foundation.org Cc: Kent Overstreet , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Christian Brauner , "Theodore Ts'o" , Andreas Dilger , linux-ext4@vger.kernel.org Subject: [PATCH 3/3] ext4: Add support for FS_IOC_GETFSSYSFSPATH Date: Thu, 14 Mar 2024 23:53:02 -0400 Message-ID: <20240315035308.3563511-4-kent.overstreet@linux.dev> In-Reply-To: <20240315035308.3563511-1-kent.overstreet@linux.dev> References: <20240315035308.3563511-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" the new sysfs path ioctl lets us get the /sys/fs/ path for a given filesystem in a fs agnostic way, potentially nudging us towards standarizing some of our reporting. Signed-off-by: Kent Overstreet Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: linux-ext4@vger.kernel.org --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index f5e5a44778cf..cb82b23a4d98 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5346,6 +5346,7 @@ static int __ext4_fill_super(struct fs_context *fc, s= truct super_block *sb) sb->s_quota_types =3D QTYPE_MASK_USR | QTYPE_MASK_GRP | QTYPE_MASK_PRJ; #endif super_set_uuid(sb, es->s_uuid, sizeof(es->s_uuid)); + super_set_sysfs_name_bdev(sb); =20 INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */ mutex_init(&sbi->s_orphan_lock); --=20 2.43.0