From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.24 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796502100; b=MUD4Cp6ZjsBwXUiD+U224HdtooyjyrcoYe4YOHS4tPDYNHOeCzgJaOSIwNsigpKfveS9 vtbH2ygDH8H7Vy71HCbXvOz8Zj6v+w+va/sJY+lVtdNMBvsn1cHiYAgtKEpJroKtI5rfP beKIxL9iraLZBZvg3QJ0p1idgQO0xZaMSMo/hKbkbufvYeVBON6r8S6KIpxNgCVLuKlsW 8gC0l8vlx+8d4MPDnA8smZD5SUA33hNp77+xt14J6dvvyJNRKwM5xFbldrBQj8vkBcugy F7hf3+EKT5fDoWmQBOpRiH8nUDAtDeFOhUI/D6zDP2W92aPgoHoo0AxbSugiXqDY7dw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796502100; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=3CR7lUDb97Eyahh/SSiMqNVIZGukynMI+M8lK1xZP74=; b=nYBvXn1JuYBTr55ztOIwzlZU0WcWPQoQ0TZJ7RsKX6BwTXPBKJtz0rpROF96TR/NwGIb 5uZCj6ePwt2mbkueB6hJ0MMb67LHq2utm1bQ781HzUGoLna1WKDpXQywgeZccDZWu0jd+ P11/UbxNxuFjuiEx4TWlaVqckJ8UNUy0rcFcGpWzDFcGnB9b+JvoPplRtTC1eY44+sthm /fzo66xnXj0jz2PwaH/FSBfObpyFsQjOZiXw9qaOalLehuFMNywDVXnolAINMUUTR8kXa wCOirg88BEyev0XOH0R+sSlsXJN1yBjLVyMSuhPRDYbG8sy0wox7nPjkoA6ceHnJgTA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=OzKlNn7L; arc=none smtp.remote-ip=95.215.58.24 Received: from mta1.migadu.com (out-24.mta1.migadu.com [95.215.58.24]) (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 90E8C606A31F for ; Sat, 5 Dec 2026 20:21:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 90E8C606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=OzKlNn7L X-Envelope-To: linux-xfs@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=Y1jmlrra4BpTCTN/z8xcfM0K2YTkSvoyhNQNPw82wxA=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796502097; v=1; x=1797106897; b=OzKlNn7L3KQNIhGapbv/24/hiiEzzlfc9Dw4ipg79chNYox0Gt3tMoa8o2JSCJOiOKlBlMQ6 n+RpGM6lwBsj8irVYSeDNUAE/VF1eNRgIRxd2NrcNGZMxhjwcv65pSwm0Yzi7KSasQZxw4o3CGy XvpyjxMFNZJiEfOCMeqz27R8= X-Envelope-To: linux-xfs@vger.kernel.org Received: by mta12.migadu.com with ESMTPS id 0c9c9a7d42c6004f; Sat, 05 Dec 2026 20:21:37 +0000 X-Mizu-Trace-ID: 0c9c9a7d42c6004f X-Migadu-Flow: FLOW_OUT Message-ID: <36ac1348-f487-451b-b983-c360b0772042@linux.dev> Date: Sat, 5 Dec 2026 20:21:34 +0000 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 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] xfs: don't reset max_atomic_write on a remount without the option To: Yifan Feng , Carlos Maiolino Cc: Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261205012232.34935-1-evanfengff@gmail.com> Content-Language: en-US From: John Garry In-Reply-To: <20261205012232.34935-1-evanfengff@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/5/26 01:22, Yifan Feng wrote: > 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 This looks ok to me, so FWIW: Reviewed-by: John Garry > --- > 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