From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63B71C3DA49 for ; Fri, 26 Jul 2024 01:07:04 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sX9QE-00059d-If; Fri, 26 Jul 2024 01:07:03 +0000 Received: from [172.30.29.67] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sX9QD-00059V-TL for linux-f2fs-devel@lists.sourceforge.net; Fri, 26 Jul 2024 01:07:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rISMAt/C+JgnYoIEzQsKGS5s1UkGVph39uYtiV6iQRk=; b=jzKcZwINadXyKVkArlGR0GCc4z geUo3VIKS3JLHyqarwRvckWNLDrf3Ls/Wzz/l0hJjxEY6tp8jWEs7tmqEw2F4yQXhmC7+KcWm92So gbaQ9HzzpvsAqXR/QHomGiDVFuuueZ+T39MngKz7FcV8cC6EncyGakHd+0SQj2917K2w=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rISMAt/C+JgnYoIEzQsKGS5s1UkGVph39uYtiV6iQRk=; b=BpiPfQoWkISCObyF18s/wMSyFe vqpeBasv1V/6MQw48r781cl+2j4gT2ouKY1QvCNzOhSQNXgPB78TcGnaDbQpymhmtP4N4a2iTkE0+ qiAcJz3T4id3T/M9D/WAAse9/2WlyAhzYsfLBhVDd36oUX45hIfDQfXAEihz5Of5An48=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1sX9QD-0002f4-R4 for linux-f2fs-devel@lists.sourceforge.net; Fri, 26 Jul 2024 01:07:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 757AB6059A for ; Fri, 26 Jul 2024 01:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56C3EC116B1; Fri, 26 Jul 2024 01:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721956016; bh=IbKbKcOeVqGJZe9WNNAvQn9N7nJIqkoELDjo9ILDPzU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ofMW0sDdlBiiwD7C05wAaJT0Q/0uosF4Brk/XMN2/U4p9/TkfdS7SEuLJQxGmf9kB moqBh9jctQj+fdTYX2Bp+Y9viqUTrurFV3fZZLHewTzVEHOeiKWvMQJd+xhxVVbCNV bBamCEp5kAiJSeZZN7xevRDDDJqdg0IPHHrBXdEp8dBT2OT31lRtrdAmiHgr+aUSN4 cS3UKgBqRdf45g0EHgVneb+SHmyqYO9ldK7tnUuKv7hN2qTKRZA6KOjP1JtUHnNguS MUeYz+TfGnfDzPLffjubDWgA05jeXfE3Zdq44dmkZ+fEjk2N6T7GfrUSswSaASDx61 zSW4ZB8l1A//Q== Message-ID: Date: Fri, 26 Jul 2024 09:06:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Jaegeuk Kim References: <20240625031351.3586955-1-chao@kernel.org> <20240625031351.3586955-3-chao@kernel.org> Content-Language: en-US From: Chao Yu In-Reply-To: X-Headers-End: 1sX9QD-0002f4-R4 Subject: Re: [f2fs-dev] [PATCH 3/4] f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2024/7/26 4:54, Jaegeuk Kim wrote: > On 06/25, Chao Yu wrote: >> We should always truncate pagecache while truncating on-disk data. >> >> Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts") >> Signed-off-by: Chao Yu >> --- >> fs/f2fs/file.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c >> index 2203904383a6..0355cb054521 100644 >> --- a/fs/f2fs/file.c >> +++ b/fs/f2fs/file.c >> @@ -2185,6 +2185,7 @@ static int f2fs_ioc_start_atomic_write(struct file *filp, bool truncate) >> clear_inode_flag(fi->cow_inode, FI_INLINE_DATA); >> } else { >> /* Reuse the already created COW inode */ >> + truncate_setsize(inode, 0); > > fi->cow_inode? Oh, yes, let me fix this. Thanks, > >> ret = f2fs_do_truncate_blocks(fi->cow_inode, 0, true); >> if (ret) { >> f2fs_up_write(&fi->i_gc_rwsem[WRITE]); >> -- >> 2.40.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel