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:
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: Sheng Yong
---
fsck/fsck.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/f
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
---
fs/f2fs/recovery.c | 19 ---
fs/f2fs/super.c| 15
Hi, Chao
On 2018/9/19 9:28, Chao Yu wrote:
Once quota file is corrupted, kernel will set CP_QUOTA_NEED_FSCK_FLAG
into checkpoint pack, this patch makes fsck supporting to detect the flag
and try to rebuild corrupted quota file.
Signed-off-by: Chao Yu
---
fsck/fsck.c | 3 ++-
Hi, Chao
On 2018/8/29 20:09, Chao Yu wrote:
Once quota file is corrupted, kernel will set CP_QUOTA_NEED_FSCK_FLAG
into checkpoint pack, this patch makes fsck supporting to detect the flag
and try to rebuild corrupted quota file.
Do we need to drop recovery data? Recovery data is never checked
Fixes: 5b0e95398e2b ("f2fs: introduce sbi->gc_mode to determine the policy")
Signed-off-by: Sheng Yong
---
fs/f2fs/sysfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index f22782a0defe..cd2e030e47b8 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs
On 2018/8/1 18:26, Chao Yu wrote:
On 2018/8/1 15:36, Sheng Yong wrote:
On 2018/8/1 14:56, Chao Yu wrote:
Hi Sheng,
On 2018/8/1 11:46, Sheng Yong wrote:
Fixes: 652d19558a347 ('f2fs: fix to do sanity check with block address in main
area')
Reported-by: Zhang Xiaobo
Signed-off-by: Sheng
On 2018/8/1 14:56, Chao Yu wrote:
Hi Sheng,
On 2018/8/1 11:46, Sheng Yong wrote:
Fixes: 652d19558a347 ('f2fs: fix to do sanity check with block address in main
area')
Reported-by: Zhang Xiaobo
Signed-off-by: Sheng Yong
That's my bad, and thanks for the fix.
Do you mind merge
Fixes: 652d19558a347 ('f2fs: fix to do sanity check with block address in main
area')
Reported-by: Zhang Xiaobo
Signed-off-by: Sheng Yong
---
fs/f2fs/checkpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 3587aa53dc90
On 2018/7/27 17:23, Jaegeuk Kim wrote:
On 07/24, Sheng Yong wrote:
Hi, Jaegeuk
On 2018/7/23 20:49, Jaegeuk Kim wrote:
On 07/23, Sheng Yong wrote:
If a quota node is corrupted, it may be removed. But its qf_ino in
super blocks is not cleared. To keep quota feature available, let's
try
quota structures
later.
Signed-off-by: Sheng Yong
---
v2->v1: calculate inode checksum when write quota inode, update commit msg
---
fsck/fsck.c | 82 +---
fsck/fsck.h | 1 +
fsck/mount.c | 7 +++--
3 files changed, 84 insertions(+), 6 deleti
Hi, Chao
On 2018/7/26 19:38, Chao Yu wrote:
On 2018/7/26 19:25, Sheng Yong wrote:
Quota sysfiles are already using journalled method to save quota value.
And non-journalled project quota is not supported by userspace tools. So
there is no need to implement journalled project quota.
Well
Quota sysfiles are already using journalled method to save quota value.
And non-journalled project quota is not supported by userspace tools. So
there is no need to implement journalled project quota.
Signed-off-by: Sheng Yong
---
Documentation/filesystems/f2fs.txt | 2 --
fs/f2fs/super.c
Signed-off-by: Sheng Yong
---
fs/f2fs/checkpoint.c | 5 -
fs/f2fs/super.c | 5 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 04841f32d4d9..581710760ba6 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
On 2018/7/25 23:44, Chao Yu wrote:
On 2018/7/24 20:17, Sheng Yong wrote:
Signed-off-by: Sheng Yong
---
fs/f2fs/checkpoint.c | 5 -
fs/f2fs/recovery.c | 2 +-
fs/f2fs/super.c | 5 +
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs
Hi, Chao
On 2018/7/26 7:19, Chao Yu wrote:
From: Chao Yu
Like quota_ino feature, we need to reject mounting RDWR with image
which enables project_quota feature when there is no CONFIG_QUOTA
be set in kernel.
Signed-off-by: Chao Yu
---
fs/f2fs/super.c | 6 ++
1 file changed, 6
According to fs/quota/dquot.c, `dq_data_lock' protects mem_dqinfo
structures and modifications of dquot pointers in the inode, and
`dquot->dq_dqb_lock' protects data from dq_dqb.
We should use dquot->dq_dqb_lock in statfs_project instead of
dq_dat_lock.
Signed-off-by: Sheng Yong
---
f
If quota feature is enabled, quota is on by default. However, if
CONFIG_QUOTA is not built in kernel, dquot entries will not get updated,
which leads to quota inconsistency.
Signed-off-by: Sheng Yong
---
fs/f2fs/super.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff
Signed-off-by: Sheng Yong
---
fs/f2fs/checkpoint.c | 5 -
fs/f2fs/recovery.c | 2 +-
fs/f2fs/super.c | 5 +
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 9c29526a7633..9a0222d9e28c 100644
--- a/fs/f2fs/checkpoint.c
Hi, Jaegeuk
On 2018/7/23 20:49, Jaegeuk Kim wrote:
On 07/23, Sheng Yong wrote:
If a quota node is corrupted, it may be removed. But its qf_ino in
super blocks is not cleared. To keep quota feature available, let's
try to rebuild a new quota node.
Hi Sheng,
IIRC, we need to rebuild whole
If a quota node is corrupted, it may be removed. But its qf_ino in
super blocks is not cleared. To keep quota feature available, let's
try to rebuild a new quota node.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 82 +---
fsck/fsck.h | 1 +
fsck
`quota_handle->qh_qf->filesize' is not initialized by quota_create_file().
It contains random value, which is updated to quota file's i_size in
quota_file_close(). Since quota file is re-created, `filesize' can be
initialized as 0.
Signed-off-by: Sheng Yong
---
fsck/quotaio.c | 1 +
To avoid overflow, set namelen parameter of convert_encrypted_name as
unsigned int. convert_encrypted_name() will check if namelen exceeds the
limitation.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 6 +++---
fsck/fsck.h | 2 +-
fsck/mount.c | 2 +-
3 files changed, 5 insertions(+), 5
Hi, Chao,
On 2018/7/9 23:25, Chao Yu wrote:
From: Chao Yu
This patch tries to fix incorrect extra_attr bit or i_extra_isize value
in fsck.
Signed-off-by: Chao Yu
---
v2:
- fix to replace F2FS_INLINE_DATA with F2FS_EXTRA_ATTR.
fsck/fsck.c | 18 +-
1 file changed, 17
Hi, Chao,
On 2018/7/9 23:14, Chao Yu wrote:
On 2018/7/4 17:50, Sheng Yong wrote:
If the block device is opened by tools, F2FS should not be mounted.
Especially when fsck is running, errors unexpected may happen. So if
tools open a block device, we give it the O_EXCL flag to make sure
the block
On 2018/7/9 10:15, Chao Yu wrote:
Hi Sheng,
On 2018/7/3 18:10, Sheng Yong wrote:
Check extra_attr feature for inode. If it is corrupted, remove the
inode.
Could you check the patch:
[PATCH] fsck.f2fs: fix to do sanity check with extra_attr feature
Would it better to do sanity check
If the block device is opened by tools, F2FS should not be mounted.
Especially when fsck is running, errors unexpected may happen. So if
tools open a block device, we give it the O_EXCL flag to make sure
the block device is opened exclusivly.
Signed-off-by: Sheng Yong
---
lib/libf2fs.c | 27
Check extra_attr feature for inode. If it is corrupted, remove the
inode.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200219
Reported-by: Wen Xu
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 15264b2
Check extent for inline data/dentry inode. If an inode contains inline
data/dentry, it should have no extent.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=200175
Reported-by: Wen Xu
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 16 +++-
fsck/fsck.h | 1 +
2 files changed, 12
If a quota node is corrupted, it may be removed. Then its qf_ino should
also be removed.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 19 +--
fsck/fsck.h | 1 +
fsck/mount.c | 2 +-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
If curseg is an empty segment, it will not be checked. This patch
introduces fsck_chk_curseg_info() to check SIT/SSA type of cursegs
to avoid curseg corruption.
Signed-off-by: Sheng Yong
---
v2: check c.fix_on and c.preen_mode before updating se->type
fsck/fsck.c |
flush_sit_entries() is always called before write_checkpoint(). Since
free_segs is counted in write_checkpoint, there is no need to do that
in flush_sit_entries. Besides, the value of free_segs may be not
correct if we skip uptodate seg_entries.
Signed-off-by: Sheng Yong
---
fsck/mount.c | 7
move_curseg_info->reset_curseg changes cursegs, however, new segment
entries are not set as dirty. As a result, flush_sit_entries will not
update entries in SIT, especially when an empty segment is selected
as the new curseg, its seg_entry->type is lost.
Signed-off-by: Sheng Yong
---
If curseg is an empty segment, it will not be checked. This patch
introduces fsck_chk_curseg_info() to check SIT/SSA type of cursegs
to avoid curseg corruption.
Signed-off-by: Sheng Yong
---
fsck/fsck.c | 34 ++
fsck/fsck.h | 1 +
fsck/main.c | 2 ++
3 files
Hi, Jaegeuk
On 2018/6/5 4:55, Jaegeuk Kim wrote:
On 06/04, Sheng Yong wrote:
resize.f2fs (f2fs_defragment) tries to migrate blocks to new positions.
However, if a curseg is selected, and f2fs_defragment is broken by any
error, curseg->next_blkoff is left not updated.
To avoid this, we s
resize.f2fs (f2fs_defragment) tries to migrate blocks to new positions.
However, if a curseg is selected, and f2fs_defragment is broken by any
error, curseg->next_blkoff is left not updated.
To avoid this, we skip cursegs when finding next free block.
Signed-off-by: Sheng Yong
---
fsck/f2f
If SBI_NEED_FSCK is set, discard_wake will never be cleared. As a
result, the condition of wait_event_interruptible_timeout() is always
true, which gets discard thread run too frequently.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fs/f2fs/segment.c | 7 ---
1 file chan
Only dir may have F2FS_INLINE_DOTS flag, so there is no need to check
the flag in recover flow.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fs/f2fs/recovery.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index 1b23d3febe4c..709dd4
This patch removes duplicated dquot_initialize in recover_orphan_inode(),
and fix the error handling if dquot_initialize fails.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fs/f2fs/checkpoint.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/checkp
`cur' will never be NULL, we should check inmem_pages list instead.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fs/f2fs/segment.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 5854cc4e1d67..bf9dab55b370 100644
--
The variable `c' is declared twice in f2fs_fs.h. This patch removes
the second declaration.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
include/f2fs_fs.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 2b0be2d..cbfdab5
This patch introduces a new option -V to show the version of f2fs tools
and exit after that.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
v2->v1: add -V for all f2fs tools
fsck/main.c | 30 +-
include/f2fs_fs.h | 6 +++
On 2018/4/10 1:55, Jaegeuk Kim wrote:
On 04/08, Chao Yu wrote:
On 2018/4/8 10:15, Sheng Yong wrote:
This patch introduces a new option -V to show the version of mkfs.f2fs
and exit after that.
BTW, should we add -V for other misc tools?
Yes, could you please add this for others?
OK
This patch introduces a new option -V to show the version of mkfs.f2fs
and exit after that.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
mkfs/f2fs_format_main.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_
Resize rebuilds checkpoint with 6 summary blocks, so if
CP_COMPACT_SUM_FLAG is set in the old checkpoint, clear it.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fsck/resize.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fsck/resize.c b/fsck/resize.c
index 7643511..0
Hi, Ju Hyung and list,
On 2018/3/17 23:04, Park Ju Hyung wrote:
- Print errors and warnings to stderr
- Print errors and warnings regardless of debugging level
- Make info/error/warning logs consistent
- Print POSIX errors when possible
- Use more consistent terms and grammar
Shall
When mounting with test_dummy_encryption option, if encrypt feature
is not set, return fail instead of setting encrypt feature forcely.
Cc: linux-e...@vger.kernel.org
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
fs/ext4/super.c | 7 +++
1 file changed, 3 insertions(+), 4 del
This patch introduces a new mount option `test_dummy_encryption'
to allow fscrypt to create a fake fscrypt context. This is used
by xfstests.
Signed-off-by: Sheng Yong <shengyo...@huawei.com>
---
Documentation/filesystems/f2fs.txt | 2 ++
fs/f2fs/dir.c | 4 +++-
f
1 - 100 of 229 matches
Mail list logo