From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.175 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796433760; b=IulMDrXt8VsmmefYvQ0utrWUtEEpTgQYHu5CwJaKUCgKawo77YSLkJSOkA7hO4IDCF22 XHVI7B54oGEUkxp0cL7EGpKLtAtBZasUIBpAjhduoPFHvJxCYy61NhW7OUMh9T5vMBlcI u6dlOjYuXyLIO7VRAYxzQ/W5IgxpT7QX3dmspjjtJfmRXQkKHDzkoFbOn/uBjvGe1QqhQ 7oh5Gcj41s3GWuwn/3YAbaWWExfY3ujErBo1S8g2c0CB30cs0y3U7/U6C1Ijh8YUhjRzY CTh1jAAEVKMwlFvCMylRTIXmesWBYckFBpWw6XXRcEvrvPx+Ei87VGat+8rk/dxn6YA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796433760; 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=RQM3m8u1zrYembuqK6C6E2kPJlZ6nC+RnLG6huIrQcA=; b=iDckkNEopdXi2/vvimLGJucTtjEA+93xf8MaGQdOSVm36YMUJeuUdhGHJVHA0W0sKsNE MIDl6CWmaYMhpSqeLE0wb5HOnoMc7txMMZkbdvzIULrkyqyBFo5ef+LXNkHQ0BxuWbo4n J7vasM/VapaYT3i+gbeTPpcTKXHyD2BiIT5lVINzIN3YjfNKnMquYYUGc7wz3DlQuknQa BdIMwPwhMJ0yOGNwwmh3YIUzIYqFbw7oERoufUAtTu+zjXhhLJoi8mF8dxmV0m1F7LGOj +H0WODUZxIFeTh5k+YtZbv7D4YL5u1XnEspaU1VvtVrc8+hQ7bSsf7w8FN0zoAYlWTA== 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=MkcEJKg2; arc=none smtp.remote-ip=209.85.222.175 Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) (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 BA752606A33F for ; Sat, 5 Dec 2026 01:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BA752606A33F 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=MkcEJKg2 Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-94999a08973so131546885a.0 for ; Fri, 04 Dec 2026 17:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796433759; x=1797038559; 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=RQM3m8u1zrYembuqK6C6E2kPJlZ6nC+RnLG6huIrQcA=; b=MkcEJKg2y9ABAL3xoTbuBdqv9741uISrTAAdz4hiSytaiJmgdrIxuz0Lj2P5151V9k BHKTNXfCMgiaG0kqS5ahCRK82z8jkfkskWdz5wlg/zpHa5HTQVwFAEq4tpiw3UOrKLmL wgClQJKKHmEgHuIHfPl0jBaQ/lDV4oPAQyIk89gWlBGAenCotNwNZZPHg64TEh1a/HQx jvD2uVgZcBBAlY7P4phc9xRZESZ/SXD4TaGOAaeyHwvnP7mPvb+nLTxOBBi1JIy+jgAB pTtyONhQ6R2WqbNZR0r8zCn4s+hQPgqpwOFXAWUQcK2MDOUS2q3OBfkf4SOjoHmg5bKz gZTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796433759; x=1797038559; 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=RQM3m8u1zrYembuqK6C6E2kPJlZ6nC+RnLG6huIrQcA=; b=uJaV5WNtTQdjt4Hz6kz9Dug8nNREaEBj0nlwg+PLglGiLzpEGAvtPCsgV69nP1szor efnHMM/T3E5v0RjZhv6xLV8CQOAmzv42jEzG47Ta2HCndnLsAF2+L3BOAEDKrqSIDcCb tXRha2CkZpGuYkF/h8HYTgje+xnHwbUboHPHhwq23FW7C1iWMO75W6hbcibAHQ1n9Cw8 +ZwrGKJcRNl38CE5JmBpgZ3v7OX7oi+vzIgEFqrAteToXtFREt6vTHNQjP336+/7ae+F i9klXv6z+mY7P//KAcRFVY8fyBu/Sz/hDjLGAjuNjunvY6EAQtgZDHvn4eLEXEu/pqAi epXw== X-Forwarded-Encrypted: i=1; AL+hErHmflRLUq1wacKJieJoDJBcGc2Dd/G8ND+gD/fPXovwkA7Q5g2YqaV5XuJzJm2OqQFZ17TnMAy3EJ4=@vger.kernel.org X-Gm-Message-State: APuU4Z8jARGOIsOM2B9BJBXBwRis5PlE6kVWSHSuwbXYSvkVwlnmsjRL NGD/2rhvGj2OeR37DhBtpgs6VYs2x3HF7uU1gszWtNFqi3veKzVSaDCs X-Gm-Gg: AZFdTZfGQbSal1YC350tu9x/PXE9f0DymwQ55YvS8g+m/tjJSjaYvbyslSYGdDiUEi2 WMyLgPpZWy3JcecS3Z8gKRgs9itXIBq9/j05Bqw7xB4nBgqayt4GYLQkTAOz7dfKpDbInmCYZYe Cv/LF/IHlVrqwkU3YGLBJzcKyD62Pw6aUf3TvEC+vfonDsLfxhh97N6XhMXVpMgZJ3Hw3q+fTlR H0YeaPg8RNHvSNArDW1Pkr5BkEWjsBc4EIHLxRgegdE8Ll10wYOt7WyIg+FjMumO1ytG8Z2Wpmb VJFUoTg8fGuB6Y30KW2Moq4Y6rUJj+3Ftzhj5IJvMasrqHYW9V+B3VKN/2u1dBaCPbyv2gXXKtv AsgojghrGL78x1LkZ2fnh3otNLZDjQBDkIl+1zxZSiyZE8iU5T8F+AWjun+frGVK/z4w4hAXkek QMdnacUs9QQDk1HVes8WfO2MI1eEwsLPGQp+VqzpC6RZSsG1o4hD/NLhrWbsw649Wtv2t8pWEaq ItenK5B1cQFHxVKOhwZlowI0mx+MUg7rvvw5Cuf0IUUnoFtjnsfLe+fc6mKKscajQJW0/tBGPi9 HpLZImw3AtIKzyTwEGzbft1ceiynvCgEG2q4xOIM5uFMMWqWm3Vjrwuvt49TuT4egAQ+/nXARPi 87ueI2MseuCzKue24vGr4x0WQgTkSlQ== X-Received: by 2002:a05:620a:1d05:b0:945:c3b7:e704 with SMTP id af79cd13be357-94a827d77a5mr611437885a.39.1796433758697; Fri, 04 Dec 2026 17:22:38 -0800 (PST) Received: from localhost.localdomain ([71.18.96.12]) by smtp.gmail.com with ESMTPSA id af79cd13be357-94a7f47c9a8sm365328385a.13.2026.12.04.17.22.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Dec 2026 17:22:38 -0800 (PST) From: Yifan Feng To: Carlos Maiolino Cc: Christoph Hellwig , "Darrick J. Wong" , John Garry , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Yifan Feng Subject: [PATCH v3] xfs: don't reset max_atomic_write on a remount without the option Date: Fri, 4 Dec 2026 17:22:32 -0800 Message-Id: <20261205012232.34935-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 xfs_fs_reconfigure() applies the max_atomic_write value of the remount options whenever it differs from the mounted one, and without the option that value is 0, the default. So a remount that does not name max_atomic_write resets the limit: # mount -o max_atomic_write=64k /dev/vda /mnt # findmnt -no OPTIONS /mnt rw,relatime,inode64,logbufs=8,logbsize=32k,noquota,max_atomic_write=64k # mount -o remount,noatime /dev/vda /mnt # findmnt -no OPTIONS /mnt rw,noatime,inode64,logbufs=8,logbsize=32k,noquota Start the options of a remount from the value in use, in one block with the inode32 setting. A remount with max_atomic_write=0 still goes back to the default. Fixes: 4528b9052731 ("xfs: allow sysadmins to specify a maximum atomic write limit at mount time") Signed-off-by: Yifan Feng Reviewed-by: Christoph Hellwig --- v3: rebased on the for-next branch of xfs-linux (ab1a77ab136c), which has the inode32 patch. No code change. Added the Reviewed-by. v2: https://lore.kernel.org/r/20261203225201.52120-1-evanfengff@gmail.com Built and tested on that branch in QEMU with mount(2), mount(8) and fspick()/fsconfig(). Found and written with the help of an AI coding assistant. fs/xfs/xfs_super.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index bdab50bce3c9..808be1bafe3e 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -2319,10 +2319,13 @@ 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; + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) { + struct xfs_mount *cur = XFS_M(fc->root->d_sb); + + if (xfs_has_small_inums(cur)) + mp->m_features |= XFS_FEAT_SMALL_INUMS; + mp->m_awu_max_bytes = cur->m_awu_max_bytes; + } xfs_hooks_init(&mp->m_dir_update_hooks); base-commit: ab1a77ab136c24fdbc81291530963d2be5d482d9 -- 2.39.3 (Apple Git-146)