{"id":2230341,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2230341/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/patch/177747215454.4110156.18424909699837496304.stgit@frogsfrogsfrogs/","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/1.1/projects/8/?format=json","name":"Linux ext4 filesystem development","link_name":"linux-ext4","list_id":"linux-ext4.vger.kernel.org","list_email":"linux-ext4@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<177747215454.4110156.18424909699837496304.stgit@frogsfrogsfrogs>","date":"2026-04-29T14:59:39","name":"[04/10] fuse2fs: better debugging for file mode updates","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"e19bcac3641534435598b6b586102dfb6d9afc7a","submitter":{"id":77032,"url":"http://patchwork.ozlabs.org/api/1.1/people/77032/?format=json","name":"Darrick J. Wong","email":"djwong@kernel.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/177747215454.4110156.18424909699837496304.stgit@frogsfrogsfrogs/mbox/","series":[{"id":502091,"url":"http://patchwork.ozlabs.org/api/1.1/series/502091/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-ext4/list/?series=502091","date":"2026-04-29T14:59:24","name":"[01/10] fuse2fs: add strictatime/lazytime mount options","version":1,"mbox":"http://patchwork.ozlabs.org/series/502091/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2230341/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2230341/checks/","tags":{},"headers":{"Return-Path":"\n <SRS0=z9pp=C4=vger.kernel.org=linux-ext4+bounces-16216-patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-ext4@vger.kernel.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","patchwork-incoming@ozlabs.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DUQHZ6GT;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org\n (client-ip=150.107.74.76; helo=mail.ozlabs.org;\n envelope-from=srs0=z9pp=c4=vger.kernel.org=linux-ext4+bounces-16216-patchwork-incoming=ozlabs.org@ozlabs.org;\n receiver=patchwork.ozlabs.org)","gandalf.ozlabs.org;\n arc=pass smtp.remote-ip=104.64.211.4 arc.chain=subspace.kernel.org","gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org","gandalf.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DUQHZ6GT;\n\tdkim-atps=neutral","gandalf.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16216-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"DUQHZ6GT\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"],"Received":["from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1 raw public key)\n server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g5LS83NQNz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 01:14:15 +1000 (AEST)","from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3])\n\tby gandalf.ozlabs.org (Postfix) with ESMTP id 4g5LS73qD8z4w91\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 01:14:15 +1000 (AEST)","by gandalf.ozlabs.org (Postfix)\n\tid 4g5LS73m1Kz4w2D; Thu, 30 Apr 2026 01:14:15 +1000 (AEST)","from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby gandalf.ozlabs.org (Postfix) with ESMTPS id 4g5LS401Llz4w91\n\tfor <patchwork-incoming@ozlabs.org>; Thu, 30 Apr 2026 01:14:11 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 9EFB9300E1AA\n\tfor <patchwork-incoming@ozlabs.org>; Wed, 29 Apr 2026 14:59:43 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9CC33342CB0;\n\tWed, 29 Apr 2026 14:59:40 +0000 (UTC)","from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F2B62727FD;\n\tWed, 29 Apr 2026 14:59:40 +0000 (UTC)","by smtp.kernel.org (Postfix) with ESMTPSA id 3B7BCC19425;\n\tWed, 29 Apr 2026 14:59:40 +0000 (UTC)"],"ARC-Seal":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707; t=1777475655; cv=pass;\n\tb=SQK7/MOC5wHxzP+97gH0pCG8N+511D6JoRVF19Flxdm7ZS23GwYG6zvmhvsEW1NaO52zCNVaRrySV5oh7CBDEAqg05jGqcSG3HxPTWNpbgQ1NRmt+d6pUUTYqm6vU+UJ2SH9guQ/GxLWXNg2REDvUZbyWmWF1vfs880Rd1qvjyw8swNold2ypg3m/C6xH/qzBT76Yn9VYxLo1qsI4tyGveWSb4kEd12LoVifCXjYfr5HSKxCl9K1eKYurBe1ybolv3PFLHSxnB9urLEM4XPp++tTwTuUXjJB9/VygurKXnlR8y/dEnvhUiyjkylnWfDozzsA2GWKsJ1hdL0PvzT5eg==","i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777474780; cv=none;\n b=Fiwx55n8PTCuSQZIZLLxPIEF2xzc5KAeXhhKW4Q3yWTW8Ji7MNCKtUSrU2Q4ld2ACRv650QKAUXjaU1RS/5AOY3p89u/CPNTYKbzn5nr3swi2pnZVzI5xmYjZeFaQ0xO+C9gKXubZPm/fLLk3EtOzR42h/Q+t1GNVT3+Y6U9APA="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=ozlabs.org; s=201707;\n\tt=1777475655; c=relaxed/relaxed;\n\tbh=05zTVj8rcn1M7k4YLGYUQuJDMpzvL8bbnhQO1Pk93ak=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=Pu9CHrNBLSrRU+8jhjc1xSAy2jzS7PI0AMuqOMB2CJkhGjaKj6l4pnUmiv9x4mRl1AXnSr/TcydbutVB65WcCDi62PlGlDmhK3pZfqwSNK+tbGlbhSSfvSjA4yc/RyvWNvbwUUmka+qCvYejpz+qSRD75K83Pdh+cUYCS1GQ18RET56bQw5LIiRzG1J8UzS2xCwzUkIXgUDKua52oUGrD6iWCxoXy2ZqoRH9uIfoR2Rjrn45JfvgetrYboJvGOmqxQos2bD0OpFzfWLYg7dDplNMe94oYrGtgGHRMkEfzXGKUW9DG3w/2hFgZZJeUg5YSp/9+e2QQ+tC3j0LuSjAQw==","i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777474780; c=relaxed/simple;\n\tbh=hEP8fOPKq3QT+M6toifCIzWnr8DQVR+aVNgkMEhoEY4=;\n\th=Date:Subject:From:To:Cc:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=CanzSxOYEG0sEYhnMy9CpW6Amr6MaD35o52GnxhvQ5kKE+UzZcHR7Ui0Mogauzo6RVqI2Jr2iWmIeTZqOjLiAs6EkYCBBJYgiKs1zzZZxJ9V9T8X19JGQKZIqD/ldLaS4ULTwRUhP63Gfs7BM9RMr5eVwMz0V0UaoILo4Nckt3o="],"ARC-Authentication-Results":["i=2; gandalf.ozlabs.org;\n dmarc=pass (p=quarantine dis=none) header.from=kernel.org;\n dkim=pass (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=DUQHZ6GT; dkim-atps=neutral;\n spf=pass (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-ext4+bounces-16216-patchwork-incoming=ozlabs.org@vger.kernel.org;\n receiver=ozlabs.org) smtp.mailfrom=vger.kernel.org","i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=DUQHZ6GT; arc=none smtp.client-ip=10.30.226.201"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1777474780;\n\tbh=hEP8fOPKq3QT+M6toifCIzWnr8DQVR+aVNgkMEhoEY4=;\n\th=Date:Subject:From:To:Cc:In-Reply-To:References:From;\n\tb=DUQHZ6GTbCJQZldoZmuLCSnErBldnoYe4uDhuOng7iUy0AB8+AfnaDl1OJR+dM46S\n\t JTOLEh9WNhX0FK7TiQrr7V/OhUt4ivgg/GIUqmkYXAz8Vsc3RUSZNDbiAP//crH7vu\n\t lt59bMuV3otibifAd2kt1nMFpNlm/vje+eZ65NpM3/C/Ze0kHHSeyZFp7iXol376be\n\t GlCIKAtH/inGtWfBiNIkFldlJERisklVQCG+Ot1FwEye/NxeXEwI3q0GHMeDatL6df\n\t CEl34BP6FVS8PXEFr8GOr5LT3ROdE3eAQIQ4Y89CfZZ/KzPHE8k0WOmAU6sCJZaWvj\n\t HEuoHk6RFJ/hg==","Date":"Wed, 29 Apr 2026 07:59:39 -0700","Subject":"[PATCH 04/10] fuse2fs: better debugging for file mode updates","From":"\"Darrick J. Wong\" <djwong@kernel.org>","To":"tytso@mit.edu","Cc":"bernd@bsbernd.com, miklos@szeredi.hu, linux-ext4@vger.kernel.org,\n neal@gompa.dev, linux-fsdevel@vger.kernel.org, fuse-devel@lists.linux.dev,\n joannelkoong@gmail.com","Message-ID":"<177747215454.4110156.18424909699837496304.stgit@frogsfrogsfrogs>","In-Reply-To":"<177747215344.4110156.17216553139316774040.stgit@frogsfrogsfrogs>","References":"<177747215344.4110156.17216553139316774040.stgit@frogsfrogsfrogs>","Precedence":"bulk","X-Mailing-List":"linux-ext4@vger.kernel.org","List-Id":"<linux-ext4.vger.kernel.org>","List-Subscribe":"<mailto:linux-ext4+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-ext4+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","X-Spam-Status":"No, score=-1.2 required=5.0 tests=ARC_SIGNED,ARC_VALID,\n\tDKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,\n\tMAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=disabled\n\tversion=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on gandalf.ozlabs.org"},"content":"From: Darrick J. Wong <djwong@kernel.org>\n\nImprove the tracing of a chmod operation so that we can debug file mode\nupdates.\n\nSigned-off-by: \"Darrick J. Wong\" <djwong@kernel.org>\n---\n fuse4fs/fuse4fs.c |   10 ++++++----\n misc/fuse2fs.c    |   12 +++++++-----\n 2 files changed, 13 insertions(+), 9 deletions(-)","diff":"diff --git a/fuse4fs/fuse4fs.c b/fuse4fs/fuse4fs.c\nindex 2020c6bc1e55db..567b576e5f5779 100644\n--- a/fuse4fs/fuse4fs.c\n+++ b/fuse4fs/fuse4fs.c\n@@ -4193,6 +4193,7 @@ static int fuse4fs_chmod(struct fuse4fs *ff, fuse_req_t req, ext2_ino_t ino,\n \t\t\t mode_t mode, struct ext2_inode_large *inode)\n {\n \tconst struct fuse_ctx *ctxt = fuse_req_ctx(req);\n+\tmode_t new_mode;\n \tint ret = 0;\n \n \tdbg_printf(ff, \"%s: ino=%d mode=0%o\\n\", __func__, ino, mode);\n@@ -4219,11 +4220,12 @@ static int fuse4fs_chmod(struct fuse4fs *ff, fuse_req_t req, ext2_ino_t ino,\n \t\t\tmode &= ~S_ISGID;\n \t}\n \n-\tinode->i_mode &= ~0xFFF;\n-\tinode->i_mode |= mode & 0xFFF;\n+\tnew_mode = (inode->i_mode & ~0xFFF) | (mode & 0xFFF);\n \n-\tdbg_printf(ff, \"%s: ino=%d new_mode=0%o\\n\",\n-\t\t   __func__, ino, inode->i_mode);\n+\tdbg_printf(ff, \"%s: ino=%d old_mode=0%o new_mode=0%o\\n\",\n+\t\t   __func__, ino, inode->i_mode, new_mode);\n+\n+\tinode->i_mode = new_mode;\n \n \treturn 0;\n }\ndiff --git a/misc/fuse2fs.c b/misc/fuse2fs.c\nindex 6e19f5ae796127..2e0fdeda963de2 100644\n--- a/misc/fuse2fs.c\n+++ b/misc/fuse2fs.c\n@@ -3616,6 +3616,7 @@ static int op_chmod(const char *path, mode_t mode, struct fuse_file_info *fi)\n \terrcode_t err;\n \text2_ino_t ino;\n \tstruct ext2_inode_large inode;\n+\tmode_t new_mode;\n \tint ret = 0;\n \n \tFUSE2FS_CHECK_CONTEXT(ff);\n@@ -3654,11 +3655,12 @@ static int op_chmod(const char *path, mode_t mode, struct fuse_file_info *fi)\n \t\t\tmode &= ~S_ISGID;\n \t}\n \n-\tinode.i_mode &= ~0xFFF;\n-\tinode.i_mode |= mode & 0xFFF;\n+\tnew_mode = (inode.i_mode & ~0xFFF) | (mode & 0xFFF);\n \n-\tdbg_printf(ff, \"%s: path=%s new_mode=0%o ino=%d\\n\", __func__,\n-\t\t   path, inode.i_mode, ino);\n+\tdbg_printf(ff, \"%s: path=%s old_mode=0%o new_mode=0%o ino=%d\\n\",\n+\t\t   __func__, path, inode.i_mode, new_mode, ino);\n+\n+\tinode.i_mode = new_mode;\n \n \tret = update_ctime(fs, ino, &inode);\n \tif (ret)\n@@ -3678,12 +3680,12 @@ static int op_chmod(const char *path, mode_t mode, struct fuse_file_info *fi)\n static int op_chown(const char *path, uid_t owner, gid_t group,\n \t\t    struct fuse_file_info *fi)\n {\n+\tstruct ext2_inode_large inode;\n \tstruct fuse_context *ctxt = fuse_get_context();\n \tstruct fuse2fs *ff = fuse2fs_get();\n \text2_filsys fs;\n \terrcode_t err;\n \text2_ino_t ino;\n-\tstruct ext2_inode_large inode;\n \tint ret = 0;\n \n \tFUSE2FS_CHECK_CONTEXT(ff);\n","prefixes":["04/10"]}