From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.171 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796245726; b=iqlTzNkegDqOMB7Ua45id5ngQ2dpmg54R2lPUjPkqrwF88Li1ne9DxjcjgTInjqH0Yw/ EDFKVcX58f1W0BywEFvgvSmluANntZSvaPKIoXQT723Vnr/ub+wLdQOKhqjOpR8jG3XRS Az06fLAtum7THvrrzwgWNOEz1uG8bKV8no2a04sX4axauxnXHkSZRfMkm8F6qVna7Yphz 6EPOKcLypQpXfLJdrAQWSYVhe0h3MIOVXlGktKWS22mjMnS61Cd9gR1NXvie+bBof8wOc I4qtpl3RjwNI4ZzveyG8XXEJfDeItVAps1ozr1HXqWl+VtRFWnJ5B5ba2fAxyJ7uYQQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796245726; 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=X7F6OGhaxFIbJChgtbhlCJqbHZDarVV0utr4U3Ec0xI=; b=4OuInUkLW8sVbAVPAr3OfzCnxdDL6O3G0T8+NxfF04BBrrR+wEwAo6Qo4b6TLHFfgGPX QCd983mM7/h/HlIzqVwGHoSI4poV+Zcd4MM4sPCMVI8ndzDkAueEHRDjQqQ1beIQAkV8G c1iShf/Ea2qF2GPgEOqRcHfnTmx5pnLC0FDGbIRbG3PnWXL1ge5z/H58c7pUFZmwx1CFw d0nPZvhBBaDNcXmT/X+Kc0j4/YZh4ourmOWBBl6xgRhw80ZeVgBRUCuGPIME59VwvISwG QTSUP2vPdh7tPoTbdNzI4wqx8qXd1A2DOGHFvXq/vR5/fY7a1rNn94UJarwb3+vClyA== 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=TMfYTpzA; arc=none smtp.remote-ip=209.85.160.171 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (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 15146606A32F for ; Wed, 2 Dec 2026 21:08:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 15146606A32F 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=TMfYTpzA Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-537548b811aso108313191cf.3 for ; Wed, 02 Dec 2026 13:08:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796245725; x=1796850525; 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=X7F6OGhaxFIbJChgtbhlCJqbHZDarVV0utr4U3Ec0xI=; b=TMfYTpzAZJmETmWlGdKs9DEYAkJAgx674Z4754zpds9E0bDv1FqGaTTHM0i1b2i75p IcK+XbImQtoUqyj0fMu3kZDQQxP9hfYoPetxbTIO3ESfiAvTgVc5O7JK2lVHK4ba3Y/A c1tqg/Wq9DKeEdxrTkC9Pvf2uqYaX8dX+LyqiSV3kRhd+3No54OxYrmc3Gzphxa3L8rQ pIErZ/ijSdCQt/vYgYpB7Izsci67q66hBLX1M8QLmT1zL/22O0PJZjV2zIHjsQ1s2Il2 FnsBonppPv8MaX0hg9h6fpu6JWxsx3ZE1uj2FGpsngKxVWCdvhDMepP3Qmo4MvRTt07S IZIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796245725; x=1796850525; 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=X7F6OGhaxFIbJChgtbhlCJqbHZDarVV0utr4U3Ec0xI=; b=LDiAUk8svSlF1ytzUsIH46s7OsX/BHZhY72PoDlI54SyhyLa5Sfibb8rv76imbY/o9 2N/ZZBqGoxiZEPdWslKzkM/FfTcXOKKl8QzkXfDt2DxuMwNK0Lqfaxe7fQt6CqLC/1cJ 08ZW2ETzCjOCNIzA426JjfPwq0chwui6e1mRpQhL0b06vijjMwX6VmX14Cn8JnSGQh9H WX5pFYkQcai/ObSdqSJS91ETe/yj8cKE4L6LhoDMVuNM2RppF2+Tzs9eUNoJcv3DsHuT C8loLI0z5+VilwDFI/yLh0JT7cRDqIcVRg+Ae8JVd3da2UR0uX5NShg+lJeN++fOv5Mc amiA== X-Forwarded-Encrypted: i=1; AL+hErE7PlZ40A+T129PDYJl3ZasDrNBcb+DEQdE21XkT3V5XEPeCCTidNieVeXQAbxw3qIq5EMFzXn2Tc4=@vger.kernel.org X-Gm-Message-State: APuU4Z+ETiE1UEWb2hAGGcYVqlUJ/cVs4d3GXCNI8CrC8HOfbCHjwrvu j5wk9DajDf8AuL7Gp4rnunhUwoP01lwHh9Kjw/szXmRq+2quPFjqoMLq X-Gm-Gg: AZFdTZdYbifFIRru0T+crBUyPQPy12cV8Y4tFNO9KYlFQIDIFnN3cVgM/ZicwXKv+UP /I5RorzZfKLVqEVMnty9hJeO6eHC05jUlGErcmtC6UP1MAiXSOiKzk59EUkjmYj+ZTzJqgPypix LMfeP0W85miOhjGfa4r/ipjV1lCzghMelAdwMQoEZxYPPKfbLPNDadekBuLUajQUxMskMvrZcIg vQzg8rg2E5yrPxI+bsJXEl16f1aMu+NVYTm/QttK9Xo9trRYWpupa2Ft5gsiZphZIJiLB6QgOXE VQ5e/Dbv4tYU+ixXOWPCav8TkywogwSZTqsN+2d0GzJKFup7v6pH/KaLvmC8CtCFhNnroGt6fU8 Jzg1JQVn1WJwRGeKwLWO8bmJ+u7yJzwoFFJAv65yszV8wPA1TDdnA4Q/bWRyZ+naffZAY380BwJ JuMCGhGy8Yr5PjpSv4b48KoCufUbt42PPif2bg3nm9hs/X2ZIGFLbNy2L6ZcwSgEE2xyoRzTDRI TGS/dq2sFgdLOSYDRUVofJel65sMDfPSPYVHYokoiaN571xlAo8hC/OBTzxAY+9A8bwiPfpHObr FqUSjyX62Ao/hg5HPBqSFOJlLvDCzkuE47GcJCKJKAyfO2N35i1sAIj+HB5eb6RoFkAaElIL6nB 5m6Iq9/9dy43oLbioYRj/DaPZAeuUhbws8IxElB7S X-Received: by 2002:ac8:59d4:0:b0:533:3af3:43b9 with SMTP id d75a77b69052e-55d76a1c9a7mr839115341cf.44.1796245724131; Wed, 02 Dec 2026 13:08:44 -0800 (PST) Received: from FKXX2DL94F.bytedance.net ([71.18.96.12]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-92134a0f5d7sm360928166d6.37.2026.12.02.13.08.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Dec 2026 13:08:43 -0800 (PST) From: Yifan Feng To: fstests@vger.kernel.org Cc: Zorro Lang , Christoph Hellwig , "Darrick J. Wong" , Carlos Maiolino , linux-xfs@vger.kernel.org, Yifan Feng Subject: [PATCH] xfs: test that a remount keeps inode32 Date: Wed, 2 Dec 2026 13:08:37 -0800 Message-Id: <20261202210837.24902-1-evanfengff@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) X-Mailing-List: linux-xfs@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 A remount that named neither inode32 nor inode64 switched an inode32 mount to inode64. Check the option that /proc/mounts shows after a remount with an unrelated option and after a read-only/read-write cycle, and check that remount,inode64 and remount,inode32 still switch the mode. Signed-off-by: Yifan Feng --- Fails on 7.4-rc4 ("remount,noatime: inode64") and passes with the kernel patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@gmail.com . Asked for by Christoph Hellwig in the review of that patch. Found and written with the help of an AI coding assistant. tests/xfs/842 | 44 ++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/842.out | 7 +++++++ 2 files changed, 51 insertions(+) create mode 100755 tests/xfs/842 create mode 100644 tests/xfs/842.out diff --git a/tests/xfs/842 b/tests/xfs/842 new file mode 100755 index 0000000..fd0365c --- /dev/null +++ b/tests/xfs/842 @@ -0,0 +1,44 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2026 Yifan Feng. All Rights Reserved. +# +# FS QA Test 842 +# +# Check that a remount which names neither inode32 nor inode64 keeps the +# inode allocation mode of the mount. +# +. ./common/preamble +_begin_fstest auto quick mount remount + +_fixed_by_kernel_commit xxxxxxxxxxxx \ + "xfs: don't drop inode32 on a remount without inode32 or inode64" + +_require_scratch +_exclude_scratch_mount_option "inode32" "inode64" + +# Remount with one option, then print which of inode32 and inode64 +# /proc/mounts shows. +remount_and_show() +{ + local mode + + _scratch_remount $1 + mode=$(_fs_options $SCRATCH_DEV | grep -oE 'inode(32|64)') + echo "remount,$1: $mode" +} + +_scratch_mkfs >> $seqres.full 2>&1 +_scratch_mount -o inode32 + +# A remount with an unrelated option keeps inode32. +remount_and_show noatime +remount_and_show ro +remount_and_show rw + +# A remount that names inode64 switches to it, and inode64 is kept as well. +remount_and_show inode64 +remount_and_show relatime +remount_and_show inode32 + +# success, all done +_exit 0 diff --git a/tests/xfs/842.out b/tests/xfs/842.out new file mode 100644 index 0000000..34e40a1 --- /dev/null +++ b/tests/xfs/842.out @@ -0,0 +1,7 @@ +QA output created by 842 +remount,noatime: inode32 +remount,ro: inode32 +remount,rw: inode32 +remount,inode64: inode64 +remount,relatime: inode64 +remount,inode32: inode32 -- 2.39.3 (Apple Git-146)