From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796338337; b=gwqRk9mg/Dj36gdV2mk44Y2VvXXehNkW9j/ReCl6CKX8CXzlkF9JxiwVTedGPhzo+VZt Fe+anoddkLezre8yPWfO7pZQimlhL0/A/kmtrrBTJo4OizPHcH8XjJK1RfKsBP4AziveF OklDI30U7E9I/d19tHGhUigmrjSu3EFKCp8EbSlLft3OAYE26Z6w1pizztflNSRhljlM3 Xbqhn+PzLFOaxUn6qfelgmobPqi6MbCLeyn/djLfybTNr6LKsXnqZ9gWNthkvm44ZCEfU yB4wkyv2v+jat+5utTMMdudOtVnPQLxe01I0fhXZVFFzHGWO60T1NeMKIZuYY+GtvYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796338337; 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=vqnHbyg/MUJwO2U5lDKwN2g7FcKuCuzs/i5IXsJf64s=; b=4NUG938XJFiew6q5h3HU2FLcna6P73PiyF1z+MrHxTsCrJUGYJgdFBPLMASPsp3xhcvR IvvoBe8JOa4SeSzzSF+ARo2FCMqp0k8Kx9+XmL7gR+cfAtxD61ECNHPcWLyN86de4hpuF Cy3pe0MiDgUKe1m7QqBORIfDl5LPz5Hwgub6QlDR/DO4MEKbdiELEmAco+druwaakptzl 3S4QtOZhspltZ7EkpA/3g4zZdXu11z2R5d1TOIweBXw91jSopi0rHHyq3X0ODoPrShYkL C8rK6ZHrIJRTVMC7PEjJ+tPvCLdXuXAfHOHXqKiDdslUvSMwpZDtPgT8FDyz457PcWg== 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=dNCRc+py; arc=none smtp.remote-ip=209.85.219.47 Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (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 D4105606A322 for ; Thu, 3 Dec 2026 22:52:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D4105606A322 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=dNCRc+py Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-91e7af9a67fso2590046d6.2 for ; Thu, 03 Dec 2026 14:52:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796338336; x=1796943136; 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=vqnHbyg/MUJwO2U5lDKwN2g7FcKuCuzs/i5IXsJf64s=; b=dNCRc+pykYfY0zes24vf3wxOlnGbbj2pKcuZMgS2mJyrlpQt+jXW1ydkev4dp389aC Yw6G/7VWMXmL6xwxfvbY33VNV8Vp0fSHs85CEm5cEuooQC7D6cnKcPDDDKtvzAaXpwWI 5WLU29ErCbmTE6PQ9XRisoGcYL8qe/g3RmxezPcr2cpduanEp+BCEvEyuIrwBs/DiZ+C dGpaTp62GLkvHliX5hWUZan+AXQn2SgrfntUFw/EwKGBDP4zGBOz6FLzKajoFQXCVhl3 Oco/bfZOrt8TI3rJZ2++G8HNiFXBY/krf0WqyeCuIMo5/Yg2cxqlCFcSgcA5+4C6aS40 IAKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796338336; x=1796943136; 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=vqnHbyg/MUJwO2U5lDKwN2g7FcKuCuzs/i5IXsJf64s=; b=XjSAtN3uFXQGXwzIJBZfv3YtVbnr7FYJIXRdKCsmO8pWokMGTrbiui9nZlFyPPWe6o Bm37mPfJBVzE0/N3WahX7xbFQx3f3WCZZqwxi9YnIOSl5ElKT0rp1mvHoluqPCBs+sbo fnqaMAq/SzxeKpXnJEQvY5KBhLcI66DLgXU/cQm+EPEtx6dG8ZxRhZNHY39dLpRzXu/c 00EJKEzkU1i/GZv4yuc60r1byMivED4syejFEGtqyXq1jC/AXYhf7dd/pmgcWM4I8T58 PLYTWm0e6RkvFs3ii5MseleEiiMndUa+XmSpg7iPFx0SALFykUx7ctRON7yYlLgd8QMR vNYg== X-Forwarded-Encrypted: i=1; AL+hErEcnPVU5sydxV2udjyxNDQVRrnZWJeo31y//l+391zJrwxCVuOFbICL0O+voimvAFzg7FCKveS8fAk=@vger.kernel.org X-Gm-Message-State: APuU4Z/cBmmC355mEtWkFf+yooeMVS1yCP8hZci6/TR7naLTlUnYwK2K vGHsWYLvt3Xi4hdPIpoeu0LOY8x6XBCdxZptcbHBBizV+Lth2RVSrLXyk9l7k7CN X-Gm-Gg: AZFdTZdSedrEBwwcgxG2PKF3Ot9HK7/9RuTC5i66Hfp3YAGSdj3l7mFWs2bjsCeh7CV 2IyZ34u79lKEdc0Lr4ymNNaTVb76FP1PSDMobSYk833qLcoPke0T9ewSArIENR302ODoy8e1z+B 0Bi8V0WTJW7g8QSkuHqjIxly/Z88BsO7o54RBE5qxYuC9EideWTwNc3IuLdngJLTvklsqbcY2tX 1RTcMxVQTSFj50z7KmiFcXJ3MMphhnjCIoa/KC+zzQYRY7wjbo8JWpHS0MdaG08BGamLAksOm5+ mGPuA1Z9AvcMNpp70uJZLrc1Vh+RetRNua0Kb2bP6O8Fmt+ATP8+BKuiq8sZP+p2gbg2dD9ntQO JofhNzESdAonHYSvLToKnA4FCkb1FZmP1c1mgWRGAQBpQkEQfJ3gPtQSWXh0TLm6y1w4OMeFvJe VIeuJFlEn3uYpVnCoJ+OS/y1mk/TFHny9g9RN/EOK75iWwsGavoqbM7lK23vAJ88zo1ClsUA2sb +nAx7Vbw06p8W47WPF+WTZTQTA4XlM6VAuQ5fDvt4EHj9a7W2nIesPTDYLgm93Fjv9FCK9klEhy LJkY8NjMMq0/UiWbMuv1OX+l4eWa4fiBlFVfdEWqr17hWVjmLTrwsyKNpjDH0bPuuRzadnBz5Iu y1+hmowQwlM2Rbspa+79qKNW/rMJh3I9Ik3jQnA3SXULFy3yzS4k8Sf6C9h9U X-Received: by 2002:a05:6214:19ef:b0:921:1955:6578 with SMTP id 6a1803df08f44-921e23b039bmr3176116d6.7.1796338335580; Thu, 03 Dec 2026 14:52:15 -0800 (PST) Received: from FKXX2DL94F.bytedance.net ([72.29.204.230]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-921e0577b24sm6254256d6.16.2026.12.03.14.52.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 14:52:14 -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 v2] xfs: test that a remount keeps inode32 and max_atomic_write Date: Thu, 3 Dec 2026 14:52:10 -0800 Message-Id: <20261203225210.52237-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, and a remount that did not name max_atomic_write reset that limit to the default. Mount with both options and check what /proc/mounts shows after a remount with an unrelated option and after a read-only/read-write cycle. Also check that a remount which names one of the two options changes that one only. Signed-off-by: Yifan Feng --- v2: also checks max_atomic_write, as suggested by Christoph Hellwig. v1: https://lore.kernel.org/r/20261202210837.24902-1-evanfengff@gmail.com On 7.4-rc4 the first line is "remount,noatime: inode64". With the inode32 patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@gmail.com , it is "remount,noatime: inode32". With v2 of the max_atomic_write patch on top the test passes. It is not run where max_atomic_write=64k cannot be mounted (kernels before 6.16, no reflink). Found and written with the help of an AI coding assistant. tests/xfs/842 | 49 +++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/842.out | 8 ++++++++ 2 files changed, 57 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..a07aa95 --- /dev/null +++ b/tests/xfs/842 @@ -0,0 +1,49 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2026 Yifan Feng. All Rights Reserved. +# +# FS QA Test 842 +# +# Check that a remount keeps the inode32 and max_atomic_write mount options +# when it does not name them. +# +. ./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" +_fixed_by_kernel_commit xxxxxxxxxxxx \ + "xfs: don't reset max_atomic_write on a remount without the option" + +_require_scratch +_exclude_scratch_mount_option "inode32" "inode64" "max_atomic_write" + +# Remount with one option, then print what /proc/mounts shows for the +# options under test. +remount_and_show() +{ + local opts + + _scratch_remount $1 + opts=$(_fs_options $SCRATCH_DEV | \ + grep -oE 'inode(32|64)|max_atomic_write=[^,]*' | xargs) + echo "remount,$1: $opts" +} + +_scratch_mkfs >> $seqres.full 2>&1 +_try_scratch_mount -o inode32,max_atomic_write=64k || \ + _notrun "mount with max_atomic_write=64k failed" + +# A remount with an unrelated option keeps both. +remount_and_show noatime +remount_and_show ro +remount_and_show rw + +# A remount that names one of them changes only that one. +remount_and_show inode64 +remount_and_show relatime +remount_and_show inode32 +remount_and_show max_atomic_write=0 + +# success, all done +_exit 0 diff --git a/tests/xfs/842.out b/tests/xfs/842.out new file mode 100644 index 0000000..6e053c5 --- /dev/null +++ b/tests/xfs/842.out @@ -0,0 +1,8 @@ +QA output created by 842 +remount,noatime: inode32 max_atomic_write=64k +remount,ro: inode32 max_atomic_write=64k +remount,rw: inode32 max_atomic_write=64k +remount,inode64: inode64 max_atomic_write=64k +remount,relatime: inode64 max_atomic_write=64k +remount,inode32: inode32 max_atomic_write=64k +remount,max_atomic_write=0: inode32 -- 2.39.3 (Apple Git-146)