Signed-off-by: Sheng Yong
---
tests/f_sit_bad_valid_map/README| 5 +++
tests/f_sit_bad_valid_map/expect.in | 35
tests/f_sit_bad_valid_map/script| 50 +
3 files changed, 90 insertions(+)
create mode 100644 tests/f_sit_bad_valid_map/README
Signed-off-by: Sheng Yong
---
tests/f_ssa_bad_nid/README| 5
tests/f_ssa_bad_nid/expect.in | 34 +++
tests/f_ssa_bad_nid/script| 44 +++
3 files changed, 83 insertions(+)
create mode 100644 tests/f_ssa_bad_nid/README
create m
Signed-off-by: Sheng Yong
---
tests/f_nat_bad_ino/README| 4
tests/f_nat_bad_ino/expect.in | 39 +++
tests/f_nat_bad_ino/script| 39 +++
3 files changed, 82 insertions(+)
create mode 100644 tests/f_nat_bad_ino/README
Signed-off-by: Sheng Yong
---
tests/f_ssa_bad_type/README| 5 +
tests/f_ssa_bad_type/expect.in | 34 +
tests/f_ssa_bad_type/script| 39 ++
3 files changed, 78 insertions(+)
create mode 100644 tests/f_ssa_bad_type/README
cr
Signed-off-by: Sheng Yong
---
tests/f_inode_bad_iaddr/README| 6
tests/f_inode_bad_iaddr/expect.in | 38
tests/f_inode_bad_iaddr/script| 58 +++
3 files changed, 102 insertions(+)
create mode 100644 tests/f_inode_bad_iaddr/README
cr
Signed-off-by: Sheng Yong
---
tests/f_sit_bad_vblocks/README| 5
tests/f_sit_bad_vblocks/expect.in | 34 +++
tests/f_sit_bad_vblocks/script| 45 +++
3 files changed, 84 insertions(+)
create mode 100644 tests/f_sit_bad_vblocks/README
Signed-off-by: Sheng Yong
---
tests/f_sit_bad_type/README| 5
tests/f_sit_bad_type/expect.in | 34 +
tests/f_sit_bad_type/script| 45 ++
3 files changed, 84 insertions(+)
create mode 100644 tests/f_sit_bad_type/README
create
Signed-off-by: Sheng Yong
---
tests/f_ssa_bad_ofs_in_node/README| 5 +++
tests/f_ssa_bad_ofs_in_node/expect.in | 34 +
tests/f_ssa_bad_ofs_in_node/script| 44 +++
3 files changed, 83 insertions(+)
create mode 100644 tests/f_ssa_bad_ofs_in_node
This patch adds a new member `feature' in inject_sb to inject features.
Signed-off-by: Sheng Yong
---
fsck/inject.c | 5 +
man/inject.f2fs.8 | 3 +++
2 files changed, 8 insertions(+)
diff --git a/fsck/inject.c b/fsck/inject.c
index c3e68eb35246..c997334ec57d 100644
--- a/fsck/inject.c
+
Signed-off-by: Sheng Yong
---
tests/f_sb_errors/README| 5
tests/f_sb_errors/expect.in | 59 +
tests/f_sb_errors/script| 23 +++
3 files changed, 87 insertions(+)
create mode 100644 tests/f_sb_errors/README
create mode 100644 tests/f
Signed-off-by: Sheng Yong
---
tests/f_nat_bad_blkaddr/README| 4
tests/f_nat_bad_blkaddr/expect.in | 39 +++
tests/f_nat_bad_blkaddr/script| 35 +++
3 files changed, 78 insertions(+)
create mode 100644 tests/f_nat_bad_blkaddr/READ
If one cp is invalidate, set CP_FSCK_FLAG to allow fixing cp at
the end of check.
Signed-off-by: Sheng Yong
---
fsck/f2fs.h | 6 ++
fsck/mount.c | 11 ---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/fsck/f2fs.h b/fsck/f2fs.h
index 187e73cf9aec..651a1f734281 1006
This patch adds a new member `filename' in inject_dentry to inject
dentry filename. The dentry is specified by nid option.
Note that `.' and `..' dentries are special, because they are not in the
parent directory of nid. So this patch also adds a new option `--dots'
to inject these two dentries.
Signed-off-by: Sheng Yong
---
tests/f_dentry_dup_dots/README| 11 +++
tests/f_dentry_dup_dots/expect.in | 150 ++
tests/f_dentry_dup_dots/script| 58
3 files changed, 219 insertions(+)
create mode 100644 tests/f_dentry_dup_dots/README
create mo
Signed-off-by: Sheng Yong
---
tests/f_loop_fsync_dnodes/README | 39 +
tests/f_loop_fsync_dnodes/expect.in | 40 ++
tests/f_loop_fsync_dnodes/imgs.tar.gz | Bin 0 -> 173228 bytes
tests/f_loop_fsync_dnodes/script | 16 +++
4 fi
Signed-off-by: Sheng Yong
---
tests/f_sb_bad_magic/README| 3 +++
tests/f_sb_bad_magic/expect.in | 40 ++
tests/f_sb_bad_magic/script| 16 ++
3 files changed, 59 insertions(+)
create mode 100644 tests/f_sb_bad_magic/README
create mode 100644
Signed-off-by: Sheng Yong
---
tests/f_cp_bad_crc/README| 5
tests/f_cp_bad_crc/expect.in | 22 +
tests/f_cp_bad_crc/script| 46
3 files changed, 73 insertions(+)
create mode 100644 tests/f_cp_bad_crc/README
create mode 100644 te
Signed-off-by: Sheng Yong
---
fsck/mount.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fsck/mount.c b/fsck/mount.c
index a189ba73e4bf..a09a974fc810 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -560,6 +560,7 @@ printout:
void print_ckpt_info(struct f2fs_sb_info *sbi)
{
s
Signed-off-by: Sheng Yong
---
tests/f_dentry_bad_hash/README| 8
tests/f_dentry_bad_hash/expect.in | 62 +++
tests/f_dentry_bad_hash/script| 71 +++
3 files changed, 141 insertions(+)
create mode 100644 tests/f_dentry_bad_hash/REA
In some scenarino, such as autotest, it is not expected to answer
question from fsck or dump. To simply answer no to all these questions,
this patch adds an option `N' to do that.
Signed-off-by: Sheng Yong
---
fsck/dump.c | 3 +++
fsck/fsck.c | 2 +-
fsck/main.c | 14
This patch adds new members in inject_node to inject inode:
* i_ext.fofs: extent fofs
* i_ext.blk_addr: extent blk_addr
* i_ext.len: extent len
* i_inline_xattr_size: inline xattr size
* i_compr_blocks: compression blocks
Signed-off-by: Sheng Yong
---
fsck/inject.c | 28
The following members are add to inject more fields in cp:
* next_blkaddr: inject fsync dnodes
An error is returned if no fsync dnode is found.
However, the injection is not supported on zoned device. This is because
fsync dnodes must remains at the end of current warm node segnemt, any
dnode ch
Signed-off-by: Sheng Yong
---
tests/f_dentry_lost_dots/README| 7 +++
tests/f_dentry_lost_dots/expect.in | 74 ++
tests/f_dentry_lost_dots/script| 46 +++
3 files changed, 127 insertions(+)
create mode 100644 tests/f_dentry_lost_dots/README
c
Hi, all
This patchset tries to add an auto testsuit for f2fs-tools (fsck only
for now).
The basic idea of these testcases are:
1. create f2fs image
2. corrupt the image by inject specific fields
3. fsck fixes the image
4. verify fsck output with expected message
Some helper scripts are provi
This patch addes helper scripts for auto testcases, and testcases of
fsck will be submitted in the following commits.
The basic idea of these testcases are:
1. create f2fs image
2. corrupt the image by inject specific fields
3. fsck fixes the corrupted image
4. verify fsck output with expected
If dot or dotdot is lost, fsck tries to add a new dentry by
f2fs_add_link(). The blkaddr of the directory inode should be
passed to it in order to update the dirty inode at the right
place. This patch fixes the uninitialized `blkaddr' to avoid
corrupting f2fs image.
Signed-off-by: Sheng Yong
---
Hi, Jaegeuk,
I noticed that this commit is not queued in either dev or master branch.
Do you have any comments on this commit :-)
thanks,
shengyong
On 2024/7/4 10:57, Sheng Yong wrote:
This patch enables injecting dentry block or dir entry.
print_raw_dentry_info() is added to show values of no
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:
}
}
If a superblock failed in sanity check, it should be fixed. This patch
add a new state `sb_invalid' to tell fsck needs to update superblock
at the end of all checkings.
This patch also cleans up force_stop, abnormal_stop, fs_errors and
sb_invalid by merging them into an `invalid_sb' flags, and eac
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 Y
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/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..4c1d4d3c
On 2024/7/11 7:04, Jaegeuk Kim wrote:
On 07/10, Jaegeuk Kim wrote:
Hi Sheng,
Can we have a list of tests to check the expected behavior of given
inject.f2fs followed by fsck.f2fs?
Hi, Jaegeuk,
Yes, I'm working on the testcases of fsck.f2fs and inject.f2fs. The basic
idea is:
1. creates an
When new_curseg() is allocating a new segment, if mode=fragment:xxx is
switched on in large section scenario, __get_next_segno() will select
the next segno randomly in the range of [0, maxsegno] in order to
fragment segments.
If the candidate segno is free, get_new_segment() will use it directly
a
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. This patch fixes that to get the correct start segno.
Fixes: 61461fc921b7 ("f2f
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. This
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. This patch fixes that to get the correct start segno.
Fixes: 61461fc921b7 ("f2f
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 f2fs_s
This patch enables injecting dentry block or dir entry.
print_raw_dentry_info() is added to show values of node footer.
The meanings of options are:
* dent: means dentry is injected.
The members could be injected in cp contains:
* d_bitmap: dentry block d_bitmap of nid
* d_hash: dentry hash
*
This patch 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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used, n
This patch enables injecting sit entry. print_raw_sit_entry_info() is
added to show values of the sit entry.
The meanings of options are:
* sit: means sit entry is injected, its argument chooses which sit pack
to be injected, where 0 means the current valid sit is choosen
automati
This patch enables injecting checkpoint. To archive this, a helper
write_raw_cp_blocks() is added to write the first and last blocks
of a specific cp. And print_ckpt_info() is exported to show new
checkpoint info.
The meanings of options are:
* cp: means cp is injected, its argument chooses which
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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used
This patch enables injecting nat entry. print_raw_nat_entry_info() is
added to show values of the nat entry.
The meanings of options are:
* nat: means nat entry is injected, its argument chooses which nat pack
to be injected, where 0 means the current valid nat is choosen
automati
This patch enables injecting summary block or summary entry.
print_raw_sum_entry_info() and print_sum_footer_info() are added to show
values of the ssa entry and summary footer.
The meanings of options are:
* ssa: means ssa entry is injected.
The members could be injected in cp contains:
* entr
This patch enables injecting node block. print_node_footer_info() is
added to show values of node footer.
The meanings of options are:
* node: means node is injected.
The members could be injected in cp contains:
* nid: node footer nid
* ino: node footer ino
* flag: node footer flag
* cp_ver
This patch enables injecting super block.
The meanings of options are:
* sb: means sb is injected, its argument chooses which sb pack to be
injected, where 0 means the current valid sb is choosen
automatically.
* mb: indicates which member in sb is injected, its argument is the
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 936
This patch enables injecting super block.
The meanings of options are:
* sb: means sb is injected, its argument chooses which sb pack to be
injected, where 0 means the current valid sb is choosen
automatically.
* mb: indicates which member in sb is injected, its argument is the
This patch 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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used, n
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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used
This patch enables injecting node block. print_node_footer_info() is
added to show values of node footer.
The meanings of options are:
* node: means node is injected.
The members could be injected in cp contains:
* nid: node footer nid
* ino: node footer ino
* flag: node footer flag
* cp_ver
This patch enables injecting dentry block or dir entry.
print_raw_dentry_info() is added to show values of node footer.
The meanings of options are:
* dent: means dentry is injected.
The members could be injected in cp contains:
* d_bitmap: dentry block d_bitmap of nid
* d_hash: dentry hash
*
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
-
This patch enables injecting nat entry. print_raw_nat_entry_info() is
added to show values of the nat entry.
The meanings of options are:
* nat: means nat entry is injected, its argument chooses which nat pack
to be injected, where 0 means the current valid nat is choosen
automati
This patch enables injecting sit entry. print_raw_sit_entry_info() is
added to show values of the sit entry.
The meanings of options are:
* sit: means sit entry is injected, its argument chooses which sit pack
to be injected, where 0 means the current valid sit is choosen
automati
This patch enables injecting checkpoint. To archive this, a helper
write_raw_cp_blocks() is added to write the first and last blocks
of a specific cp. And print_ckpt_info() is exported to show new
checkpoint info.
The meanings of options are:
* cp: means cp is injected, its argument chooses which
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 f2
This patch enables injecting summary block or summary entry.
print_raw_sum_entry_info() and print_sum_footer_info() are added to show
values of the ssa entry and summary footer.
The meanings of options are:
* ssa: means ssa entry is injected.
The members could be injected in cp contains:
* entr
When new_curseg() is allocating a new segment, if mode=fragment:xxx is
switched on in large section scenario, __get_next_segno() will select
the next segno randomly in the range of [0, maxsegno] in order to
fragment segments.
If the candidate segno is free, get_new_segment() will use it directly
a
If mode=fragment:xxx is enabled in large section mode, segno returned by
__get_next_segno() may located in new section with different type, which
messes up ssa type. This could be reproduced by the following steps:
dd if=/dev/zero of=test.img bs=1M count=10240
mkfs.f2fs -s 128 test.img
mount
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
-
This patch enables injecting nat entry. print_raw_nat_entry_info() is
added to show values of the nat entry.
The meanings of options are:
* nat: means nat entry is injected, its argument chooses which nat pack
to be injected, where 0 means the current valid nat is choosen
automati
This patch enables injecting summary block or summary entry.
print_raw_sum_entry_info() and print_sum_footer_info() are added to show
values of the ssa entry and summary footer.
The meanings of options are:
* ssa: means ssa entry is injected.
The members could be injected in cp contains:
* entr
This patch enables injecting sit entry. print_raw_sit_entry_info() is
added to show values of the sit entry.
The meanings of options are:
* sit: means sit entry is injected, its argument chooses which sit pack
to be injected, where 0 means the current valid sit is choosen
automati
This patch enables injecting dentry block or dir entry.
print_raw_dentry_info() is added to show values of node footer.
The meanings of options are:
* dent: means dentry is injected.
The members could be injected in cp contains:
* d_bitmap: dentry block d_bitmap of nid
* d_hash: dentry hash
*
This patch enables injecting checkpoint. To archive this, a helper
update_checkpoint() is added to write specific cp. And print_ckpt_info()
is exported to show new checkpoint info.
The meanings of options are:
* cp: means cp is injected, its argument chooses which cp pack to be
injected, w
This patch 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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used, n
This patch enables injecting super block.
The meanings of options are:
* sb: means sb is injected, its argument chooses which sb pack to be
injected, where 0 means the current valid sb is choosen
automatically.
* mb: indicates which member in sb is injected, its argument is the
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 fsck or reproduce userspace behaviors of some a fault.
If option `--dry-run' is used
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 f2
This patch enables injecting node block. print_node_footer_info() is
added to show values of node footer.
The meanings of options are:
* node: means node is injected.
The members could be injected in cp contains:
* nid: node footer nid
* ino: node footer ino
* flag: node footer flag
* cp_ver
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(+
If curseg is not the first segment in its zone, the zone is not empty,
and it should not be reset. This issue could be reproduced by:
modprobe null_blk nr_devices=1 zoned=1 zone_max_open=6
zone_max_active=6 zone_size=1024 gb=30
# /dev/vda is 4G
mkfs.f2fs -m -c /dev/nullb0
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 1
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 dif
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 not that necessar
The "hot file extensions" list does not print properly.
**Before**
extension_count [0x 23 : 35]
cold file extentsions
[mp wm og jp ]
[avi m4v m4p mkv ]
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 100644
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 b
On 2023/6/13 6:14, Jaegeuk Kim wrote:
Could you please check this version?
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test&id=9c84aad379019a0d86655bb50bd7b4bc92683c4b
Hi, Jaegeuk,
Thanks for cleaning it up. This version looks good to me. I tested it
with
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 de
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 f2fs_pin
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.
The argument of these two ioctls is `struct f2fs_extra_attr', which has
three members:
* field: indicates which field in extra attribute area is
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..f8aa842b5d
This patchset introduces two ioctls to get or modify values in
f2fs_inode's extra attribute area:
* f2fs_ioc_get_extra_attr
* f2fs_ioc_set_extra_attr
The argument of these two ioctls is `struct f2fs_extra_attr', which has
three members:
* field: indicates which field in extra attribute area
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/compr
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 parse
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
--- a/tool
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 +++
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 ioctls is `struct f2fs_extra_attr', which has
three members:
* field: indicates which field in extra attribute area is handled
*
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
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 ioctls is `struct f2fs_extra_attr', which has
three members:
* field: indicates which field in extra attribute area is handled
*
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
--- a/
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/tool
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 ioctls is `struct f2fs_extra_attr', which has
three members:
* field: indicates which field in extra attribute area is handled
*
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, Yangta
This patch adds `level` in `struct f2fs_compr_option` to allow ioctl
setting compression level.
The first byte of original f2fs_compr_option indicates which algorithm
is used. While the new f2fs_compr_option splits the first byte into two
parts:
* the MBS 4 bits indicate the version
* the LBS
On 2022/11/23 22:54, Chao Yu wrote:
On 2022/11/17 9:12, Jaegeuk Kim 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 f2fs_s
1 - 100 of 113 matches
Mail list logo