Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp371039lqr; Wed, 5 Jun 2024 08:24:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPjxhUW8Jy45g/E56p6kgGP/g5aSdA6J9WqQdzhnUjRcRwmF/VcVCQ6hW1LEJqaIxJnAepHj9FxGdDJxMTQcuNvrADZwcpzbkySKt9zw== X-Google-Smtp-Source: AGHT+IEHDdM39tk3HrcLwPI7M6CTgMaQfkKx82QndRvq//prgMipmm1HGGu6Kmqjit1OpDxrHbVA X-Received: by 2002:a05:6e02:1547:b0:374:90b2:9707 with SMTP id e9e14a558f8ab-374b1eeffebmr29731795ab.13.1717601082004; Wed, 05 Jun 2024 08:24:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717601081; cv=pass; d=google.com; s=arc-20160816; b=JhUI+8tjZ5FJ3j2ATzYlDH4FewYhUeIvpnYu0WhGS86oussjLIfgXIZsF5JjGpUv/h g/izVcWvUCH/1qrDSiXXdnsQzHYiupddu7V855LwzxqLWpx2Atzetsd8KrKvkmjDZke6 iILjN6kEzTQnZ2Euub9AolPFpnNWAsy3+fcV8q3gRt2x6ztXV9z0HD/3au20YPxvMZlG NLC1BkktoaD+cKm9j8v50xiV38InDp/r3IOs6bXEEUT+zrn5KqaQpHpmZmjqQhycXdHm PuH7dC2VGfEoMIDa1wqJVb/oXJ1o6vkiCGszBUbJmceElMUkOq3h0Y23zyOFrKQeI20n ltdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=yHl7ErE4pivxSCK2Hyx6zkdkgE8Y7txmtaowafd7Vvs=; fh=tEJMm5nqxJgzjeuTjGEACSB7sdhtfmcjbKPNjxTBf10=; b=Ty7+zWAzzdELsX5dFRECf2qDb1sfrXkDfrvy1+xzZXBrxPNwPzRCZUWV+bA2LjDYlX 3CiAq+k6h+jgYh52kwspGx3s5N3N2VeSiGNH+KzLaUMsR0j28F2OXG8w5RwERLRYV3Ha kuDLiyeyRzOXNfojsPp9N6D2/BZuzBYsVFadPhu46W93cgoOyqj7H/sIGbmV7yVVK8Po oN0qyjzfCvhTpX/H9vcNqVYzONqWMLNH0HM0fXKdhB2eqKJNnxgL7RtXLs3FU9aHZ3A5 JMYmn3tvA5jYdKZvujIMbVFdH5iVv3+ZLUjtYQqJ0aTIj//Grx7nhWPnPUVN7jRPoqZw l9qA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6Ixe37V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 41be03b00d2f7-6c35af457d9si10321133a12.470.2024.06.05.08.24.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202826-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z6Ixe37V; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-202826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 93E582823A9 for ; Wed, 5 Jun 2024 15:24:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 376F061694; Wed, 5 Jun 2024 15:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z6Ixe37V" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 48F491F5F5; Wed, 5 Jun 2024 15:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717601056; cv=none; b=YD8zRPltGyVm9n77KOQnDE9h84UWGT/Nva80X/86Z6X872XGkRvK8GeJb9EVv4IKbhWdiVQCQ+Dg9KRlTwfhsMT1zMc0sJzKACviEjYPJ2VmLbnQ8urg11W+PaDxFiYyx+by3iDuLwdJFZHyUZWFOcUYQ2eCjTkdAfjSNdNpzbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717601056; c=relaxed/simple; bh=N5xGuI+r2hzaR93dFtC7+Kt6OZcds1p/OXnWRHZ6/DM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=taAHpRvJqXEE6zH9+rs6bgEu4OlyZG8Uf/YUoBqDwMIzyzEW+iw3e6LKhrTOBWbZQMUxXfaS0PYH9Yot4tHJUXigpeOuhq+1LLBP7DoDEcGnBgSWuJXpKrl8RhjAjfl59cpBS3bCaoEOPPxKjQPjJoAY9y6WvHOAVOkFUdBOAkM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z6Ixe37V; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95582C2BD11; Wed, 5 Jun 2024 15:24:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717601055; bh=N5xGuI+r2hzaR93dFtC7+Kt6OZcds1p/OXnWRHZ6/DM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z6Ixe37VPgqTDM7/Rk6NPBBu/d+eFVqGBOx43e0FeQE3X4yt8Ctc/ZBDZz9DIqDwp gSZd3m6amOvLD+M/mQfrsihmbT2OgD59Wp3p0OexxmHvIUGZJn1C66k7Re5orGoarG 2YrXP06ud8DvYvAseJ5pY2kKmo74IjSFxJ8b7VdZclSi0mi9gTxOq42hWGNtG9u3xC huZW+Zegm1u0sCtc2CY5XG3RiynE5KJGVeqiA8m/TDo7sPoS1MUSGeFeDTZluazfTq g+WEw78j9Vzg6skciarFGmHO73o6z2u2d25rBZLsVio2gFFvJtZDy1zjWPsdLLavue jhz/Z8Ea6K8LA== From: Christian Brauner To: Zhang Yi Cc: Christian Brauner , linux-kernel@vger.kernel.org, djwong@kernel.org, hch@infradead.org, david@fromorbit.com, chandanbabu@kernel.org, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] iomap: keep on increasing i_size in iomap_write_end() Date: Wed, 5 Jun 2024 17:24:07 +0200 Message-ID: <20240605-einmal-wissen-de46a2dc185b@brauner> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240603112222.2109341-1-yi.zhang@huaweicloud.com> References: <20240603112222.2109341-1-yi.zhang@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1316; i=brauner@kernel.org; h=from:subject:message-id; bh=N5xGuI+r2hzaR93dFtC7+Kt6OZcds1p/OXnWRHZ6/DM=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaQlNEssX9y4wlXXRnx3a+/S/e8FajZ5fYhO3P6w5vvmk m/zFiq/7yhlYRDjYpAVU2RxaDcJl1vOU7HZKFMDZg4rE8gQBi5OAZjID21GhnOTWy84nzVJ5lzT ahzLsMZui0FDntiNDRrJ9t9mMYjHrGT4X/sozfNZM/8qbcW9bruPTbTt+2n4WPjK5cU/5qleEvb cwQQA X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Content-Transfer-Encoding: 8bit On Mon, 03 Jun 2024 19:22:22 +0800, Zhang Yi wrote: > Commit '943bc0882ceb ("iomap: don't increase i_size if it's not a write > operation")' breaks xfs with realtime device on generic/561, the problem > is when unaligned truncate down a xfs realtime inode with rtextsize > 1 > fs block, xfs only zero out the EOF block but doesn't zero out the tail > blocks that aligned to rtextsize, so if we don't increase i_size in > iomap_write_end(), it could expose stale data after we do an append > write beyond the aligned EOF block. > > [...] Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon. Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it. It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated. Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch. tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes [1/1] iomap: keep on increasing i_size in iomap_write_end() https://git.kernel.org/vfs/vfs/c/86e71b5f0366