As the fscrypt context has two versions now, this patch adds the
support of fscrypt_context_v2 for print_xattr_entry.
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
v6:
- print notice for unsupported fscrypt_context version
v5:
- check if e_name/e_name_len is match
As the fscrypt context has two versions now, this patch adds the
support of fscrypt_context_v2 for print_xattr_entry.
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
fsck/mount.c | 53 +++---
fsck/xattr.h | 55
As the fscrypt context has two versions now, this patch adds the
support of fscrypt_context_v2 for print_xattr_entry.
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
fsck/mount.c | 48 ++
fsck/xattr.h | 54
As the fscrypt context has two versions now, this patch adds the
support of fscrypt_context_v2 for print_xattr_entry.
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
fsck/mount.c | 48 ++
fsck/xattr.h | 54
As the fscrypt context has two versions now, this patch adds the
support of fscrypt_context_v2 for print_xattr_entry.
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
fsck/mount.c | 46 +---
fsck/xattr.h | 54
Signed-off-by: Weichao Guo
Signed-off-by: Sheng Yong
---
fsck/mount.c | 44 +++---
fsck/xattr.h | 54 +++-
2 files changed, 74 insertions(+), 24 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index
Cold files may be fragmented due to SSR, defragment is needed as
sequential reads are dominant scenarios of these files. FI_OPU_WRITE
should override FADVISE_COLD_BIT to avoid defragment fails.
Signed-off-by: Weichao Guo
Signed-off-by: Chao Yu
---
fs/f2fs/data.c | 2 +-
1 file changed, 1
, the period check in next fsck will fail to skip or
start a full scan. So, let's use the elapsed_time in checkpoint as
current time for period check.
Signed-off-by: Weichao Guo
Signed-off-by: Chao Yu
---
fsck/mount.c | 85 ++--
1 file changed
, the period check in next fsck will fail to skip or
start a full scan. So, let's use the elapsed_time in checkpoint as
current time for period check.
Signed-off-by: Weichao Guo
Signed-off-by: Chao Yu
---
fsck/mount.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fsck
When we try to defrag a file, its data blocks may mess with others if there
are lots of concurrent writes. This causes the file is still fragmented
after defrag. So It's better to isolate defrag writes from others.
Signed-off-by: Weichao Guo
Signed-off-by: Chao Yu
---
fs/f2fs/debug.c | 4
From: Weichao Guo
If the number of unusable blocks is not larger than
unusable capacity, we can skip GC when checkpoint
disabling.
Signed-off-by: Weichao Guo
Signed-off-by: Chao Yu
---
fs/f2fs/super.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
From: Weichao Guo
When first time pinning a file with size 0, and SBI_NEED_FSCK is set,
we still got EINVAL after this fix:
19bdba5 (f2fs: avoid EINVAL by SBI_NEED_FSCK when pinning a file).
Let's avoid it since this new created file can do in-place-update.
Signed-off-by: Weichao Guo
---
fs
-by: Weichao Guo
---
fs/f2fs/node.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index e863136..556fcd8 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1443,6 +1443,7 @@ static struct page *__get_node_page(struct f2fs_sb_info
*sbi, pgoff_t nid
modes.
Signed-off-by: Weichao Guo
Signed-off-by: Huang Jianan
Reviewed-by: Chao Yu
---
fs/f2fs/gc.c | 3 ++-
fs/f2fs/segment.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 86ba8ed..d96acc6 100644
--- a/fs/f2fs/gc.c
+++ b/fs
modes.
Signed-off-by: Weichao Guo
Signed-off-by: Huang Jianan
---
fs/f2fs/gc.c | 3 ++-
fs/f2fs/segment.c | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 86ba8ed..0f2c34f 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -1120,7
On 2021/3/17 14:41, Chao Yu wrote:
On 2021/3/17 11:44, Weichao Guo wrote:
On 2021/3/17 10:40, Chao Yu wrote:
On 2021/3/16 21:15, Weichao Guo via Linux-f2fs-devel wrote:
CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for
better
hot/cold data seperation and avoiding free
On 2021/3/17 10:40, Chao Yu wrote:
On 2021/3/16 21:15, Weichao Guo via Linux-f2fs-devel wrote:
CURSEG_ALL_DATA_ATGC is introduced by age threshold based GC for better
hot/cold data seperation and avoiding free segment cost. However, LFS
write mode is preferred in the scenario of foreground
On 2020/12/23 12:38, Weichao Guo wrote:
On 2020/12/23 9:14, Chao Yu wrote:
On 2020/12/22 20:14, Weichao Guo wrote:
On 2020/12/22 18:49, Chao Yu wrote:
On 2020/12/22 17:32, Weichao Guo wrote:
On 2020/12/22 16:24, Chao Yu wrote:
On 2020/12/14 11:54, Weichao Guo wrote:
We should update
On 2020/12/23 9:14, Chao Yu wrote:
On 2020/12/22 20:14, Weichao Guo wrote:
On 2020/12/22 18:49, Chao Yu wrote:
On 2020/12/22 17:32, Weichao Guo wrote:
On 2020/12/22 16:24, Chao Yu wrote:
On 2020/12/14 11:54, Weichao Guo wrote:
We should update the ~S_IRWXUGO part of inode->i_m
On 2020/12/22 18:49, Chao Yu wrote:
On 2020/12/22 17:32, Weichao Guo wrote:
On 2020/12/22 16:24, Chao Yu wrote:
On 2020/12/14 11:54, Weichao Guo wrote:
We should update the ~S_IRWXUGO part of inode->i_mode in
__setattr_copy,
because posix_acl_update_mode updates mode based on in
On 2020/12/22 16:24, Chao Yu wrote:
On 2020/12/14 11:54, Weichao Guo wrote:
We should update the ~S_IRWXUGO part of inode->i_mode in __setattr_copy,
because posix_acl_update_mode updates mode based on inode->i_mode,
which finally overwrites the ~S_IRWXUGO part of i_acl_mode with old
unt -t f2fs /dev/sdd /mnt/f2fs
3. mkdir /mnt/f2fs/test
4. setfacl -m u:abc:r /mnt/f2fs/test
5. chmod +s /mnt/f2fs/test
Signed-off-by: Weichao Guo
Signed-off-by: Bin Shu
---
fs/f2fs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 16ea10f..4d355f9
.
Signed-off-by: Weichao Guo
---
fsck/defrag.c | 2 +-
fsck/fsck.c | 15 ++-
fsck/fsck.h | 1 +
fsck/mount.c | 17 +++--
fsck/sload.c | 2 +-
5 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/fsck/defrag.c b/fsck/defrag.c
index bea0293..9fc932f 100644
.
Signed-off-by: Weichao Guo
---
fsck/defrag.c | 2 +-
fsck/fsck.c | 14 +-
fsck/fsck.h | 1 +
fsck/mount.c | 16 ++--
fsck/sload.c | 2 +-
5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/fsck/defrag.c b/fsck/defrag.c
index bea0293..9fc932f 100644
.
Signed-off-by: Weichao Guo
---
fsck/fsck.c | 13 -
fsck/mount.c | 13 -
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 91c8529..28320d5 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1954,6 +1954,7 @@ static void
Enable in-memory inode checksum to protect metadata blocks from
in-memory scribbles when checking consistency, which has no
performance requirements.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/inode.c | 7 +++
fs/f2fs/node.c | 10 +-
2 files chang
Only enable in-memory inode checksum to protect metadata blocks
from in-memory scribbles when checking consistency, which has no
performance requirements.
---
fs/f2fs/inode.c | 7 +++
fs/f2fs/node.c | 10 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git
Only enable in-memory inode checksum to protect metadata blocks
from in-memory scribbles when checking consistency, which has no
performance requirements.
---
fs/f2fs/inline.c | 18 ++
fs/f2fs/inode.c | 10 ++
fs/f2fs/node.c | 4 +++-
fs/f2fs/node.h | 24
Enable in-memory inode checksum to protect metadata blocks
from in-memory scribbles only when checking consistency with
no performance requirements.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/inode.c | 7 +++
fs/f2fs/node.c | 5 +
2 files changed, 12 inse
issues from f2fs logical bugs in debug version.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/checkpoint.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 8b0945b..16ba96a 100644
--- a/f
NAT bits are saved at spare space in CP pack. Flushed NAT bits
may be overwritten by the CP pack if there is no enough space
for NAT bits. And NAT bits will be obsolesced at next mount time
if crc|cp_ver not matched. So just skip to flush NAT bits in such
needless cases.
Signed-off-by: Weichao
There is a potential inconsistent metadata case due to a cp block
crc invalid in the latest checkpoint caused by hardware issues:
1) write nodes into segment x;
2) write checkpoint A;
3) remove nodes in segment x;
4) write checkpoint B;
5) issue discard or write datas into segment x;
6) sudden
issues from f2fs logical bugs in debug version.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/checkpoint.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 512dca8..15baba75 100644
--- a/f
an inconsistent file
system status.
How about add an PRE2 status for prefree segments, and make
sure the segments could be used safely to both checkpoints?
Or any better solutions? Or this is not a problem?
Look forward to your comments!
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2f
Let's skip entire non-exist area to speed up truncate_hole by
using get_next_page_offset.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 517e112..819c29a
a long time. Let's fix this case
by setting the hole to end after the page that contains i_size.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/file.c | 8
1 file changed, 8 insertions(+)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 517e112..1b44d26 100644
By default, f2fs_gc returns -EINVAL in general error cases, e.g., no victim
was selected. However, the default errno may be overwritten in two cases:
gc_more and BG_GC -> FG_GC. We should return consistent errno in such cases.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/
We should call stat_inc_bggc_count only after BG_GC has been performed
successfully. Otherwise, BG_GC count may be larger than total count
when f2fs_gc failed, e.g., no victim was selected.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/gc.c | 4 ++--
1 file changed, 2 inse
errno may be overwritten in the case of
BG_GC -> FG_GC.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/gc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 0265221..a42cafe 100644
--- a/fs/f2fs/gc.c
+++ b/fs/
. But dirty segments do not always
indicate that, BG_GC may just start and do not move any blocks at all.
Futhermore, skipping checkpoint if there are some dirty segments but no
prefree segments is OK.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/gc.c | 7 ++-
1 file chan
, there is no need to write back
first when migrating. For an atomic written page before committing, we can
migrate the page and update the related 'inmem_pages' list at the same time.
Signed-off-by: Weichao Guo <guoweic...@huawei.com>
---
fs/f2fs/checkpoint.c | 3 +++
fs/f2fs/data.c
This patch improves the migration of dirty pages and allows migrating atomic
written pages that F2FS uses in Page Cache. Instead of the fallback releasing
page path, it provides better performance for memory compaction, CMA and other
users of memory page migrating. For dirty pages, there is no
42 matches
Mail list logo