Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp478099lqt; Fri, 19 Apr 2024 01:15:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVa9m0eTS7oWSXOPOg7XwZwmf4AzlboPhwG94Pq/M6qbVqDh83LxkqmZufgxXqfwaEseVtt4bzUc50RR1USojRgIPKiATmaZRcs8tTa1A== X-Google-Smtp-Source: AGHT+IGqMwRQDcPN3HI8bWgLGTuO2Vl7i9ZYtD5EevIzy3u/NkijQyJy1rmcNtT0LUnLjpWhKLRO X-Received: by 2002:a05:6a20:6a28:b0:1a9:4266:717b with SMTP id p40-20020a056a206a2800b001a94266717bmr6959387pzk.17.1713514507020; Fri, 19 Apr 2024 01:15:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713514507; cv=pass; d=google.com; s=arc-20160816; b=FYpbW36ndwryLqZJVjuosNOsxee1cmtAfTludBYU08x7hy5OM3tin9nmgaRIyBzhjc Bg6OkFhOJwN8s10E/JjiYQFi3CQbk09Od48kpuyZRq36YHvwWxu8EawV7exqh/kBCU+0 uRq38mGb+DoXDpAUVfUPJEqaSoHQHN42j+0NlzlwYi26Zc+XHnZg9nXnT5O36PHIOI0B 3YhyjeaMYBzZL9THjnw8CsmPQ9WHCsLVylqojSXWekH7GOl+hcUGFY5mdoMuuNc6JoTi PWCcTG/DwVFf7gEaQ+gnk0Hhz7gPtaOiozXExou/XcevnflSqQevhKVvxdBdQc9udoYy Ys8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=tQTRv+/eZ+f4D1Zr++qdijKErfQjjedsQSFGBPV+OJ0=; fh=UxXW1RP8pyAv+y2j8n3yHEJfTR10UrKP9lR2u75yFfo=; b=DY2MqVRwYllq0cNMgO1sfAqshNGpyGkcHe2AQGpIRSwXqfl/sL6wJQ9rIXcBFVzqkF fFf/P1JcwUCi2vDl4q7dG1mXeppIp2Pyu0rO5RKm1qW0T/tk+3ATid0HlqGu5Qmj2N+j +7DurC4q0vHB5v4RV3Moa7PGah4YLoEE0BHDJOevozJZ1JFHEKicP/qGwemdlAU8wiYs LdNmnjOHcPZMdIeKKEDP8SrPJF3s9UYaa8TiMv6BSc7k72xPfaXIXJb+xbeu9vI+oz1x oyYFn4ddRix0JFl4q+NLOt1swmq61j28K5q1ZT6AzRHeQb/pGMXtn/lI7JrtPyLsqEZf 303g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-151153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151153-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b2-20020a636702000000b005dc7f609bb8si2845627pgc.644.2024.04.19.01.15.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 01:15:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-151153-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151153-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9F676281C87 for ; Fri, 19 Apr 2024 08:15:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE8CA52F6B; Fri, 19 Apr 2024 08:14:57 +0000 (UTC) Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDB28A55; Fri, 19 Apr 2024 08:14:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713514497; cv=none; b=WkmQdZnLEK+WS02XmTEZzIji2XF293bPSJpspYdt8kH2j+4hbHU0wDjmJPqOXfM7ut0yQa82xTZ1yPwBjzGD7KXYy6wFPb14MKJquzNBhG38r1X+UPwAoiCIo+7u5XViOEulzPKKC7JTstdQCJGdteNuC4EG0Jgjb3rtcToXD5s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713514497; c=relaxed/simple; bh=oFL++jQKoc5OIkNRR7zRzPuCLaMahie017AaPrS2TVk=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=FWbYXjpwpi2ngY3Dqkz0JO1r20zJ0kAd3+7NBbU+OteB3QdYbn7lYYOkZyMzwpndq8HaEES+KmBYeOarsBIVXckew6WmctaW+NKNaroz09n5DYSjAggja5u7jxUhxb12oFRz6fVsmELAkxAuTOqILM+G0F3dgfJQhuRkRk12tnU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4VLS9c1Nftz4f3knt; Fri, 19 Apr 2024 16:14:44 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 73C851A016E; Fri, 19 Apr 2024 16:14:51 +0800 (CST) Received: from [10.174.176.34] (unknown [10.174.176.34]) by APP1 (Coremail) with SMTP id cCh0CgAX6RH5JyJmdbiGKQ--.20192S3; Fri, 19 Apr 2024 16:14:51 +0800 (CST) Subject: Re: [PATCH v4 6/9] iomap: don't increase i_size if it's not a write operation To: Chandan Babu R Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, djwong@kernel.org, hch@infradead.org, brauner@kernel.org, david@fromorbit.com, tytso@mit.edu, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com References: <20240320110548.2200662-1-yi.zhang@huaweicloud.com> <20240320110548.2200662-7-yi.zhang@huaweicloud.com> <87edb13ms8.fsf@debian-BULLSEYE-live-builder-AMD64> From: Zhang Yi Message-ID: <4dd51853-1707-8d5f-1286-baa3126c162b@huaweicloud.com> Date: Fri, 19 Apr 2024 16:14:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <87edb13ms8.fsf@debian-BULLSEYE-live-builder-AMD64> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CM-TRANSID:cCh0CgAX6RH5JyJmdbiGKQ--.20192S3 X-Coremail-Antispam: 1UD129KBjvJXoW7WFWxGr17tF43KF4UXr4UCFg_yoW8XrWfpF WfW3WIqrs5Kr1xtF9rXr15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05:45 PM +0800, Zhang Yi wrote: >> From: Zhang Yi >> >> Increase i_size in iomap_zero_range() and iomap_unshare_iter() is not >> needed, the caller should handle it. Especially, when truncate partial >> block, we should not increase i_size beyond the new EOF here. It doesn't >> affect xfs and gfs2 now because they set the new file size after zero >> out, it doesn't matter that a transient increase in i_size, but it will >> affect ext4 because it set file size before truncate. So move the i_size >> updating logic to iomap_write_iter(). >> > > This patch causes generic/522 to consistently fail when using the following > fstest configuration, > > TEST_DEV=/dev/loop16 > TEST_LOGDEV=/dev/loop13 > SCRATCH_DEV_POOL="/dev/loop5 /dev/loop6 /dev/loop7 /dev/loop8 /dev/loop9 /dev/loop10 /dev/loop11 /dev/loop12" > MKFS_OPTIONS='-f -m reflink=1,rmapbt=1, -i sparse=1, -lsize=1g' > MOUNT_OPTIONS='-o usrquota,grpquota,prjquota' > TEST_FS_MOUNT_OPTS="$TEST_FS_MOUNT_OPTS -o usrquota,grpquota,prjquota" > TEST_FS_MOUNT_OPTS="-o logdev=/dev/loop13" > SCRATCH_LOGDEV=/dev/loop15 > USE_EXTERNAL=yes > LOGWRITES_DEV=/dev/loop15 > Sorry for the regression, I didn't notice this issue last time I ran this test. It looks like the 004 patch doesn't work for some cases. I can reproduce it on my machine now, and I'll take a look at this and fix it soon. Thanks, Yi.