On 8/16/23 11:58 AM, Gao Xiang wrote:
>
>
> On 2023/8/16 11:49, Jingbo Xu wrote:
>> Add erofs_read_metadata() helper reading variable-sized metadata from
>> inode specified by @nid. Read from meta inode if @nid is 0.
>>
>> Signed-off-by: Jingbo Xu
>> ---
>> include/erofs/internal.h | 2 +
On 2023/8/16 11:49, Jingbo Xu wrote:
Add erofs_read_metadata() helper reading variable-sized metadata from
inode specified by @nid. Read from meta inode if @nid is 0.
Signed-off-by: Jingbo Xu
---
include/erofs/internal.h | 2 +
lib/data.c | 84 +
Make erofs_listxattr() and erofs_getxattr() routine support long xattr
name prefixes.
Although the on-disk format allows long xattr name prefixes to be placed
in the meta inode or packed inode, currently mkfs.erofs will place them
in packed inode by default. Thus let's also read long xattr name p
Since the introduction of long xattr name prefix, match_prefix() will
search among the long xattr name prefixes first and return the matched
prefix, while erofs_getxattr() expects a base prefix even when the
queried xattr name matches a long prefix.
Thus introduce match_base_prefix() helper to do
Add erofs_read_metadata() helper reading variable-sized metadata from
inode specified by @nid. Read from meta inode if @nid is 0.
Signed-off-by: Jingbo Xu
---
include/erofs/internal.h | 2 +
lib/data.c | 84
2 files changed, 86 insertions(
v2:
- add patch 3 to introduce erofs_read_metadata() helper, so that the
long xattr name prefixes could also be read from meta inode
v1:
https://lore.kernel.org/all/20230815091521.74661-1-jeffl...@linux.alibaba.com/
Jingbo Xu (4):
erofs-utils: lib: fix potential out-of-bound in xattr_entryl
Check the index before accessing array to avoid the potential
out-of-bound access.
Fixes: c47df5aa2d16 ("erofs-utils: fuse: introduce xattr support")
Reviewed-by: Gao Xiang
Signed-off-by: Jingbo Xu
---
lib/xattr.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/xa
Introduce a new rebuild mode merging multiple erofs images generated
from either tarerfs index mode (--tar=i):
mkfs.erofs --tar=i --aufs layer0.erofs layer0.tar
...
mkfs.erofs --tar=i --aufs layerN.erofs layerN.tar
mkfs.erofs merge.erofs layerN.erofs ... layer0.ero
Add erofs_rebuild_load_tree() helper loading inode tree from given erofs
image, and making it merged into a given inode tree in an overlayfs like
model.
Since we need to read the content of the symlink file from disk when
loading tree, add dependency on zlib_LIBS for mkfs.erofs.
Signed-off-by: Ji
Rename tarerofs_get_dentry() to erofs_rebuild_get_dentry().
Also make `whout` and 'opq' parameter optional when `aufs` is false.
Signed-off-by: Jingbo Xu
---
include/erofs/rebuild.h | 19 +++
lib/Makefile.am | 3 +-
lib/rebuild.c | 117 ++
Enhance tarerofs_dump_tree() so that it could optionally skip whiteout
files when it's supposed to output image in merged view. Rename it to
erofs_rebuild_dump_tree().
Signed-off-by: Jingbo Xu
---
include/erofs/inode.h| 2 +-
include/erofs/internal.h | 2 ++
lib/inode.c | 23
Add erofs_insert_ihash() helper inserting inode into inode hash table.
Also add prototypes of erofs_iget() and erofs_iget_by_nid() in the
header file.
Signed-off-by: Jingbo Xu
---
include/erofs/inode.h | 3 +++
lib/inode.c | 10 +++---
2 files changed, 10 insertions(+), 3 deletio
Add erofs_read_xattrs_from_disk() helper reading extended attributes
from disk, add checking if it's an opaque directory.
Move all xattr name related macros to xattr.c and introduce
erofs_set_opaque_xattr() helper to hide all these details.
Signed-off-by: Jingbo Xu
---
include/erofs/internal.h
... so that it could be called from outside blobchunk.c later.
Signed-off-by: Jingbo Xu
---
include/erofs/blobchunk.h | 2 ++
lib/blobchunk.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/erofs/blobchunk.h b/include/erofs/blobchunk.h
index 010aee1..fb85d
Keep self allocated and maintained devname in erofs_sb_info.
Reviewed-by: Gao Xiang
Signed-off-by: Jingbo Xu
---
include/erofs/internal.h | 2 +-
lib/io.c | 14 --
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/include/erofs/internal.h b/include/ero
Fix the missing le32_to_cpu(). Read and cache blocks of each device for
later use.
Initialize sbi->extra_devices from on-disk extra_devices.
Fixes: 0ce853a01123 ("erofs-utils: fuse: add multiple device support")
Reviewed-by: Gao Xiang
Signed-off-by: Jingbo Xu
---
lib/super.c | 11 ---
Add list_splice_tail() helper.
Reviewed-by: Gao Xiang
Signed-off-by: Jingbo Xu
---
include/erofs/list.h | 20
1 file changed, 20 insertions(+)
diff --git a/include/erofs/list.h b/include/erofs/list.h
index 3f5da1a..d7a9fee 100644
--- a/include/erofs/list.h
+++ b/include/er
i_ino[0] is a unique inode serial number in the erofs filesystem where
the inode resides, and also serves as the on-disk inode number, while
i_ino[1] is a unique number identifying the source inode in the source
directory, which is usually derived from st->st_ino.
Read on-disk ino and store it in
v2:
- add Reviewed-by tag from Gao Xiang
- patch 7: erofs_inode_tag_opaque() is merged into
erofs_read_xattrs_from_disk(); simplify the implementation of
erofs_read_xattrs_from_disk() in which erofs_setxattr() is used to set
read xattrs directly; move all xattr name related macros to xattr.c;
In index mode for tarerofs, tarerofs_write_chunk_indexes() is still called
even for files with 0 i_size, and inode->u.chunkformat is initialized
accordingly. This will make the previously set inode->u.i_rdev be
overridden as u.chunkformat and u.i_rdev are reused in one union.
To tidy up the code
On 2023/8/15 17:15, Jingbo Xu wrote:
Check the index before accessing array to avoid the potential
out-of-bound access.
Fixes: c47df5aa2d16 ("erofs-utils: fuse: introduce xattr support")
Signed-off-by: Jingbo Xu
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
On 2023/8/15 17:15, Jingbo Xu wrote:
Make erofs_listxattr() and erofs_getxattr() routine support long xattr
name prefixes.
Although the on-disk format allows long xattr name prefixes to be placed
in the meta inode or packed inode, currently mkfs.erofs will place them
in packed inode by defaul
On 2023/8/15 17:48, Ferry Meng wrote:
As erofs_fs_type has been declared in internal.h, there is no use to
declare repeatedly in super.c.
Signed-off-by: Ferry Meng
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
On 2023/8/15 17:48, Ferry Meng wrote:
Remove some redundant comments in erofs/super.c, and avoid unncessary
line breaks for cleanup.
Signed-off-by: Ferry Meng
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
On 2023/8/15 17:48, Ferry Meng wrote:
Remove some redundant comments in erofs/super.c, and avoid unncessary
line breaks for cleanup.
Signed-off-by: Ferry Meng
Thanks,
Gao Xiang
On 2023/8/15 17:48, Ferry Meng wrote:
To improve memory access efficiency and enable statistics functionality,
add SLAB_MEM_SPREAD and SLAB_ACCOUNT flag during erofs_icachep's allocation
time.
Signed-off-by: Ferry Meng
Reviewed-by: Gao Xiang
Thanks,
Gao Xiang
On 2023/8/15 18:24, Yue Hu wrote:
From: Yue Hu
Commit fc30780ebf90 ("erofs-utils: lib: avoid global sbi dependencies
(take 1)") updated the macro erofs_blknr by adding sbi argument.
Fixes: fc30780ebf90 ("erofs-utils: lib: avoid global sbi dependencies (take 1)")
Signed-off-by: Yue Hu
Rev
From: Yue Hu
Commit fc30780ebf90 ("erofs-utils: lib: avoid global sbi dependencies
(take 1)") updated the macro erofs_blknr by adding sbi argument.
Fixes: fc30780ebf90 ("erofs-utils: lib: avoid global sbi dependencies (take 1)")
Signed-off-by: Yue Hu
---
lib/block_list.c | 2 +-
1 file changed
To improve memory access efficiency and enable statistics functionality,
add SLAB_MEM_SPREAD and SLAB_ACCOUNT flag during erofs_icachep's allocation
time.
Signed-off-by: Ferry Meng
---
fs/erofs/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/erofs/super.c b/f
Remove some redundant comments in erofs/super.c, and avoid unncessary
line breaks for cleanup.
Signed-off-by: Ferry Meng
---
fs/erofs/super.c | 22 --
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 566f68ddfa36..ae5caf
As erofs_fs_type has been declared in internal.h, there is no use to
declare repeatedly in super.c.
Signed-off-by: Ferry Meng
---
fs/erofs/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 82f41d09f8d8..78a94955dd61 100644
--- a/fs/erofs/super.c
Make erofs_listxattr() and erofs_getxattr() routine support long xattr
name prefixes.
Although the on-disk format allows long xattr name prefixes to be placed
in the meta inode or packed inode, currently mkfs.erofs will place them
in packed inode by default. Thus let's also read long xattr name p
Since the introduction of long xattr name prefix, match_prefix() will
search among the long xattr name prefixes first and return the matched
prefix, while erofs_getxattr() expects a base prefix even when the
queried xattr name matches a long prefix.
Thus introduce match_base_prefix() helper to do
Check the index before accessing array to avoid the potential
out-of-bound access.
Fixes: c47df5aa2d16 ("erofs-utils: fuse: introduce xattr support")
Signed-off-by: Jingbo Xu
---
lib/xattr.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/xattr.c b/lib/xattr.c
inde
The first two are preparing for patch 3, which implements the support
for long xattr name prefixes for erofsfuse.
Patch 3 is basically synced from kernel commits:
erofs: add helpers to load long xattr name prefixes
erofs: handle long xattr name prefixes properly
erofs: enab
On 2023/8/15 16:36, Muchun Song wrote:
On Aug 7, 2023, at 19:08, Qi Zheng wrote:
The following functions are only used inside the mm subsystem, so it's
better to move their declarations to the mm/internal.h file.
1. shrinker_debugfs_add()
2. shrinker_debugfs_detach()
3. shrinker_debugfs_
> On Aug 7, 2023, at 19:09, Qi Zheng wrote:
>
> Use new APIs to dynamically allocate the gfs2-qd shrinker.
>
> Signed-off-by: Qi Zheng
Reviewed-by: Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote:
>
> The mm/vmscan.c file is too large, so separate the shrinker-related
> code from it into a separate file. No functional changes.
>
> Signed-off-by: Qi Zheng
Reviewed-by: Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote:
>
> The following functions are only used inside the mm subsystem, so it's
> better to move their declarations to the mm/internal.h file.
>
> 1. shrinker_debugfs_add()
> 2. shrinker_debugfs_detach()
> 3. shrinker_debugfs_remove()
>
> Signed-off-by:
39 matches
Mail list logo