From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795998044; b=MH5+8Y+Cj6qGnjj9/B1LRXouZOmiZSlh2A+NcvYN0V3yIGcKJkc+QX0WkeOUVDCwZ9HJ 78FgNDbHILExx0xSdBiFwkMLFCu7HJr/0Rc0aiub0U6OXS/a53HzXoeu0hEsLQ/o/yHTI 0U7K9PGDPBLnVtn48aLzDpkPOFRyWYTe6rhTplO/drjtyp9uAwN3ZipsuK0hIu1HbCivf rsjH2SKsuJ6BuRyCgTRZFJUm/GlovR8/j6NDilMjcarzbo47cv/2j3kFlhYBQbE0RlOGr 70mzm0AfweUvRMkMgnOmN0OHGF08vMAMKZLmES2TCDV9kRtfSYJLL10EJToAQbHY8Ng== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795998044; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=gVfEy7rWVIB3V0N1gTo69WNZS89I1BktryH8RlLJ2fY=; b=nf0qqOebA+nO0G0MslGbVh8a2F+635q2XqVnNgI/HXOg4jlHsInZi65wRCljEbGtqkJk UVjA7XQKMMWloZ27MHYLOI705wnctYIfwJdTTwbrNfAfca3Zm5CHRDhHqac92xwDZ+ph/ mSxcEdA/tttWQFYea7b5TWlK1rDjoWD6UD4YqsGXh9CTJEKzhItnG9BsAoFZ4w+9mwwy+ IuHme6GpqUBiF4EDaja3gQv3Ff3ray+ityhLn/TSN04y1kZhImpXaPnNWW8O7hCn+VTgy beWXuixfTamQw3FCeKGhxs+VY6KkTRZZfg/8s7ukl+ofoTj25lvlRIngSNP5/l1tirg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=BgByBxgQ; arc=none smtp.remote-ip=209.85.214.174 Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55C50606A325 for ; Mon, 30 Nov 2026 00:20:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 55C50606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=BgByBxgQ Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2f0464dd6b6so59234145ad.1 for ; Sun, 29 Nov 2026 16:20:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795998044; x=1796602844; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=gVfEy7rWVIB3V0N1gTo69WNZS89I1BktryH8RlLJ2fY=; b=BgByBxgQIsGz1eYLW8NLTK1HHG62Y67l0/c4ex+vIQHoWYVvtnrxfw9BIKxzakJd/q JvKTXWVwEi9U9UEoL0c23FHu6yV0Q41EQj2YN3WpMTUvA8VKS6xP1BA0NhlSzqqgrEku idTFOz2k9k+cnEoSK2RmWjWknCgUP9qupcEanbJ0YZbR5ZZqNTf1/epFOm0CF3jOnvLt ABf1miB8jo+sVl68M8wRjNlWv0DxvX5S3WtEjrh8rNwLDCGyA+BfWrdbroNUpXzEV7Z9 5Rq+Ba/NNfb8imakS7p6PUhu3UKkvSyTymiMzsVQ/dvdeCAjK2RYO66Z3okM+/oohsPL eBxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795998044; x=1796602844; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gVfEy7rWVIB3V0N1gTo69WNZS89I1BktryH8RlLJ2fY=; b=NZmQiAeB5JdgOJoJCYZi0EG0SbYW4UW7I3hg3vyPiHuOB3cQ8X2aqEFYx8suhJ2vVu faSDF9o6vamPUJjwZ49l3GP1jvcsCTNK2KcktEcL+X6N/7V4yRlC6Xsh3BV0XRKfplS5 AAZeerTfFXxl95wG5ruKTxfzbpeewMRuz+eIa7q1EoXaAuq3Uc2cHhOJT55ystxFyPiA 5Xde7FVVSvapTcTOjQpdYIQgTjzeDLVcuVuYZYUY/E+WFtNbV9h1LTZ57XR2lNba8bk/ sScxZREmJ8SLhTczz91/i6CDpNMXcJbzQYBPFtl1YjUz0bHVrAGM4hsVid5VZEgkha5p 1lZA== X-Forwarded-Encrypted: i=1; AL+hErEQcAz65LlH8Id6A4riL8aU1MzFJsoOF/f9LBD3FmLWJJuyesbmyG2YjCRPgmG5cMkZpbdiIpT9eqLPaVI=@vger.kernel.org X-Gm-Message-State: APuU4Z+3vhJb1Mz50WYYzYs7banYhqQLbstPxNvENLNITr+YG4oQcJUa FyspP/XIRR5wOdA75LamkFa3Ig5KiaGQWbw2z2h7ykVsuaRdGJ81I06l X-Gm-Gg: AZFdTZcxCv9pXZAGBOMwy6z1YAkNgcPZiMJxsZB9THYNEPINMLhZOzqilz5OlwQkXbw sEHjO/Y4CUcm5hp3VlIkYfRpImYBj5gOFLl2KOjWovSBizapFRqadF4EvoroQLhIpKtenlyZE0T sFdgJrw3mnGdqCQ0xDNVO2+BzP8zTc0TBFSxoWPCGOtVUNMnHmE6jT++0MHmNl7LK+ocH6A6ZLE MBGEPmXzee0kWq9XUteqhgdKidWgN7CoS08XtiOZ6Owxp5WcyTE2DXO5qMaPCgodecfznhB9Ogw Td1GW5s3Pbpd+U1L8jlWczBJwQ5vNQ7F8oei349N70a+KJu9mAMiKrVcxRqapkYONF/Ff2i6Fmp 3vMFZ5wf2aE5drLGUI6VQFDec5m1IMnf/ha6Ek5t3r4jKwpaTcBWNXzquq+5zBCWr0AIjmROzOl IqKkK5HRptbMtibjUw6mKWjFM1MJl1Cm33QMsTIIAZzlubv3iL/rPeBa1nnzu10o6GdN4BiFfcz haljdcDhT+gJi78feMWfHlrsYBMcQcIanCA+1wW/JyBpFkW8YrFrd8eevayW/yUABe/zXyUILOg C6bKtsDD3fWp754Yd0SOlx13h+Siq8M8RnPMTDLWcAvQT55GkHwAHXKd/ySGbtk+Fx0/i4ECBRO 2X5AK/cvFWHksn0pesfq6C87WMG7X0sVR2uAR4ZMAokr+nKHTvUhvP+Ydc4JRAMS+e2TVOPz99V GoO3T3o4HwuY2zbGQ= X-Received: by 2002:a17:90b:2f8c:b0:3ac:b867:81df with SMTP id 98e67ed59e1d1-3b41c959e23mr29906097a91.39.1795998043640; Sun, 29 Nov 2026 16:20:43 -0800 (PST) Received: from localhost.localdomain (ec2-16-76-95-95.ap-northeast-1.compute.amazonaws.com. [16.76.95.95]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b405d96bd3sm52527173a91.12.2026.11.29.16.20.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 29 Nov 2026 16:20:43 -0800 (PST) From: Yifan Feng To: Carlos Maiolino Cc: Ian Kent , Christian Brauner , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Yifan Feng Subject: [PATCH] xfs: don't drop inode32 on a remount without inode32 or inode64 Date: Sun, 29 Nov 2026 16:19:17 -0800 Message-Id: <20261130001917.56901-1-evanfengff@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit xfs_fs_reconfigure() compares the mounted state with the options of the remount, and those start out as inode64. So a remount that names neither inode32 nor inode64 switches an inode32 mount to inode64, and new inodes get numbers above 32 bits: # mount -o inode32 /dev/vda /mnt # mount -o remount,noatime /dev/vda /mnt # grep /mnt /proc/mounts /dev/vda /mnt xfs rw,noatime,inode64,logbufs=8,logbsize=32k,noquota 0 0 mount(8) hides this when it is given the mount point only, because it then passes the current options again. Before the conversion to the mount API the setting changed only when one of the two options was given. Start the options of a remount from the setting in use. Fixes: 73e5fff98b64 ("xfs: switch to use the new mount-api") Signed-off-by: Yifan Feng --- Tested in QEMU on a 4 TB filesystem with mount(2) and with fspick()/fsconfig(). fstests -g quick plus 178 tests that remount give the same results with and without the patch (XFS_DEBUG, xfsprogs 6.1.0). Found and written with the help of an AI coding assistant. fs/xfs/xfs_super.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 2f6999b6947e..bdab50bce3c9 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -2319,6 +2319,11 @@ xfs_init_fs_context( mp->m_allocsize_log = 16; /* 64k */ mp->m_read_bounce = XFS_READ_BOUNCE_LAZY; + /* A remount without inode32 or inode64 keeps what is in use. */ + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE && + xfs_has_small_inums(XFS_M(fc->root->d_sb))) + mp->m_features |= XFS_FEAT_SMALL_INUMS; + xfs_hooks_init(&mp->m_dir_update_hooks); fc->s_fs_info = mp; base-commit: 822ba3a89c7896b26e4beb70e2ebffb881924dfe -- 2.39.3 (Apple Git-146)