Commit 76ca4a07 authored by Daeho Jeong's avatar Daeho Jeong Committed by Daniel Rosenberg
Browse files

BACKPORT: f2fs: change the current atomic write way



Current atomic write has three major issues like below.
 - keeps the updates in non-reclaimable memory space and they are even
   hard to be migrated, which is not good for contiguous memory
   allocation.
 - disk spaces used for atomic files cannot be garbage collected, so
   this makes it difficult for the filesystem to be defragmented.
 - If atomic write operations hit the threshold of either memory usage
   or garbage collection failure count, All the atomic write operations
   will fail immediately.

To resolve the issues, I will keep a COW inode internally for all the
updates to be flushed from memory, when we need to flush them out in a
situation like high memory pressure. These COW inodes will be tagged
as orphan inodes to be reclaimed in case of sudden power-cut or system
failure during atomic writes.

Bug: 298879042
Change-Id: Iee588d6d54d23f778258292263d6fe58ab29d116
Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 77c08001)
[zhoudan8: Resolved minor conflict in fs/f2fs/gc.c)
Signed-off-by: default avatarzhoudan8 <zhoudan8@xiaomi.com>
parent 048853c5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment