From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.222.174 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796433760; b=F1a/2QkoDEU3yoU8dKlqDEAlg2EZeNxG483/Kc1NlCgFKnLobEQq+F12vxFrBQk3yFD8 FQtIrwd7joxawXzGtkxY9EL7PdwekNe+w0OZGoZ4J4baiiSQPa3iuX5GvUwJv1XSuXQHw S1CEkm7LG1EWf7PVj2YFLDmJJbCDXO6YvN8y8lBGUb4FB1VSKTM8G1DsF20UkQ8KFORl4 DaMPPTrUs/AzyyHsJUQk7T3Ay6+aC9miO1qreKLI3DHGj0DVnSM4nAlL9Fytry7mwtrJU cFabAogV6SrF8g+s6GPZHFegxh6jA406jsaaoINHXnkymJC67ws9C8PTAoUmhWs1DaQ== 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=upV/54xnF28FeT1KriGPkYGjRmOH/r+jJAGDGQ7C2fz6Gdh4X61F7ODMnoTivVWZHri5 kq/lLXsPhMdLMY3u4PvatHOSBWjE5PucUTwSUUOHCMP0u5zN+LbFbWyLSt7mOAGxzXGl0 zPJz19gjQsqgjzbTWcLZMoIlRTuYC86TQAndNkk81WFDk1fBV8/Q+cAAaGgjlZAeiw7Qo P7gLg5HV7E9oy32C871VPbyPc+VzFtrkMUdeSKSU0CMwaWseIH4Z5uPZCFH3NT8rJ7T/G 8NMmNahJJzp01g1uLTw0WftVEziiAzF3rnhtxSNA89GlaZaL38KlJisDfzUm6GuGvCA== 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.174 Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (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 B7014606A336 for ; Sat, 5 Dec 2026 01:22:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B7014606A336 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-f174.google.com with SMTP id af79cd13be357-94999a08973so131546985a.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=dTpJQ5VYpscTN95A9CzAwbACSCkaNBlYTLjyxOKNuu345rAwvd/1bvFmQ+G4sdGMEy UDrgXfE2TK+SFUZ+vZG4N4ckyA8CUSHY8mZ1VibJx2WvVJziSgecub21bnNDy3lmvwj7 6cFH85eat36iFtzdy0mkbmeR61Y8MObBWGB3n3E+Y7CEsSw0S69/aSeyf5VrbuwEO79E HyGyu+KY5uB8QGReGt9d2xJUm+R3/Qbr6Koc+t+RwfoUHFDVXAbTuXGpC5HnOAaUEMyc usrb5fhoSbCob7T95qEe3etJyjwMcMoG2UhwnJQAJiRx9QxTirlxmzhz/Ba+AXN+SPWD sKwQ== X-Forwarded-Encrypted: i=1; AL+hErFRrMPmoL0gU5JzFIw72IaTT4ore9RHwGTROR9k9+xQ6vrPZe3z4Jj8KciFlBw4JAGOtto4eIHD1HAG16U=@vger.kernel.org X-Gm-Message-State: APuU4Z8Fy10q/ytuoVD6tPPi8TwuVAIB6xNoUcDMGsHmysHNPf4LKvYz +P+hbe/PR2lzsXDT4wncO3ic5OniHW9n0uK4JHUcE162AGkZYLKqr2iD X-Gm-Gg: AZFdTZcBVpvdmYdbMKAWeNTJoMM5VutNMFiope/XdAAtByuJg/KQUM1YvQUSrU7a9zC LvxMfegawz/xZnYojdqUYVT2Qb/KJn5TiGVfi9pAuN9c8xP7aG/wMmXJ70Ei+Wp/diwP8eBy3j+ 6pm/g9OGVpyLIkzY3EranimRSpxyTUiviSbCvX4QcVjrMsbY8pqGGJx30gLS41dCDdApaBLdDr6 Ozys8fcfctGL4ZE2ARf++1CKuXTh9VXL6UKfROFhyvXPe0wQSarLgD2xKlVVwTXMEj0LxVr5rwp zVab8fYjLfIA5ABqkXp0dgyNo8xaVsAf0f4FhBtTvnpB+v9mHjA8hwPKP4tbTbtJVh7qG3bxKJA DWmqYYLbpht+mL00UjjK1mEjkV5FnNxjXtJxgcCNAtlUm2wHU2P0+2PDr97STEiKM1HiY9pzq1g jeBbEjwhJeh5yiDrKozKsy55jkLYfZe+72vnL+4YLfZiQIzY9wEqJinRTFyEw23//gsU8Azwt9X Mccjy4wXPHMowF/pLreSGlhD1ywl/7LL6S5iGYXMFBB/3W94ZVtQLq+XVn77PmBgpqbO+pMSBPo 1Y/9RIGyz1leftT6EAh9p3maAKBQzmdvv7lHXL6bNmr0TCP2QZl1+CCpwiDEkN+cY1g/tCch3Gg WBe1YO3DT7DH0FA0LPz9CWIR9Gzl0XA== 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-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, 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)