Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp165647lqt; Wed, 5 Jun 2024 22:46:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx9OZ0Lj8OcazYtGNbPV/5U4xqu/85gIE+bd79dSGtQlenChNe4xfMJJPC5CJEvMraqPbCBsr0pFH9c045fKgBA8aLNsiDUT9cE0fwqQ== X-Google-Smtp-Source: AGHT+IFPnHOjmHCt4HPTVjxZhp5bRJW6Em8ddgEv10hoiAw6/ywj0ls5hDa//vTJD1JnYbgxfDyF X-Received: by 2002:ae9:e412:0:b0:792:ec90:b1f5 with SMTP id af79cd13be357-79523d35cd3mr486041385a.28.1717652796060; Wed, 05 Jun 2024 22:46:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717652796; cv=pass; d=google.com; s=arc-20160816; b=kP8JuFg3FU40mCR663fMmIEcwJYJW5DrwB8FzYo7ac2EMgZdpn6kONYHnCiaE2jQWS 4L7tsp+1m/YN4K04cMj4U6Rr/wfbpWeli35CM0FujjsoWAmN7d6XukoFXko6b6CmUxkY pHNJrXddzkUkd04Uiu6di5FjMvx3B8S1WgjzgogcNQdt94CoSHTmLFNH3MQOWtazLrkz 4QEbN9WairQ3aTAQgc7JQddL1yh2fw5MjCySBXtzJN6rjFUG9iJdX4I4qW/P2YzkYpm9 NGKmdeOglF9w1wp/ONspTP0J/A7omxDF5bdn0SfPt1zboSCT/K3eHXiKR9xOGMxNs0+K T8AA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:in-reply-to:date:subject:cc:to:from:user-agent :references:dkim-signature; bh=O8Ge0H/0ZD8yvRf2EHK5PPfDxLJlQJZzUrcKnjPeWO8=; fh=cXYViw4BeSmF23koD+rARtJbbAguEBta9e1bpBkBXtY=; b=TaXRrZt5ouGMWL4s/BJ6SxREtoe62IZ4OPu02/fkASo/8cBJ/na3fDku6e0k2YDvcp WB1M74yEmP1NNoTv+GTtCUQhyNuGyFuOTiYbFVKfYcaLMfKOgnWyUj5oTv31Xz+Alo8M UrqzIMx6p6yn9z+wB1yVU0ktSgcAojTguKWNFy28cKNwNT5WxUIe9HONItrHisZ1NXO9 TtmoE921PY873OZencxmzjomZm1/JbUgLXDK+bQh+jxt0L+ITZ0lMJDKoTSEcOCJ5eqB c7n51Cvz9ZNo7mgr8CbQowxJIxttTKmCng226IYvKaK/wf3I/LE2JTzGVoS/7a9yNKBL WUdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TuVObQkK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203627-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203627-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-795332eb50dsi62165085a.404.2024.06.05.22.46.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 22:46:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203627-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TuVObQkK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203627-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203627-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C48531C240B5 for ; Thu, 6 Jun 2024 05:46:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF47C3BB59; Thu, 6 Jun 2024 05:46:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TuVObQkK" 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 0C7CA2564; Thu, 6 Jun 2024 05:46:25 +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=1717652786; cv=none; b=FeON1dVoEpopLc09mcDXr8kd3MfybEtIp1UZkMPWznFbFqooPL5mR+w+LhDXP1I1tDGCt74130KfPQsSfqxrP45JOxo5wGA2c7wTTEwbsg36AeBdhc1HjEd2h3ICz6do9Th7HbEMcsBX4f5p/nj4oZ2e9i3Txnlk+JKKH+q6gGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717652786; c=relaxed/simple; bh=oasRQEowEDEvTcuNGQIUUnbDSjk2QLAdYm53uQmTzeg=; h=References:From:To:Cc:Subject:Date:In-reply-to:Message-ID: MIME-Version:Content-Type; b=QFv5avcjBi2wenkm3CgKjpl5PuOCHvPRBbEFDxiHFdGL4C6eJ2ho+RQKjV1QM9QXeIawqaqPoDjlAZJ+J2aecS673y6CD0nJjsKJyJ/rb/y0Oh2YmXrlWbAjsbSWiT19dUsbUsdsxIlvzTlnQ9dPC8u8yO6wPQkJIU7pJRm3jso= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TuVObQkK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26179C4AF0F; Thu, 6 Jun 2024 05:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717652785; bh=oasRQEowEDEvTcuNGQIUUnbDSjk2QLAdYm53uQmTzeg=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=TuVObQkKFUYUfNEWP5lb1pHRVQVrSJug+a5WQPZwLzW+wRlbOLBzOP8t8f14smZLa 2l3/bZqUn8Cm3swwT4chu7n98wrPdYTs3Y2bR/4ATgcmDZasrzy1ZetX3O92spiHpw JJG024TSkuBeyFKRzIXCECF6cF+kpO9CXFHr1pf2km4MnZiPJkai3dmBbIUsTuiCC1 G9qbY3IsL6HV8wayvjxlh+cjffE4fml0QZKXi0cCjf++NBOWzDYwgRdhk0cP/WiZQt f9CnreLxOL9P62vcjMfxTjLyBgZebMK4lUv2a9fjSWKLb4ammyrrxE8biY1CI4qm5i RW0ASqPQMfbAQ== References: <20240603112222.2109341-1-yi.zhang@huaweicloud.com> User-agent: mu4e 1.10.8; emacs 29.2 From: Chandan Babu R To: Zhang Yi 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, jack@suse.cz, yi.zhang@huawei.com, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH] iomap: keep on increasing i_size in iomap_write_end() Date: Thu, 06 Jun 2024 11:15:33 +0530 In-reply-to: <20240603112222.2109341-1-yi.zhang@huaweicloud.com> Message-ID: <87tti61v4g.fsf@debian-BULLSEYE-live-builder-AMD64> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Mon, Jun 03, 2024 at 07:22:22 PM +0800, Zhang Yi wrote: > From: Zhang Yi > > 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. > > xfs should zero out the tail blocks when truncate down, but before we > finish that, let's fix the issue by just revert the changes in > iomap_write_end(). I didn't notice any regressions with this patch applied. Hence, Tested-by: Chandan Babu R -- Chandan