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
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_should_compress() always returns false.
This patch moves set_compress_inode(),
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
+++
On 2022/11/16 7:00, 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_should_compress() always returns
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
---
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
@@ -273,8
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 << i)
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
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_should_compress() always returns false.
This patch moves set_compress_inode(),
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_should_compress() always returns false.
So if a new file is created (its inode
在 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
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
---
On 2022/11/12 9:27, Jaegeuk Kim wrote:
Does thes make sense?
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev-test=608460dfae20b9d23aa222f7448710a086778222
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 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,
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=9c84aad379019a0d86655bb50bd7b4bc92683c4b
Hi, Jaegeuk,
Thanks for cleaning it up. This version looks good to me. I tested it
with my
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?
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
*
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
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 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
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
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
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
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
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
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
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 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
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
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
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
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
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
39 matches
Mail list logo