From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.219.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796338337; b=q0aLMVhVydgmqlZVg2BkqbZxPtw3BvKZEAvS5W2WWcZ7Ts8aaABBQpuIDBfy2n6J8sHU +Z0JvNe9mZ37Sd5q/IhqEhcrzrZy5na2ehMN55Trxcr3i/UAeEPkevSg1v1gg1bL07tQj 9n9VBoH4LQCmCQKtxLOOP4rxpVYpoNs+nRPQpDNTqPL9vSIyx5PXbwp7VrYKS0sTR4lnw Kp+CtUzu8ckTkxL6e++IAos9iGUZSVMJVKCzV/Lrjur6nSFOq1lXus/mU+JxQvY5MfxRs 7owIX47++dWRwunGy5jZK/3QIgTEqkqgCC9ZcIDurqdesBtFLq6eFg83Tp7/XSXOXFQ== 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-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=MF+BRjBx1/9+OTa2/yExkPFCL873VHtbZu5CV8DRwCBKjBr/gdwmJght7GQefwlXtCt1 3n7sKKRxXuTee+HO75MPgV+cuP4wpYPraMftWDj8RO2KPCHypquSwEYiDTTt0FEu3U34V /Lzv7w09tTceb9g38kHe+0SvNzCXRPD2RMjeqXskbzWLzy+1nJq2dbH0O0SWg7FnzHWiu mwZ5TaYzFdH2xFF2INpVg/Tloh8pz5l+dvYjv262yqxjQkiUEkEcj0HhBnZ6a4vVLMMoZ aFasbYM2Z7oe+9x+gtst2Kh+u/mKD3Wdkn6D1YjhBhm8uIKDDE+JuGEblG4JMJajS2Q== 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.52 Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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 D5534606A32C for ; Thu, 3 Dec 2026 22:52:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D5534606A32C 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-f52.google.com with SMTP id 6a1803df08f44-921d59aa5d2so2827486d6.0 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=UXvr/gq10RygFb7qkjb1d/1NAVNHJIdnIZbwmZnkh28oRCXo9HwTtC8HyfQNhvpeXs APQK50OFhXCus38H3Zw1EtBKbyHmLnbzNc1u/i0yc3HEqnrxqeO6cwWBw5mwl4Gz2WKL 8VWmOZx3W9ZQ+k0i1d8ycJ+NsVMR1Czdt+p0qQuIv8uOrwNo1ipr6RMYVJ+ES5pIL5Mj L+Mwqksj1pHj4F7bsRY2PW7znS04gJ+GrcUZA/mco2blESgDY28XP29EPmqMTPs9Qy45 g4kRCoiU91JiGMRGimriccvjEylulylU1N/feTU8v0EmwLGFVglqQIivM0BF7Gb/w4UK 0yTQ== X-Gm-Message-State: APuU4Z/CFvP4O5xtJB6G3jklMNn/dAFJtNrG4Gc2LRbbcPAzWdsHpWFx +169ObZATe5q+8c/pubUE0RrlLRnpxusdMnKjRAR7qvP+/Eq+55GMMM+jrxN+Itj X-Gm-Gg: AZFdTZevdpN6GKemX79ID9aA86F2WKqA7FsLwasqw2RqXuSDKgeH4VlDMc+rlI2eHug L2hlU1P3cnYhnlbWNkRMIOQ3sLAhXycd8nhN9x6rVhq+TUNZ1CwhwAehHh/MFsr/T+dFa9wggtN J8Sx13UA+WFj1dKsROptbf2cI/yEC/h00tvCCRhLAx2pGMqBh7WTEAiBJAYPOPzuxdvQJOL0CBy DARt/XdaTLYtlk9lSKpIPYytyqv2Mli88KiM9BVutNf37G7gppQOk749L2J6BDozBzAovCNKM+O L8c6F2RYi3VOgbJgHnyc2HjwVNlifCa8o703y5pS/xbezSCTQnBLPR07zZsJRcbvS9Z9WvbYXtw /8lzWPl8vqxGzABYI84Y2RX/qXNy7H8HCf/oxpbDiTqCG5sl2e+OY9DCTJwk1aA51PHsjFG8iEj B8w/qe/e1rkdvwK8y8D5X5rf4zGjftkGNBNzUWbh+AV3ZBRy2KB8IhuDHtvl0tkKHyH1bMH+2MV g7s8oiOBt94NOSFa2tyNex/gZb0gxbmePTaSj5W9trxixkl3RM87gBiiyFBCkYa/07JY9Y5v5yb fxS2b4uPrnaNwrasmU4bGie35Ub2pKz3Z/cexXhNqQd2OIPVMl0VWlOD6j+SXTJhSrztH9Z0GX6 JyLHqPgKXAyzdATTPqIMQ7yB3E4O8MSUUfRlAA3BpL19SS9uPlIVYu1EkL1Vi 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: fstests@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)