Reserve blocks on released compress inode while writing, so
compressed files with released space are allowed to be rewritten.
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 86 ++
1 file changed, 51 insertions(+), 35 deletions(-)
diff --git a/fs/f
Remove unnecessary code logic.
Signed-off-by: Yangtao Li
---
fs/f2fs/compress.c | 30 +-
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 36e5dab6baae..de55c266509a 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f
NFSv4 mandates a change attribute to avoid problems with timestamp
granularity, which Linux implements using the i_version counter. This is
particularly important when the underlying filesystem is fast.
BTW introduce a new mount option to enable the iversion functionality,
and disabling it by defa
NFSv4 mandates a change attribute to avoid problems with timestamp
granularity, which Linux implements using the i_version counter. This is
particularly important when the underlying filesystem is fast.
Signed-off-by: Yangtao Li
---
fs/f2fs/f2fs.h | 1 +
fs/f2fs/inode.c | 1 +
fs/f2fs/super.c |
+cc wi...@infradead.org
On 2023/6/20 4:43, Jens Axboe wrote:
Hi,
I came across this patch in a news posting:
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev&id=d618126911829523e35a61f4a5a4ad159b1b2c8d
which has me a bit worried. As far as I can tell, all that
It is observed that when in user compression mode (compress_extension=*),
even though the file is not compressed, the file is still forced to use
buffer io, which makes the AndroBench sequential read and write drop
significantly. In fact, when the file is not compressed, we don't need
to force it t
On 2023/6/19 12:04, Chao Yu wrote:
On 2023/6/19 11:11, Yangtao Li wrote:
On 2023/6/19 8:54, Chao Yu wrote:
On 2023/6/13 12:14, Yangtao Li wrote:
On 2023/6/12 22:38, Chao Yu wrote:
On 2023/6/9 21:15, Yangtao Li wrote:
It is observed that when in user compression mode
(compress_extension=*)
When an EFSCORRUPTED error occurs in f2fs, report the error to
userspace monitoring tools.
Signed-off-by: Yangtao Li
---
fs/f2fs/super.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 375a178540d6..69c747c4d4f4 100644
--- a/fs/f2fs/super.c
+++ b/
On 2023/6/19 8:54, Chao Yu wrote:
On 2023/6/13 12:14, Yangtao Li wrote:
On 2023/6/12 22:38, Chao Yu wrote:
On 2023/6/9 21:15, Yangtao Li wrote:
It is observed that when in user compression mode
(compress_extension=*),
even though the file is not compressed, the file is still forced to
use
ping..
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
ping...
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
F2FS_I_SB(inode) is redundant.
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 41e7c2b80f31..f45d05c13ae5 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3476,7 +3476,7 @@ sta
Just for cleanup.
Signed-off-by: Yangtao Li
---
fs/f2fs/segment.h | 2 ++
fs/f2fs/super.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index 2ca8fb5d0dc4..28ccbaffe546 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -70
ping..
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
This adds the async buffered write support to f2fs,
the following is the relevant test data.
iodepth | 1| 2| 4| 8| 16 |
before(M/s) | 1012 | 1133 | 894 | 981 | 866 |
after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 |
The following is the fio configuration:
[global]
ioen
Expend fallocate command to support more flags.
Signed-off-by: Yangtao Li
---
v3:
-update man/f2fs_io.8
man/f2fs_io.8 | 19 ++-
tools/f2fs_io/f2fs_io.c | 39 +--
2 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/man/f2fs
On 2023/6/12 22:38, Chao Yu wrote:
On 2023/6/9 21:15, Yangtao Li wrote:
It is observed that when in user compression mode
(compress_extension=*),
even though the file is not compressed, the file is still forced to use
buffer io, which makes the AndroBench sequential read and write drop
signifi
It is observed that when in user compression mode (compress_extension=*),
even though the file is not compressed, the file is still forced to use
buffer io, which makes the AndroBench sequential read and write drop
significantly. In fact, when the file is not compressed, we don't need
to force it t
Expend fallocate command to support more flags.
Signed-off-by: Yangtao Li
---
tools/f2fs_io/f2fs_io.c | 39 +--
1 file changed, 33 insertions(+), 6 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 1774eca..5a6a6a0 100644
--- a
On 2023/6/6 14:43, Chao Yu wrote:
On 2023/5/31 22:40, Yangtao Li wrote:
This adds the async buffered write support to f2fs,
the following is the relevant test data.
Yangtao,
Could you please provide detailed test command?
Use fio to test, the following is the configuration:
# io_uring
[g
This adds the async buffered write support to f2fs,
the following is the relevant test data.
iodepth | 1| 2| 4| 8| 16 |
before(M/s) | 1012 | 1133 | 894 | 981 | 866 |
after(M/s) | 1488 | 1896 | 2081 | 2188 | 2207 |
Signed-off-by: Lu Hongfei
Signed-off-by: Yangtao Li
After enabling this feature, the read performance has been greatly
improved:
167M/s -> 234M/s, Increase ratio by 40%
Test w/:
./fio --name=onessd --filename=/data/test/local/io_uring_test
--size=256M --rw=randread --bs=4k --direct=0 --overwrite=0
--numjobs=1 --iodepth=1 --time_bas
When an EFSCORRUPTED error occurs in f2fs, report the error to
userspace monitoring tools.
Signed-off-by: Yangtao Li
---
fs/f2fs/super.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 51812f459581..42d5aa504afe 100644
--- a/fs/f2fs/super.c
+++ b/fs
For judging the inode flag state, the inode lock must be held.
Fixes: ef8d563f184e ("f2fs: introduce F2FS_IOC_RELEASE_COMPRESS_BLOCKS")
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index a
For judging the inode flag state, the inode lock must be held.
Fixes: c75488fb4d82 ("f2fs: introduce F2FS_IOC_RESERVE_COMPRESS_BLOCKS")
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 3
F2FS_I_SB(inode) is redundant.
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 0dbbcb406d3f..6f8936ec689c 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -3466,7 +3466,7 @@ sta
For judging the inode flag state, the inode lock must be held.
Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and
F2FS_IOC_COMPRESS_FILE")
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/file.c
ping..
> On 2023/4/8 2:31, Yangtao Li wrote:
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
This patch provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.
Reported-by: kernel test robot
Link: https://lore.kernel.org/oe-kbuild-all/202304152234.wjay3iym-...@intel.com/
Signed-off-by:
For judging the inode flag state, the inode lock must be held.
Cc: Christophe JAILLET
Fixes: fcc85a4d86b5 ("f2fs crypto: activate encryption support for fs APIs")
Signed-off-by: Yangtao Li
---
v2:
-add unlock
fs/f2fs/file.c | 22 +-
1 file changed, 13 insertions(+), 9 deleti
For judging the inode flag state, the inode lock must be held.
BTW, add compressd file check and to avoid 'if' nesting.
Cc: Christophe JAILLET
Fixes: 4dd6f977fc77 ("f2fs: support an ioctl to move a range of data blocks")
Signed-off-by: Yangtao Li
---
v2:
-add unlock
fs/f2fs/file.c | 18
Expend fallocate command to support more flags.
Signed-off-by: Yangtao Li
---
tools/f2fs_io/f2fs_io.c | 37 -
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index 126e1f9..1be8c9e 100644
--- a/t
This patch supports a new sub-command 'move_range' in f2fs_io
to move a range of data blocks from source file to destination
file via F2FS_IOC_MOVE_RANGE ioctl.
Signed-off-by: Yangtao Li
---
man/f2fs_io.8 | 4
tools/f2fs_io/f2fs_io.c | 36
2 f
For judging the inode flag state, the inode lock must be held.
Fixes: fcc85a4d86b5 ("f2fs crypto: activate encryption support for fs APIs")
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/fil
For judging the inode flag state, the inode lock must be held.
BTW, add compressd file check and to avoid 'if' nesting.
Fixes: 4dd6f977fc77 ("f2fs: support an ioctl to move a range of data blocks")
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 14 --
1 file changed, 8 insertions(+),
In the following scenario, after executing the move_range ioctl syscall,
the block size of the source file is 0, but data can still be read.
# stat test
File: test
Size: 6 Blocks: 8 IO Block: 4096 regular file
# ./new_f2fs_io move_range test test_move_range 0 0 0
This patch supports a new sub-command 'move_range' in f2fs_io
to move a range of data blocks from source file to destination
file via F2FS_IOC_MOVE_RANGE ioctl.
Signed-off-by: Yangtao Li
---
man/f2fs_io.8 | 4
tools/f2fs_io/f2fs_io.c | 35 +++
2 fi
Replace
if (a > 0) {
a--;
}
with:
if (a-- > 0) {
}
Signed-off-by: Yangtao Li
---
fs/f2fs/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 107585797ffa..cbab0cc2c82e 100644
--- a/fs/f2fs/super.c
+++ b
This patch introduces mount_errors related api and uses it in code.
Signed-off-by: Yangtao Li
---
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 15 +++
fs/f2fs/node.c | 2 +-
fs/f2fs/super.c | 11 +--
4 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/data
This patch introduces bggc_mode related api and uses it in code.
Signed-off-by: Yangtao Li
---
fs/f2fs/f2fs.h | 15 +++
fs/f2fs/gc.c| 2 +-
fs/f2fs/super.c | 13 ++---
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index
This information can now be obtained from the mount, and there isi
no need to print it out every time the trace event is triggered.
Signed-off-by: Yangtao Li
---
fs/f2fs/segment.c | 3 +--
include/trace/events/f2fs.h | 13 +++--
2 files changed, 4 insertions(+), 12 deletions(-
If a file has FI_COMPRESS_RELEASED, all writes for it should not be
allowed.
Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and
F2FS_IOC_COMPRESS_FILE")
Signed-off-by: Qi Han
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/fs/f2fs
This patch provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.
Reported-by: kernel test robot
Link: https://lore.kernel.org/oe-kbuild-all/202304152234.wjay3iym-...@intel.com/
Signed-off-by:
Return -ENOMEM when proc_mkdir failed.
Signed-off-by: Yangtao Li
---
v2:
-removing check for proc in f2fs_unregister_sysfs and f2fs_register_sysfs
fs/f2fs/sysfs.c | 39 +++
1 file changed, 23 insertions(+), 16 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2
If a file has FI_COMPRESS_RELEASED, all writes for it should not be
allowed.
Fixes: 5fdb322ff2c2 ("f2fs: add F2FS_IOC_DECOMPRESS_FILE and
F2FS_IOC_COMPRESS_FILE")
Signed-off-by: Qi Han
Signed-off-by: Yangtao Li
---
fs/f2fs/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/f
There will be IO performance degradation in the following scenarios:
-The space utilization rate remains below 80%(e.g. 79%)
-There are many big discard commands generated
-Always have read and write IO generated
The performance degradation is due to a large number of undiscard blocks
while
Returns -EBUSY when __issue_discard() is interrupted by io,
instead of returning -1.
Signed-off-by: Yangtao Li
---
fs/f2fs/segment.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6db410f1bb8c..a005948dca93 100644
--- a/fs/f2fs
Similar to FAULT_LOCK_OP, this patch supports to inject fault into
variant of _trylock(), including:
- inode_trylock
- down_read_trylock
- down_write_trylock
- mutex_trylock
- sb_start_write_trylock
- trylock_page
Usage:
a) echo 524288 > /sys/fs/f2fs//inject_type or
b) mount -o fau
> > + ctx = iostat_get_bio_private(bio);
>
> This ctx is not used for iostat.
Considering that the next patch needs to store the discard_cmd pointer
in bio_iostat_ctx, there is no need to add a new variable.
We just need to rename post_read_ctx to data.
Change bio_iostat_ctx->post_read_c
This patch introduces a tracepoint to monitor discard thread behaviors.
Signed-off-by: Yangtao Li
---
fs/f2fs/segment.c | 3 +++
include/trace/events/f2fs.h | 28
2 files changed, 31 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 6
Add missing 'is'.
Signed-off-by: Yangtao Li
---
fs/f2fs/super.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 9f15b03037db..357d45e49635 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1362,7 +1362,7 @@ static int parse_opt
Slightly modify the description of noinline_data and move it near
the description of inline_data.
Cc: Bagas Sanjaya
Suggested-by: Bagas Sanjaya
Signed-off-by: Yangtao Li
---
Documentation/filesystems/f2fs.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation
Clarify the fact that extent_cache and noextent_cache toggle
read extent cache on or off.
Cc: Bagas Sanjaya
Signed-off-by: Yangtao Li
---
v3:
-update msg
Documentation/filesystems/f2fs.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/filesystems/f2fs.r
Let's descrbie it's read extent cache.
Signed-off-by: Yangtao Li
---
v2:
-s/an/a
Documentation/filesystems/f2fs.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/filesystems/f2fs.rst
b/Documentation/filesystems/f2fs.rst
index c57745375edb..84911b7aff25
Let's descrbie it's read extent cache.
Signed-off-by: Yangtao Li
---
Documentation/filesystems/f2fs.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/filesystems/f2fs.rst
b/Documentation/filesystems/f2fs.rst
index c57745375edb..f68337086dec 100644
--- a/D
This patch provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.
Reported-by: kernel test robot
Link: https://lore.kernel.org/oe-kbuild-all/202304152234.wjay3iym-...@intel.com/
Signed-off-by:
This patch provides a large number of variants of F2FS_RW_ATTR
and F2FS_RO_ATTR macros, reducing the number of parameters required
to initialize the f2fs_attr structure.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 237 +---
1 file changed, 146 inse
This patch supports a new sub-command 'precache_extents' in f2fs_io
to trigger precache extents via F2FS_IOC_PRECACHE_EXTENTS ioctl.
Signed-off-by: Yangtao Li
---
v2:
-fix precache_extents_help
man/f2fs_io.8 | 3 +++
tools/f2fs_io/f2fs_io.c | 24
2 files chang
This patch supports a new sub-command 'precache_extents' in f2fs_io
to trigger precache extents via F2FS_IOC_PRECACHE_EXTENTS ioctl.
Signed-off-by: Yangtao Li
---
man/f2fs_io.8 | 3 +++
tools/f2fs_io/f2fs_io.c | 24
2 files changed, 27 insertions(+)
diff --gi
Replace !has_not_enough_free_secs w/ has_enough_free_secs.
BTW avoid nested 'if' statements in f2fs_balance_fs().
Signed-off-by: Yangtao Li
---
fs/f2fs/gc.c | 2 +-
fs/f2fs/segment.c | 43 ++-
fs/f2fs/segment.h | 8 +++-
3 files changed, 30 inse
> What if some app/script is using gc_modeit breaks its use.
Similar words, you said before.
https://lore.kernel.org/lkml/cd6d15e3-b692-d3c1-0f01-33e632f5f...@kernel.org/
The instructions for these nodes are in the Documentation/ABI/testing/
directory,
not the Documentation/ABI/stable direc
> F2FS_RW_ATTR looks more common to me.
My idea is to add macro like this:
F2FS_SBI_GENERAL_RW_ATTR(node_io_flag);
CPRC_INFO_GENERAL_RW_ATTR(ckpt_thread_ioprio);
..
F2FS_SBI_RW_ATTR(umount_discard_timeout, interval_time[UMOUNT_DISCARD_TIMEOUT]);
It seems unnecessary to repeat a bunch of the
This patch exports gc_mode to debugfs. Since gc_urgent and gc_idle
nodes can get gc mode, so remove gc_mode node.
Signed-off-by: Yangtao Li
---
Documentation/ABI/testing/sysfs-fs-f2fs | 6 --
fs/f2fs/debug.c | 13 -
fs/f2fs/sysfs.c
For the readable and writable f2fs_attr with struct_type of F2FS_SBI type,
let's directly use the F2FS_SBI_RW_ATTR macro.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 73 +
1 file changed, 37 insertions(+), 36 deletions(-)
diff --git a/fs/f2fs/
Commit 3fde13f817e2 ("f2fs: compress: support compress level")
forgot to do basic compress level check, let's add it.
Signed-off-by: Yangtao Li
---
fs/f2fs/inode.c | 106 +++-
1 file changed, 77 insertions(+), 29 deletions(-)
diff --git a/fs/f2fs/inod
The current code uses a mixture of MAX_IO_TYPE and NR_PAGE_TYPE
to form lat_type, and uses a two-dimensional array to store data.
NR_PAGE_TYPE is 3, which is unreasonable for a discard with a
PAGE_TYPE of 1. So this patch changes the array to a 1D array and
does some cleanup.
Signed-off-by: Yangta
In this patch, it adds to account discard latency. This allows us to
track the discard io latency of the system lightweightly after enabling
iostat.
Signed-off-by: Yangtao Li
---
v4:
-split it to two patch
fs/f2fs/f2fs.h | 1 +
fs/f2fs/iostat.c| 6 --
fs/f2fs/segme
Return -ENOMEM when proc_mkdir failed.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 3aad3500a701..dcd497e0920a 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -13
Convert to use remove_proc_subtree() and kill kobject_del() directly.
kobject_put() actually covers kobject removal automatically, which is
single stage removal.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/fs/
It's deprecated since commit 377224c47118 ("f2fs: don't split checkpoint
in fstrim").
Signed-off-by: Yangtao Li
---
Documentation/ABI/testing/sysfs-fs-f2fs | 6 --
1 file changed, 6 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-fs-f2fs
b/Documentation/ABI/testing/sysfs-fs-f2fs
kobject_put() actually covers kobject removal automatically, which is
single stage removal. So it is safe to kill kobject_del() directly.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index dfbd17802549..d571
> kobject_put() actually covers kobject removal automatically, which is
> single stage removal. So if you see the two called together, it is
> safe to kill kobject_del() directly.
If the reference count is not abnormal, kobject_put() does contain
what kobject_del() does.
Thx,
Yangtao
__
There is only single instance of these ops, and Jaegeuk point out that:
Originally this was intended to give a chance to provide other
allocation option. Anyway, it seems quit hard to do it anymore.
So remove the indirection and call f2fs_get_victim() directly.
Signed-off-by: Yangtao Li
Commit 3fde13f817e2 ("f2fs: compress: support compress level")
forgot to do basic compress level check, let's add it.
Signed-off-by: Yangtao Li
---
v2:
-convert to zstd_max_clevel()
fs/f2fs/inode.c | 96 ++---
1 file changed, 67 insertions(+), 29 delet
Hi Chao,
> Why not zstd_max_clevel()?
zstd_max_clevel() is only defined when CONFIG_F2FS_FS_ZSTD is enabled,
using zstd_max_clevel() will result in compile errors otherwise.
If using the following code,
switch
Similar to FAULT_LOCK_OP, this patch supports to inject fault into
variant of _trylock(), including:
- inode_trylock
- down_read_trylock
- down_write_trylock
- mutex_trylock
- sb_start_write_trylock
- trylock_page
Usage:
a) echo 524288 > /sys/fs/f2fs//inject_type or
b) mount -o fau
There is only single instance of these ops, so remove the indirection
and call get_victim_by_default directly.
Signed-off-by: Yangtao Li
---
fs/f2fs/f2fs.h| 5 -
fs/f2fs/gc.c | 12 +++-
fs/f2fs/segment.c | 7 ---
fs/f2fs/segment.h | 7 ---
4 files changed, 11 inse
Similar to FAULT_LOCK_OP, this patch supports to inject fault into
variant of _trylock(), including:
- inode_trylock
- down_read_trylock
- down_write_trylock
- mutex_trylock
- sb_start_write_trylock
- trylock_page
Usage:
a) echo 524288 > /sys/fs/f2fs//inject_type or
b) mount -o fau
> I guess we can cover all trylock w/ FAULT_LOCK_OP type fault injection,
> rather than just cover f2fs_down_write_trylock().
>
> Including:
> - inode_trylock
> - down_read_trylock
> - down_write_trylock
> - mutex_trylock
> - sb_start_write_trylock
> - trylock_page
>
> Bug only excluding f2fs_try
This patch extends the fault injection of FAULT_LOCK_OP type,
including:
- inode_trylock
- down_read_trylock
- down_write_trylock
- mutex_trylock
- sb_start_write_trylock
- trylock_page
Since it supports not only the original lock_op fault injection,
let's rename lock_op to lock.
Sign
Let's use sysfs_emit.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 10 ++
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..2c0b2cb05a3a 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -312,19 +312,13 @@ static ss
This patch support noage_extent_cache mount option.
Signed-off-by: Yangtao Li
---
Documentation/filesystems/f2fs.rst | 2 ++
fs/f2fs/super.c| 7 +++
2 files changed, 9 insertions(+)
diff --git a/Documentation/filesystems/f2fs.rst
b/Documentation/filesystems/f2fs.rst
ind
If the compress feature is not enabled, there is no need to set
compress-related parameters.
Signed-off-by: Yangtao Li
---
fs/f2fs/super.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 768be1c76a47..b5828a67f7c1 100644
---
Remove unnecessary lz4hc_compress_pages().
Signed-off-by: Yangtao Li
---
v2:
-rebase
fs/f2fs/compress.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 3182e1506252..f8b15c932c97 100644
--- a/fs/f2fs/comp
Commit 3fde13f817e2 ("f2fs: compress: support compress level")
forgot to do basic compress level check, let's add it.
Signed-off-by: Yangtao Li
---
fs/f2fs/inode.c | 94 +
include/linux/zstd_lib.h| 3 ++
lib/zstd/compress/clevels.h | 4 --
3
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/
Thx,
Yangtao
__
Similar to FAULT_LOCK_OP, this patch supports to inject fault into
f2fs_down_write_trylock().
Usage:
a) echo 524288 > /sys/fs/f2fs//inject_type or
b) mount -o fault_type=524288
Signed-off-by: Yangtao Li
---
v2:
-remove f2fs_down_write_trylock macro
Documentation/ABI/testing/sysfs-fs-f2fs
In this patch, it adds to account discard latency.
Reported-by: kernel test robot
Link: https://lore.kernel.org/oe-kbuild-all/202303211005.rgxljvli-...@intel.com/
Signed-off-by: Yangtao Li
---
v3:
-force conversion to enum iostat_lat_type type
v2:
-rename get_bio_iostat_private to iostat_get_bio
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Damien Le Moal
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455af
There are plenty of using kobject_del() and kobject_put() together
in the kernel tree. This patch wraps these two calls in a single helper.
Signed-off-by: Yangtao Li
---
v3:
-convert to inline helper
v2:
-add kobject_del_and_put() users
include/linux/kobject.h | 13 +
lib/kobject.c
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Damien Le Moal
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455af
There are plenty of using kobject_del() and kobject_put() together
in the kernel tree. This patch wraps these two calls in a single helper.
Signed-off-by: Yangtao Li
---
v2:
-add kobject_del_and_put() users
resend patchset to gregkh, Rafael and Damien
include/linux/kobject.h | 1 +
lib/kobject.
In this patch, it adds to account discard latency.
Signed-off-by: Yangtao Li
---
v2:
-rename get_bio_iostat_private to iostat_get_bio_private
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 1 +
fs/f2fs/iostat.c| 83 +
fs/f2fs/i
As Christoph Hellwig point out:
Please avoid the else by doing the goto in the branch.
Signed-off-by: Yangtao Li
---
fs/f2fs/data.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index bf51e6e4eb64..fa931fb768e7 100644
--- a/fs
BUG_ON() will be triggered when writing files concurrently,
because the same page is writtenback multiple times.
1597 void folio_end_writeback(struct folio *folio)
1598 {
..
1618 if (!__folio_end_writeback(folio))
1619 BUG();
..
1625 }
kernel BU
Hi filesystem maintainers,
> Hard to comment on patches with this. It is only 10 patches. So send
> everything please.
If you are interested in the entire patchset besides Damien,
please let me know. I'll resend the email later to cc more people.
Thx,
Yangtao
_
Hi all,
Out of consideration for minimizing disruption, I did not send the
patchset to everyone. However, it seems that my consideration was
unnecessary, so I CC'd everyone on the first patch. If you would
like to see the entire patchset, you can access it at this address.
https://lore.kernel.org
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455afc12cfc 100644
--- a/
Use kobject_del_and_put() to simplify code.
Signed-off-by: Yangtao Li
---
fs/f2fs/sysfs.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 9ddc6ee19433..b455afc12cfc 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -1478,14
is_extension_exist() only return two values, 0 or 1.
So there is no need to use int type.
Signed-off-by: Yangtao Li
---
Resend this patch because there is no similar patch to merge in this time.
fs/f2fs/namei.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f
1 - 100 of 287 matches
Mail list logo