Signed-off-by: Sheng Yong
---
fsck/fsck.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index e2fb042d3dec..6cb02729aec7 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1081,10 +1081,7 @@ check_next
, and each of
them is indicated using one bit.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 6 +++---
fsck/mount.c | 16 ++--
include/f2fs_fs.h | 11 ---
3 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index b15931eba3a0
Show multidevice infomation like the follwoing:
devs[i].path[meta.img]
devs[i].total_segments [0x 3f : 63]
devs[i].path[data.img]
devs[i].total_segments [0x 80 : 128]
Signed-off-by: Sheng
For zoned model, the first device (devices[0]) is not zoned device,
whose zoned_model is not F2FS_ZONED_HM. Let's skip it and check write
pointer of left devices continuously.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck
Remove redundant function definition of is_sit_bitmap_set() and
export it.
Signed-off-by: Sheng Yong
---
fsck/dump.c | 2 +-
fsck/fsck.c | 12
fsck/fsck.h | 2 +-
3 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 90e3e0e93c61
/#u
Thanks for the fix.
Thanks,
shengyong
Thanks,
On 07/04, Sheng Yong wrote:
This patchset introduces a new tool inject.f2fs to modify metadata or
data (directory entry) of f2fs image offline flexibly.
With inject.f2fs, it is easier to generate a corrupted f2fs image, which
can help verify
the next free segment.
* if curseg is in the middle of the section, select candicate randomly
in the range of [curseg + 1, last_seg_in_the_same_section] to keep
type consistent.
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
v3: adjust `if (__is_large_section)' check
v2: update c
("f2fs: fix to avoid touching checkpointed data in
get_victim()")
Signed-off-by: Sheng Yong
---
v2: use GET_SEC_FROM_SEG and GET_SEG_FROM_SEC to get start segno of section
---
fs/f2fs/segment.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs
On 2024/7/8 14:09, Chao Yu wrote:
On 2024/7/6 17:16, Sheng Yong wrote:
get_ckpt_valid_blocks() checks valid ckpt blocks in current section.
It counts all vblocks from the first to the last segment in the
large section. However, START_SEGNO() is used to get the first segno
in an SIT block
("f2fs: fix to avoid touching checkpointed data in
get_victim()")
Signed-off-by: Sheng Yong
---
fs/f2fs/segment.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index e1c0f418aa11..6ed5bc811d2c 100644
--- a/fs/f2fs/segment.h
+++
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 3 +++
fsck/main.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.h b/fsck/fsck.h
index 6cac926..4ca75b3 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -353,4 +353,7 @@ int update_inode(struct
* d_ino: dentry ino
* d_ftype: dentry ftype
Signed-off-by: Sheng Yong
---
fsck/inject.c | 184 ++
fsck/inject.h | 1 +
2 files changed, 185 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index 2a21dae..a7d2a2c 100644
--- a/fsck
, nothing really gets changed, and that
could be used to get the value of a specified field.
The following patches enable injecting each part of f2fs.
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/Makefile.am | 5 ++--
fsck/inject.c | 64
automatically.
* blk: is the block address of the sit entry.
The members could be injected in cp contains:
* vblocks: sit entry vblocks
* valid_map: sit entry valid_map
* mtime: sit entry mtime
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/inject.c | 133
* cur_data_segno: cur_data_segno array
* cur_data_blkoff: cur_data_blkoff array
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 3 ++
fsck/inject.c | 127 ++
fsck/inject.h | 1 +
fsck/main.c | 1 +
fsck/mount.c | 26
ct inode's dentry hash
==
inject.f2fs --dent --nid $INO --mb d_hash --val 0x12345 $DEV
Info: inject dentry
Info: inject nid 4 : 0x4
Info: inject member d_hash
Info: inject value 74565 : 0x12345
[..]
Info: inject dentry d_hash of nid 4: 0xc77b804e -> 0x12345
Sheng Yong (10):
f2fs-tools: export is_digits
automatically.
* nid: is the nid of the nat entry
The members could be injected in cp contains:
* version: nat entry version
* ino: nat entry ino
* block_addr: nat entry block_addr
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/inject.c | 122
:
* entry_type: summary block footer entry_type
* check_sum: summary block footer check_sum
* nid: summary entry nid
* version: summary entry version
* ofs_in_node: summary entry ofs_in_node
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/inject.c | 123
i_inode_checksum
* i_addr: inode i_addr array
* i_nid: inode i_nid array
* addr: {in}direct node nid/addr array
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
fsck/inject.c | 213 ++
fsck/inject.h | 1 +
2 files changed, 214 insertions(+)
diff --git
: magic number
* s_stop_reason: s_stop_reason array
* s_errors: s_errors array
* devs.path: path in devs array
Signed-off-by: Sheng Yong
---
fsck/inject.c | 140 +-
fsck/inject.h | 5 ++
fsck/main.c | 5 +-
fsck/mount.c | 4 +-
4 files
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
man/Makefile.am | 2 +-
man/inject.f2fs.8 | 225 ++
2 files changed, 226 insertions(+), 1 deletion(-)
create mode 100644 man/inject.f2fs.8
diff --git a/man/Makefile.am b/man/Makefile.am
index
: magic number
* s_stop_reason: s_stop_reason array
* s_errors: s_errors array
* devs.path: path in devs array
Signed-off-by: Sheng Yong
---
fsck/inject.c | 134 +-
fsck/inject.h | 5 ++
fsck/main.c | 5 +-
3 files changed, 142 insertions
, nothing really gets changed, and that
could be used to get the value of a specified field.
The following patches enable injecting each part of f2fs.
Signed-off-by: Sheng Yong
---
fsck/Makefile.am | 5 ++--
fsck/inject.c | 64 +++
fsck/inject.h
ent --nid $INO --mb d_hash --val 0x12345 $DEV
Info: inject dentry
Info: inject nid 4 : 0x4
Info: inject member d_hash
Info: inject value 74565 : 0x12345
[..]
Info: inject dentry d_hash of nid 4: 0xc77b804e -> 0x12345
Sheng Yong (10):
f2fs-tools: export is_digits
inject.f2fs: introduce inject.f2fs
i_inode_checksum
* i_addr: inode i_addr array
* i_nid: inode i_nid array
* addr: {in}direct node nid/addr array
Signed-off-by: Sheng Yong
---
fsck/inject.c | 213 ++
fsck/inject.h | 1 +
2 files changed, 214 insertions(+)
diff --git a/fsck/inject.c b/fsck
* d_ino: dentry ino
* d_ftype: dentry ftype
Signed-off-by: Sheng Yong
---
fsck/inject.c | 179 ++
fsck/inject.h | 1 +
2 files changed, 180 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index c48728e..bae9afb 100644
--- a/fsck
Signed-off-by: Sheng Yong
---
man/Makefile.am | 2 +-
man/inject.f2fs.8 | 225 ++
2 files changed, 226 insertions(+), 1 deletion(-)
create mode 100644 man/inject.f2fs.8
diff --git a/man/Makefile.am b/man/Makefile.am
index 9363b82..b78344a 100644
automatically.
* nid: is the nid of the nat entry
The members could be injected in cp contains:
* version: nat entry version
* ino: nat entry ino
* block_addr: nat entry block_addr
Signed-off-by: Sheng Yong
---
fsck/inject.c | 119 ++
fsck/inject.h
automatically.
* blk: is the block address of the sit entry.
The members could be injected in cp contains:
* vblocks: sit entry vblocks
* valid_map: sit entry valid_map
* mtime: sit entry mtime
Signed-off-by: Sheng Yong
---
fsck/inject.c | 130
* cur_data_segno: cur_data_segno array
* cur_data_blkoff: cur_data_blkoff array
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 3 ++
fsck/inject.c | 125 ++
fsck/inject.h | 1 +
fsck/main.c | 1 +
fsck/mount.c | 26 +++
5 files
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 3 +++
fsck/main.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.h b/fsck/fsck.h
index 6cac926..4ca75b3 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -353,4 +353,7 @@ int update_inode(struct f2fs_sb_info *sbi, struct
:
* entry_type: summary block footer entry_type
* check_sum: summary block footer check_sum
* nid: summary entry nid
* version: summary entry version
* ofs_in_node: summary entry ofs_in_node
Signed-off-by: Sheng Yong
---
fsck/inject.c | 123 ++
fsck
the next free segment.
* if curseg is in the middle of the secion, select candicate randomly in
the range of [curseg + 1, last_seg_in_the_same_section] to keep type
consistent.
Signed-off-by: Sheng Yong
---
v2: update commit msg
---
fs/f2fs/segment.c | 15 +--
1 file ch
order to allow simulate segment fragmentation in large section mode,
this patch limits the random range within the same section.
Signed-off-by: Sheng Yong
---
fs/f2fs/segment.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
Signed-off-by: Sheng Yong
---
man/Makefile.am | 2 +-
man/inject.f2fs.8 | 225 ++
2 files changed, 226 insertions(+), 1 deletion(-)
create mode 100644 man/inject.f2fs.8
diff --git a/man/Makefile.am b/man/Makefile.am
index 9363b82..b78344a 100644
automatically.
* nid: is the nid of the nat entry
The members could be injected in cp contains:
* version: nat entry version
* ino: nat entry ino
* block_addr: nat entry block_addr
Signed-off-by: Sheng Yong
---
fsck/inject.c | 119 ++
fsck/inject.h
:
* entry_type: summary block footer entry_type
* check_sum: summary block footer check_sum
* nid: summary entry nid
* version: summary entry version
* ofs_in_node: summary entry ofs_in_node
Signed-off-by: Sheng Yong
---
fsck/inject.c | 123 ++
fsck
automatically.
* blk: is the block address of the sit entry.
The members could be injected in cp contains:
* vblocks: sit entry vblocks
* valid_map: sit entry valid_map
* mtime: sit entry mtime
Signed-off-by: Sheng Yong
---
fsck/inject.c | 130
* d_ino: dentry ino
* d_ftype: dentry ftype
Signed-off-by: Sheng Yong
---
fsck/inject.c | 148 ++
fsck/inject.h | 1 +
2 files changed, 149 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index 20ae87c..3d26b25 100644
--- a/fsck
array
* cur_data_blkoff: cur_data_blkoff array
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 2 +
fsck/inject.c | 124 ++
fsck/inject.h | 1 +
fsck/main.c | 1 +
fsck/mount.c | 6 +++
5 files changed, 134 insertions(+)
diff --git
, nothing really gets changed, and that
could be used to get the value of a specified field.
The following patches enable injecting each part of f2fs.
Signed-off-by: Sheng Yong
---
fsck/Makefile.am | 5 ++--
fsck/inject.c | 64 +++
fsck/inject.h
: magic number
* s_stop_reason: s_stop_reason array
* s_errors: s_errors array
* devs.path: path in devs array
Signed-off-by: Sheng Yong
---
fsck/inject.c | 134 +-
fsck/inject.h | 5 ++
fsck/main.c | 5 +-
3 files changed, 142 insertions
INO --mb d_hash --val 0x12345 $DEV
Info: inject dentry
Info: inject nid 4 : 0x4
Info: inject member d_hash
Info: inject value 74565 : 0x12345
[..]
Info: inject dentry d_hash of nid 4: 0xc77b804e -> 0x12345
Sheng Yong (10):
f2fs-tools: export is_digits
inject.f2fs: introduce inject.f2fs
i
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 3 +++
fsck/main.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.h b/fsck/fsck.h
index 6cac926..4ca75b3 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -353,4 +353,7 @@ int update_inode(struct f2fs_sb_info *sbi, struct
i_inode_checksum
* i_addr: inode i_addr array
* i_nid: inode i_nid array
* addr: {in}direct node nid/addr array
Signed-off-by: Sheng Yong
---
fsck/inject.c | 209 ++
fsck/inject.h | 1 +
2 files changed, 210 insertions(+)
diff --git a/fsck/inject.c b/fsck
If curseg is not the first segment in its zone, the zone is not empty.
A new section should be allocated and avoid resetting the old zone.
Reviewed-by: Chao Yu
Signed-off-by: Sheng Yong
---
v2: remove and update inaccurate commit msg
---
fs/f2fs/segment.c | 3 ++-
1 file changed, 2 insertions
/testfile': Input/output error
Signed-off-by: Sheng Yong
---
fs/f2fs/segment.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 4c8836ded90fc..50b38cbe33401 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -5004,7 +5004,8
For multiple device, each device should be aligned to zone size, instead
of aligning the total size.
Signed-off-by: Sheng Yong
---
mkfs/f2fs_format.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 8f632f8..9e1b0d6
On 2024/4/10 8:38, Jaegeuk Kim wrote:
On 04/09, Sheng Yong wrote:
On 2024/4/9 2:34, Jaegeuk Kim wrote:
On 04/08, Sheng Yong wrote:
Althrough old and new sb have the same value for now, it would be better
to build new checkpoint according to new sb.
May need to add assert, if they're
On 2024/4/9 2:34, Jaegeuk Kim wrote:
On 04/08, Sheng Yong wrote:
Althrough old and new sb have the same value for now, it would be better
to build new checkpoint according to new sb.
May need to add assert, if they're different?
We could add assert here, but I think it's
]
hot file extentsions
[db ]
cp_payload [0x 0 : 0]
Signed-off-by: Sheng Yong
---
fsck/mount.c | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/fsck/mount.c b/fs
Althrough old and new sb have the same value for now, it would be better
to build new checkpoint according to new sb.
Signed-off-by: Sheng Yong
---
fsck/resize.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fsck/resize.c b/fsck/resize.c
index 049ddd3..1b4ae85
If a file is not comprssed yet or does not have compressed data,
for example, its data has a very low compression ratio, do not
set FI_COMPRESS_RELEASED flag.
Signed-off-by: Sheng Yong
---
fs/f2fs/file.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c
testcases, and all are passed.
thanks,
shengyong
On 06/12, Sheng Yong wrote:
This patch adds a helper function to check if compression level is
valid.
Signed-off-by: Sheng Yong
---
fs/f2fs/compress.c | 31 +++
fs/f2fs/f2fs.h | 2 ++
fs/f2fs/super.c| 4
On 2023/6/12 23:47, Jaegeuk Kim wrote:
On 06/12, Sheng Yong wrote:
This patch introduces two ioctls:
* f2fs_ioc_get_extra_attr
* f2fs_ioc_set_extra_attr
to get or modify values in f2fs_inode's extra attribute area.
What'd be the main purpose of this new ioctl? Use-cases or examples
Allow getting or setting compression level and flags through
F2FS_IOC_GET_EXTRA_ATTR and F2FS_IOC_SET_EXTRA_ATTR.
Signed-off-by: Sheng Yong
---
fs/f2fs/file.c| 56 ---
include/uapi/linux/f2fs.h | 10 ++-
2 files changed, 55 insertions(+), 11
Signed-off-by: Sheng Yong
---
fs/f2fs/f2fs.h | 2 ++
fs/f2fs/inode.c | 21 +
2 files changed, 23 insertions(+)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 1b17bbe7e8656..a30c81ac7299d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3478,6 +3478,8 @@ int
is handled
* attr: value or userspace pointer
* attr_size: size of `attr'
The `field' member could help extend functionality of these two ioctls
without modify or add new interfaces, if more fields are added into
extra attributes ares in the feture.
Signed-off-by: Sheng Yong
---
fs/f2fs
This patch adds f2fs_ioc_get_compress_blocks() to provide a common
f2fs_get_compress_blocks().
Signed-off-by: Sheng Yong
---
fs/f2fs/file.c | 23 +--
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 23c68ee946e58
error if CONFIG_F2FS_FS_ZSTD is disabled by adding a
helper f2fs_is_compress_level_valid()
* fix compiling warning for casting unsinged long long to pointer
Sheng Yong (6):
f2fs: add helper to check compression level
f2fs: cleanup MIN_INLINE_XATTR_SIZE
f2fs: add helper to get inode
This patch adds a helper function to check if compression level is
valid.
Signed-off-by: Sheng Yong
---
fs/f2fs/compress.c | 31 +++
fs/f2fs/f2fs.h | 2 ++
fs/f2fs/super.c| 4 ++--
3 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs
Signed-off-by: Sheng Yong
---
fs/f2fs/super.c | 2 +-
fs/f2fs/xattr.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 023981824d240..d7630f6dcbd62 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1361,7 +1361,7 @@ static int
Convert old compression ioctls to get extra attr ioctls.
Signed-off-by: Sheng Yong
---
tools/f2fs_io/f2fs_io.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 70e0347..f6e6057 100644
This patch adds get_attr and set_attr to access inode's extra
attributes.
Signed-off-by: Sheng Yong
---
v2: update manpage of f2fs_io
---
man/f2fs_io.8 | 65
tools/f2fs_io/f2fs_io.c | 165
tools/f2fs_io/f2fs_io.h | 34
* attr: value or userspace pointer
* attr_size: size of `attr'
The `field' member could help extend functionality of these two ioctls
without modify or add new interfaces, if more fields are added into
extra attributes ares in the feture.
Signed-off-by: Sheng Yong
---
v3:
* setting lz4(hc
On 2023/6/1 11:16, Eric Biggers wrote:
On Mon, May 29, 2023 at 09:35:00AM +0800, Sheng Yong via Linux-f2fs-devel wrote:
This patch introduces two ioctls:
* f2fs_ioc_get_extra_attr
* f2fs_ioc_set_extra_attr
to get or modify values in extra attribute area.
The argument of these two
* attr: value or userspace pointer
* attr_size: size of `attr'
The `field' member could help extend functionality of these two ioctls
without modify or add new interfaces, if more fields are added into
extra attributes ares in the feture.
Signed-off-by: Sheng Yong
---
v2:
* fix compiling error
Convert compression related ioctls to get extra attr ioctls.
Signed-off-by: Sheng Yong
---
tools/f2fs_io/f2fs_io.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 70e0347..f6e6057 100644
This patch adds get_attr and set_attr to access inode's extra
attributes.
Signed-off-by: Sheng Yong
---
tools/f2fs_io/f2fs_io.c | 165
tools/f2fs_io/f2fs_io.h | 34 +
2 files changed, 199 insertions(+)
diff --git a/tools/f2fs_io/f2fs_io.c b
* attr: value or userspace pointer
* attr_size: size of `attr'
The `field' member could help extend functionality of these two ioctls
without modify or add new interfaces, if more fields are added into
extra attributes ares in the feture.
Signed-off-by: Sheng Yong
---
fs/f2fs/f2fs.h
On 2023/3/31 0:15, Yangtao Li wrote:
Hi Sheng Yong,
Your idea, I also put forward before.
And has been sent to version 2, but Chao and Jaegeuk have no comments yet.
Time to talk about the series?
https://lore.kernel.org/linux-f2fs-devel/20230112133503.16802-1-frank...@vivo.com/
Hi
:
New tool sets the MSB 4 bits to 1, get_option could return V0
values, but set_option will fail.
Signed-off-by: Sheng Yong
---
fs/f2fs/file.c| 41 ++-
include/uapi/linux/f2fs.h | 39 ++---
2 files changed, 72
f2fs_should_compress() always returns false.
This patch moves set_compress_inode(), which do extension check, in
f2fs_should_compress() to check extensions before setting inline
data flag.
Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode
conversion")
Signed-off
Fixes: cf30f6a5f0c6 ("lib: zstd: Add kernel-specific API")
Signed-off-by: Sheng Yong
---
fs/f2fs/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index d315c2de136f2..74d3f2d2271f3 100644
--- a/fs/f2fs/compress.c
+++
false.
This patch moves set_compress_inode(), which do extension check, in
f2fs_should_compress() to check extensions before setting inline
data flag.
Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode
conversion")
Signed-off-by: Sheng Yong
Signed-off-by: J
(), which do extension check, in
f2fs_should_compress() to check extensions before setting inline
data flag.
Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode
conversion")
Signed-off-by: Sheng Yong
Signed-off-by: Jaegeuk Kim
---
fs/f2fs/f2fs.h | 1 +
fs/f2
There is no need to recalculate ADDRS_PER_INODE and ADDRS_PER_BLOCK,
especially in a for loop.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index ebc60ad..df91c82 100644
--- a/fsck
=962379487b5cb9f3b85ea367b130c2c6ca584edf
Hi, Jaegeuk,
Absolutely. Thanks for addressing it.
Second one is needed to address build error.
Sorry for missing adding a hunk of that patch :(
The above 2 commits are already tested, shall I resend a new patchset?
thanks,
shengyong
On 11/11, Sheng Yong wrote
Since the file name has already passed to f2fs_new_inode(), let's
move set_file_temperature() into f2fs_new_inode().
Signed-off-by: Sheng Yong
---
fs/f2fs/namei.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 36e251f438568
(), which do extension check, in
f2fs_should_compress() to check extensions before setting inline
data flag.
Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode
conversion")
Signed-off-by: Sheng Yong
---
fs/f2fs/namei.c | 27 +--
1 file c
Signed-off-by: Sheng Yong
---
fsck/fsck.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/fsck.h b/fsck/fsck.h
index 939450f..dabd8b9 100644
--- a/fsck/fsck.h
+++ b/fsck/fsck.h
@@ -50,7 +50,7 @@ enum SB_ADDR {
SB_MAX_ADDR,
};
-#define SB_MASK(i) (1 <
If i_namelen is corrupted, there may be an overflow when doing memcpy.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 036a834..ebc60ad 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -742,8
Option "-g" for dump.f2fs is unavailable and not used in dump.f2fs.
Signed-off-by: Sheng Yong
---
fsck/main.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/fsck/main.c b/fsck/main.c
index 3268664..9b50787 100644
--- a/fsck/main.c
+++ b/fsck/main.c
There is no need to recalculate ADDRS_PER_INODE and ADDRS_PER_BLOCK,
especially in a for loop.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 19 +--
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index ebc60ad..ec096f2 100644
--- a/fsck
在 2022/11/9 21:57, Chao Yu 写道:
On 2022/11/9 19:01, Sheng Yong wrote:
If compress_extension is set, and a newly created file matches the
extension, the file could be marked as compression file. However,
if inline_data is also enabled, there is no chance to check its
extension since
has I_NEW flag and must have
no pin/atomic/swap flag), instead of calling f2fs_should_compress(),
checking its file type is enough here.
Signed-off-by: Sheng Yong
---
fs/f2fs/namei.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index
/debugobjects.c:329
debug_print_object+0x16a/0x210 lib/debugobjects.c:326
Kernel panic - not syncing: panic_on_warn set ...
Was this fixed by something?
It happened a number of times, but then stopped after Oct 23 2018. Was it:
commit 26b5a079197c8cb6725565968b7fd3299bd1877b
Author: Sheng Yong
enable is enabled, set its value as true.
Signed-off-by: Sheng Yong
---
v2->v1: clear iostat_enable when disabling it
---
fs/f2fs/sysfs.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 0575edbe3ed6..f1ab9000b294 100644
---
enable is enabled, set its value as `true'.
Signed-off-by: Sheng Yong
---
fs/f2fs/sysfs.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 0575edbe3ed6..b192627742a9 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -278,10 +
Signed-off-by: Sheng Yong
---
fs/f2fs/f2fs.h | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index eeede26339a8..70eb7b085b2e 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -254,7 +254,7 @@ struct discard_entry {
/* max discard
Dentry bitmap is not enough to detect incorrect dentries. So this patch
also checks the namelen value of a dentry.
Signed-off-by: Gong Chen
Signed-off-by: Sheng Yong
---
v2->v1: Sorry, my bad. Fix incorrect brackets.
---
fs/f2fs/dir.c | 3 ++-
1 file changed, 2 insertions(+), 1 delet
Dentry bitmap is not enough to detect incorrect dentries. So this patch
also checks the namelen value of a dentry.
Signed-off-by: Gong Chen
Signed-off-by: Sheng Yong
---
fs/f2fs/dir.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index
If IPU failed, nothing is commited, we should end page writeback.
Signed-off-by: Sheng Yong
---
fs/f2fs/data.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 8780f3d737c4..b29b754141d8 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1853,6
Hi, Jaegeuk and Chao,
On 2018/11/29 1:48, Jaegeuk Kim wrote:
On 11/28, Chao Yu wrote:
On 2018/11/28 16:10, Jaegeuk Kim wrote:
On 11/28, Chao Yu wrote:
Hi Jaeguek,
On 2018/11/28 15:31, Jaegeuk Kim wrote:
If we want to re-enable nat_bits, we rely on fsck which requires full scan
of directory
Hi, Jaegeuk and Chao,
On 2018/11/15 15:50, Jaegeuk Kim wrote:
If namelen is corrupted to have very long value, fill_dentries can copy
wrong memory area.
Is there any scenario that could hit this corruption? Or this is triggered
by fuzzing injection?
thanks,
Sheng Yong
Signed-off
On 2018/11/15 9:59, Chao Yu wrote:
On 2018/11/14 19:34, Sheng Yong wrote:
The following race could lead to inconsistent SIT bitmap:
Task A Task B
== ==
f2fs_write_checkpoint
block_operations
f2fs_lock_all
down_write
finish write checkpoint
sudden-power-off
If SPO occurs after checkpoint is finished, SIT bitmap will be set
incorrectly.
Signed-off-by: Sheng Yong
---
v2->v1:
Sorry for late. We can use f2fs_lock_op directly, but it makes it a bit
complicate to unlock. So v2 still uses __do_map_lock with
finish write checkpoint
sudden-power-off
If SPO occurs after checkpoint is finished, SIT bitmap will be set
incorrectly. This patch uses node_write to avoid the race condition.
Signed-off-by: Sheng Yong
---
fs/f2fs/data.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/data.c b/fs
546495] do_syscall_64+0x65/0x130
[ 53.546503] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 53.547639] ---[ end trace b804d1ea2fec893e ]---
So if recover fails, we need to drop all recovered data.
Signed-off-by: Sheng Yong
---
v2->v1:
* track all recovered inodes so that if recovery fail, we can find an
Sorry, this seems wrong, please ignore this :(
On 2018/10/8 21:09, Sheng Yong wrote:
If a curseg is not used, its SIT entry may have an inconsistent type.
This will be fixed during recover.
Fixes: df8065e52928be ("fsck.f2fs: introduce fsck_chk_curseg_info")
Signed-off-by:
1 - 100 of 276 matches
Mail list logo