From mboxrd@z Thu Jan 1 00:00:00 1970 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 7BFFD18C937 for ; Tue, 7 Jan 2025 19:09:19 +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=1736276960; cv=none; b=IBlqLR3AmCIEJGH8uKsPJpzhxR5wQ/gDIViDKH7J4g86eJETfXEdALa1BVlWRabHUH1cpICxuVH/Fkww1/mUpTnf7PH+vQUvFVYBGXW2Zdo1tTkku4uJNFdtqxPp0am5nw+OxfHh+fmhH/atxqzkAIMD1ZJyTjrm7H8L+WKIuIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736276960; c=relaxed/simple; bh=3ChjLEH2Vi5qdMF9ShjXrArq8O//qh0p1xCr5BlE03I=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MUP9+jBssWQ8pHs5kC5ug51rvUzpeDNPVLiUyEl2l++epVYn/sbZA4p/VXzF/llh0hCsq3JzLP3cktAWCZxTXcHPE/sr8Dm93VrCVfl6SWfJJa7nvKwNnjffAeLwzXLZqgDSfBKbRaZBJH2rbpLsEiI+btFnK/yEqEZ4qS2aSIY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IRN52XIv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IRN52XIv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFFE1C4CED6; Tue, 7 Jan 2025 19:09:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736276959; bh=3ChjLEH2Vi5qdMF9ShjXrArq8O//qh0p1xCr5BlE03I=; h=Date:From:To:Subject:References:In-Reply-To:From; b=IRN52XIvf5V4VHO1r39tAOGNg+FK0i71i81xzsfDbIAxCSWJ9kRj0l5KcgNE3Fsec C6j76jSUVIl1D0dGUNWUlgVTTIQbbzZ68Gxmed3n7tkiHsaAGJGGNLWpRR26CAxUEc Lio6tBVBELWViRCwx66fNZPVil3ZQukeXexNd2rVYp3u2JRk4vnfBpz9usO4I2txxS 5V6MO2UYZx4aqkop9PRKqgik1YLGnu7XoxPzZq0U+7kFCycEnWsz9SX3Fq8Mgdbg+o qgPkZEAidVcCpZOMETk0whlZJOsu13qQmltZ2eezsh1qO9MB4sb1LEQX8oKBaTphpI 83xTa83GgH9+A== Date: Tue, 7 Jan 2025 19:09:17 +0000 From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH v2] f2fs: don't call block truncation for aliased file Message-ID: References: <20250107023248.3702924-1-jaegeuk@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20250107023248.3702924-1-jaegeuk@kernel.org> This patch should avoid the below warning which does not corrupt the metadata tho. [ 51.508120][ T253] F2FS-fs (dm-59): access invalid blkaddr:36 [ 51.508156][ T253] __f2fs_is_valid_blkaddr+0x330/0x384 [ 51.508162][ T253] f2fs_is_valid_blkaddr_raw+0x10/0x24 [ 51.508163][ T253] f2fs_truncate_data_blocks_range+0x1ec/0x438 [ 51.508177][ T253] f2fs_remove_inode_page+0x8c/0x148 [ 51.508194][ T253] f2fs_evict_inode+0x230/0x76c Fixes: 128d333f0dff ("f2fs: introduce device aliasing file") Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index c04ee1a7ce57..00f340c91fcb 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1275,8 +1275,9 @@ int f2fs_remove_inode_page(struct inode *inode) } /* remove potential inline_data blocks */ - if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || - S_ISLNK(inode->i_mode)) + if (!IS_DEVICE_ALIASING(inode) && + (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || + S_ISLNK(inode->i_mode))) f2fs_truncate_data_blocks_range(&dn, 1); /* 0 is possible, after f2fs_new_inode() has failed */ -- 2.47.1.613.gc27f4b7a9f-goog