From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 AF2E127B340 for ; Tue, 23 Jun 2026 03:36:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782185771; cv=none; b=ur1VcRrhDsH6M4WG9WHIuZ9xxYiQD8VDrehUHKqMeyR+AFrKQRAhj0vj2VN7ue+Y5H2H7iTP8z3OV6W2K7KdiicIL6OrHi8B/P6ue6uyCy/2VRzXTFarC6ZzEbGXfhQy3fVjpeDjJhY6l+qMkDFjzj6ZWJdeTnQcC0IbezSk3Ps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782185771; c=relaxed/simple; bh=mFLMzZQ3/oSK0aL07No12dfr+gJClHTTe0r5/Tbj74o=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=plxL0f1H2EmkTKmZXn73AbymotxBMHnAZLrbsSKZv26NcFKID9zzzopEjlbmhy1TZlNjR0q1xvlZHmNchiX7T/liyjzh7wsocjx5lFQ5NR5EHgkcpAoxoPC8mW4aAqEtpcrjupUwKOVojRH8uUaFu0+oAv0u1jljxc8JzlBBvdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BfEzP9bx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="BfEzP9bx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 521711F000E9; Tue, 23 Jun 2026 03:36:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782185770; bh=JCHnYlVG/7Jpw4FnCw+I3RtmJBZIoCupuIHtQ+K/tRM=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=BfEzP9bxaBgtkygivmG4fZ/hpmS5W9t+QMtTkhyDKDpQSAXEF+MYYFU0+tH40l2lX ae8YPQ95kjSd2SdF7R7dpBlGvxgFFAw3x4YOwSA5Iscow+AC0MsMIXPfrnAifKwNR3 EAPf/Bmk6HGyjnPYKdNh4DzL3KG1kzeOh90EA994cBmeX01yCz1dYPhCRRW1wyDxog L6VXhgburdJ4lukbnjR4IKZtF3ghIjS5HPLjTbkGnDVVQu+aQLdTpjiC0U4fAqrQ3Q nyVLuhwfgOTyCk2yJEW/J4L2trehmhasAI0wjdiRYHTdMmDRrl00ptAs6R8bwyV+BW Qx/Q61S0P6yBw== Message-ID: Date: Tue, 23 Jun 2026 11:36:07 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] f2fs: dirty directory inodes on mtime/ctime update To: Joanne Chang , Jaegeuk Kim References: <20260623032701.173516-1-joannechien@google.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260623032701.173516-1-joannechien@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/23/26 11:27, Joanne Chang wrote: > Xfstests generic/547 sometimes fail with mismatched directory metadata > before and after a power failure. This happens because when a directory > entry is added, renamed, or deleted, its mtime and ctime are updated and > the inode is marked dirty via > f2fs_mark_inode_dirty_sync(dir, sync=false). The sync=false flag means > the dirty inode is not added to the global DIRTY_META list. Therefore, > subsequent checkpoints skip flushing these updated directory blocks, > causing directory timestamps to revert to stale values after a sudden > power failure. > > Address this by changing the dirtying parameter to sync=true during > directory entry mutations and renames. This forces F2FS to immediately > queue the updated directory blocks on the global DIRTY_META list, > ensuring timestamps are committed to checkpoints. > Needs a Fixes line and Cc stable. > Signed-off-by: Joanne Chang Anyway the code part looks good to me. Reviewed-by: Chao Yu Thanks,