From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.178 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796245716; b=gXfwQmh4cxUVq4GqHvYkzdKzkB2a+yuUkhRsRUs6d7XIwTZ0zn49lDOvhvUmKR6HQA6n 0RtYcm7Bt1yZY7E0M+pxIfGuRCTGzVa0WC987kNHSlStl4afzcq29l2gnZeSNSrcwbSNd wMjYQ4xoSb1Hw8kYMmGYKzTxjkpdtAs6hx+pNTVHAR0j4jMRZ15ozARod7B5kOWB2s7qU udJS2LB8CHOD8T4fvqbXcddzmCng5ex9XoGpOKNFcaMzIl1SYrrHzdQxV7dHEV5R+qQsN IH/TQ5HsA72/v6qt3wPXbpPYECLuAlAAZ5V+m7tIiDpapSpRu0TQp9GIDr49zBtlkfQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796245716; 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=/xun31LldFABwZfjYre6DsYqUI7fRST2RN/hvyRQgCQ=; b=pXS8Tv8lP720ve07bSdwEKHyXAsk4ghsU1OBKtty180Zpdwqr5VkxoPIXDjX126xtFOo YqXcJ8LDzDUBEkticQeoFScAHMnyuvz+TLARk11E1TNVWrJc992rfm5BGyom9y+uF+UVG NRuMXuJUXYKuNlfOt+pdfANeOOP5T0QZdI8MKKb89O24ees+JMx1fH0YC813dLsGV2tre OjYp7lXTBw3b5uYT51SnS18G975eiIUtqZiLKn/MLNPeeJHACmu61T7M5PVpAc74prMj6 LQ02t+HYiXJvGLBm6nlj742nH2/AW2WkyCJ+b9D7WyHK6RlG+jwD3aq7fa9ApeWjYaQ== 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=WnwnkdNd; arc=none smtp.remote-ip=209.85.160.178 Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (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 E3997606A32C for ; Wed, 2 Dec 2026 21:08:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E3997606A32C 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=WnwnkdNd Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-55d6deecef6so135069411cf.2 for ; Wed, 02 Dec 2026 13:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796245715; x=1796850515; 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=/xun31LldFABwZfjYre6DsYqUI7fRST2RN/hvyRQgCQ=; b=WnwnkdNdDUzHLhQTkD2il9kCRYYe6fjQ8ej3PVso9VDZC+zzmacDGfGjNFexOWpr/P MWyOjrAS5Q8H9b8C0BJQ4sE4V2R20TEZw+G2yXH3yNfemsdjDg/4OjShrBvF0/931mYG e88gO+ZpCRazs7YP3EmOaAq2sdevqYefV0hw+hLyh0RvW3/COL1Z3ObBGvMukMofL+d9 A10U2fvOlpgqW9zY4QiuhgyMOdNh6eKP9YRHDIF/e8Glk8gLH0fbnaxQsL9BbBP0+Vc0 ee7LYG0CJbKKBsE1hq5jey/XhtukTXnGzNcDVXBcwiddUxvQsyAITw7AIgMLH2V01lQO EoCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796245715; x=1796850515; 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=/xun31LldFABwZfjYre6DsYqUI7fRST2RN/hvyRQgCQ=; b=WcNVx/MqkcIOSC6NuqDsoLlJ1r5Eacpe3gWbAYLLwxd34wjm04TF6/EFdm62YmJuXf FMSieHfnFKJqaxmIe6e/8CIALrcHmILgoofDejnD9D/UWTUKyuS3fISt24DVJzyMSB5L K2a8BOU8h46U+7FudXh1e4hDheeZTzOhBUebp0MwybFZOkcEnM3poMmA/h8zQzxkkARi pnNxOLMM9KN45NG1TIc5rTJtnEUcFmzzcIHIjqJ4NpEQr1jJSj1WwU2d2cP42V8RbiYb ZYfdP5/0jUcDPToo7hDa7hZ5dajPTZuNMeZ0oQy+zJxzoTmczKxpo9XxQDZeh7Z2YFu9 s+Dg== X-Forwarded-Encrypted: i=1; AL+hErHSC2Go/HRVXSIG8tVs3GjHdF02EEafGSOY1Kitjq91G8gDesOfHj/sB1hCn57wG27JFrvl3dUzXcAEcTY=@vger.kernel.org X-Gm-Message-State: APuU4Z+r+uX5qe4zgmPWLJ4gLidQjRQ+WcNjQVSnJ4G5s9ZxpH4F1REA QOC5D/ZgA4Bni+ZATvAf4TcNghMje9UwmjPp4X53uv+U/IyHqWcSN0uC X-Gm-Gg: AZFdTZdSOA7yDH4MUyFbCrYv7j8jdHaCsPkR23S7ecRr/n3tVujaP4pcEZSXHWyznRR YSIRd3sPfoPI5OlGfxHfBzWgMsVSN3MxDZPL/1/sWZ/fGILXQeYDxC2FBmIaRRw02Hx3CX1zTn3 7Ebqs14DX99ekuzkgKXsursxKf1XnxTEepIW5a5P9e9VyISV+H0HZgvCqiz3ERXeFFE6MLi4Y9o XPxfPvVKJFjGLVl5EfmhRC1twsM5HXGh9LDe3mMyXPeZmk0fTXA/yDMv/6ysHxsB6nLuPUaNwy7 c+6z6Xwq5arheRuy4iG5uhJzTGP2oXdqRVR+JQpRnxFPGa8zstftDzyt7yEhUTVW7IXf93KsKtM snW6nD5HnquUwBVVru1yKVYkKTOENqJ2gPmiwTbSX2GD1D5ZMv6ck+uvGhFyw0YPlUNUk91KuCd SYP62msHNsGrfVZYGFxMtBM+OHVr6ecPfi/JoZkyfELJyqIk4Yk2pv2Yl8g6xQS2ouwLHoiHm8u 2NBpL3ooQWu0Oyeka4s7ETSSBaqvKSB+RLN3MZjRJcdfXArWWS9HGhBiOWUS0JjdLRcTOgaKL0r CIueJz/l2r4R1WzEg/1SzkyPRwWaniSVgclYw7KgBCjvt//ssRYJoracFfdHFvDPOkhj76JwDK9 9O/onh8Zkg9oGOfpWG8fAqRbZtAE5odzzSiZ/IeM= X-Received: by 2002:a05:622a:580b:b0:534:d386:fa67 with SMTP id d75a77b69052e-55d76a518e4mr738189541cf.40.1796245714693; Wed, 02 Dec 2026 13:08:34 -0800 (PST) Received: from FKXX2DL94F.bytedance.net ([71.18.96.12]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55dbb8546ecsm202798841cf.4.2026.12.02.13.08.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 02 Dec 2026 13:08:34 -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] xfs: don't reset max_atomic_write on a remount without the option Date: Wed, 2 Dec 2026 13:08:28 -0800 Message-Id: <20261202210828.24694-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() 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. 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 --- Applies on top of the inode32 remount patch, https://lore.kernel.org/r/20261130001917.56901-1-evanfengff@gmail.com . Tested in QEMU with mount(2), mount(8) and fspick()/fsconfig(). In fstests -g quick plus 178 remount tests, the only failures are the 6 tests that also fail on mainline (XFS_DEBUG, xfsprogs 6.1.0). Found and written with the help of an AI coding assistant. fs/xfs/xfs_super.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index bdab50bce3c9..e158adf61cb6 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -2324,6 +2324,10 @@ xfs_init_fs_context( xfs_has_small_inums(XFS_M(fc->root->d_sb))) mp->m_features |= XFS_FEAT_SMALL_INUMS; + /* A remount without max_atomic_write keeps what is in use. */ + if (fc->purpose == FS_CONTEXT_FOR_RECONFIGURE) + mp->m_awu_max_bytes = XFS_M(fc->root->d_sb)->m_awu_max_bytes; + xfs_hooks_init(&mp->m_dir_update_hooks); fc->s_fs_info = mp; base-commit: 822ba3a89c7896b26e4beb70e2ebffb881924dfe prerequisite-patch-id: 93a7ebbeb52b34e90e778b08c274509b56e37733 -- 2.39.3 (Apple Git-146)