Re: [PATCH v2] erofs-utils: add Apache 2.0 license

2021-12-02 Thread Li Guifu via Linux-erofs
Let's release liberofs under GPL-2.0+ OR Apache-2.0 license for better integration. Signed-off-by: Huang Jianan Acked-by: Li Guifu Thanks, Li Guifu --- include/erofs/blobchunk.h | 2 +- include/erofs/block_list.h | 2 +- include/erofs/cache.h | 2 +-

[PATCH v3] AOSP: erofs-utils: add block list support

2021-06-24 Thread Li GuiFu via Linux-erofs
From: Yue Hu Android update engine will treat EROFS filesystem image as one single file. Let's add block list support to optimize OTA size. Signed-off-by: Yue Hu Signed-off-by: Gao Xiang Signed-off-by: Li Guifu --- include/erofs/block_list.h | 27 +++ include/erofs/config.h | 1

Re: [PATCH v2] AOSP: erofs-utils: add block list support

2021-06-23 Thread Li Guifu via Linux-erofs
Gao Xiang There are three condition need to be fixed. The whole inline file should not be printed anything even *\n* The last inline block should add *\n* to trigger a new line The last block and not inline should be print independently On 6/23/21 1:31

Re: [PATCH] AOSP: erofs-utils: add block list support

2021-06-23 Thread Li Guifu via Linux-erofs
Hu Yue Thanks to your contribution. Base test shows it could record block map list correctly. Some codes need be refactored for further ahead. On 6/21/21 11:02 PM, Yue Hu wrote: From: Yue Hu Android update engine will treat EROFS filesystem image as one single file. Let's add block

Re: [PATCH v1 2/2] erofs-utils: introduce erofs_subdirs to one dir for sort

2021-05-09 Thread Li GuiFu via Linux-erofs
GaoXiang On 2021/5/7 15:09, Gao Xiang wrote: > Hi Guifu, > > On Wed, May 05, 2021 at 10:26:15PM +0800, Li Guifu via Linux-erofs wrote: >> The structure erofs_subdirs has a dir number and a list_head, >> the list_head is the same with i_subdirs in the inode. >> Using er

[PATCH v1 2/2] erofs-utils: introduce erofs_subdirs to one dir for sort

2021-05-05 Thread Li Guifu via Linux-erofs
The structure erofs_subdirs has a dir number and a list_head, the list_head is the same with i_subdirs in the inode. Using erofs_subdirs as a temp place for dentrys under the dir, and then sort it before replace to i_subdirs Signed-off-by: Li Guifu --- include/erofs/internal.h | 5 +++

[PATCH v1 1/2] erofs-utils: add list_replace from linux kernel for dirs sorted later

2021-05-05 Thread Li Guifu via Linux-erofs
A temp list head will be replaced to inode i_subdirs. Signed-off-by: Li Guifu --- include/erofs/list.h | 16 1 file changed, 16 insertions(+) diff --git a/include/erofs/list.h b/include/erofs/list.h index 3572726..7238418 100644 --- a/include/erofs/list.h +++

Re: [PATCH v4 5/5] erofs-utils: manpage: add manual for erofsfuse

2021-04-30 Thread Li GuiFu via Linux-erofs
On 2021/4/30 12:03, Gao Xiang wrote: > This patch adds missing erofsfuse manpage. > > Signed-off-by: Gao Xiang > --- > man/erofsfuse.1 | 44 > 1 file changed, 44 insertions(+) > create mode 100644 man/erofsfuse.1 > It looks good Reviewed-by: Li

Re: [PATCH v4 4/5] erofs-utils: zero out garbage trailing data for non-0padding cases

2021-04-30 Thread Li GuiFu via Linux-erofs
On 2021/4/30 12:03, Gao Xiang wrote: > When "-E legacy-compress" is used, lz4 0padding feature will be > disabled by default in order to support old kernels (< Linux v5.3). > > In that case, the current mkfs leaves previous garbage data after > valid compressed data if the length becomes

Re: [PATCH v4 2/5] erofs-utils: warn out experimental big pcluster

2021-04-30 Thread Li GuiFu via Linux-erofs
On 2021/4/30 12:03, Gao Xiang wrote: > It's still an experimental feature for now. Also set the default > logging level to 2 in order to print warn messages. > > Signed-off-by: Gao Xiang It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH v4 3/5] erofs-utils: manpage: add missing -C option for big pcluster

2021-04-30 Thread Li GuiFu via Linux-erofs
On 2021/4/30 12:03, Gao Xiang wrote: > Update the manpage as well. > > Signed-off-by: Gao Xiang It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH 1/3] erofs-utils: sync up with in-kernel erofs_fs.h

2021-04-30 Thread Li GuiFu via Linux-erofs
On 2021/4/27 10:37, Gao Xiang wrote: > This matches the latest in-kernel version. > > Signed-off-by: Gao Xiang > --- > include/erofs_fs.h | 17 +++-- > 1 file changed, 11 insertions(+), 6 deletions(-) > It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH v2] erofs-utils: use qsort() to sort dir->i_subdirs

2021-04-11 Thread Li GuiFu via Linux-erofs
On 2021/4/11 22:41, Gao Xiang wrote: > Guifu, > > On Sun, Apr 11, 2021 at 10:10:09PM +0800, Li GuiFu via Linux-erofs wrote: >> Hu Weiwen >> It really do a high sort performance increase, >> I have a idea that keeping the erofs_prepare_dir_file() functio

Re: [PATCH v2] erofs-utils: use qsort() to sort dir->i_subdirs

2021-04-11 Thread Li GuiFu via Linux-erofs
Hu Weiwen It really do a high sort performance increase, I have a idea that keeping the erofs_prepare_dir_file() function paramter stable, Using a independent function to do dirs sort. On 2021/4/5 17:38, Hu Weiwen wrote: > Original implementation use insertion sort, and its time complexity is

Re: [PATCH v2] erofs-utils: add cmd argument to override uid/gid

2021-04-11 Thread Li GuiFu via Linux-erofs
On 2021/4/1 20:01, Gao Xiang wrote: > On Thu, Apr 01, 2021 at 07:36:10PM +0800, Hu Weiwen wrote: >> Also added '--all-root' option to set uid and gid to root conveniently. >> >> This function can be useful if we want to pack some data owned by user with >> large uid, but we want to use compact

Re: [PATCH v2] erofs-utils: fuse: fix random readlink error

2021-02-28 Thread Li GuiFu via Linux-erofs
On 2021/2/10 3:38, Gao Xiang via Linux-erofs wrote: > Hi Weiwen, > > On Sat, Jan 30, 2021 at 02:07:47AM +0800, Hu Weiwen wrote: >> readlink should fill a **null-terminated** string in the buffer. >> >> To achieve this: >> 1) memset(0) for unmapped extents; >> 2) make erofsfuse_read() properly

Re: [PATCH v2 2/2] erofs-utils: more sanity check for buffer allocation optimization

2021-02-28 Thread Li GuiFu via Linux-erofs
On 2021/2/14 23:35, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > In case that new buffer allocation optimization logic is > potentially broken. > > Signed-off-by: Gao Xiang > --- It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH v3] erofs-utils: fix battach on full buffer blocks

2021-02-22 Thread Li GuiFu via Linux-erofs
On 2021/2/15 0:00, Gao Xiang via Linux-erofs wrote: > From: Hu Weiwen > > When the subsequent erofs_battach() is called on an buffer block of > which (bb->buffers.off % EROFS_BLKSIZ == 0), `tail_blkaddr' won't be > updated correctly. This bug can be reproduced by: > > mkdir bug-repo > head

Re: [PATCH v7 3/3] erofs-utils: optimize buffer allocation logic

2021-02-06 Thread Li GuiFu via Linux-erofs
On 2021/1/23 1:11, Gao Xiang via Linux-erofs wrote: > From: Hu Weiwen > > When using EROFS to pack our dataset which consists of millions of > files, mkfs.erofs is very slow compared with mksquashfs. > > The bottleneck is `erofs_balloc' and `erofs_mapbh' function, which > iterate over all

Re: [PATCH v7 2/3] erofs-utils: introduce erofs_bfind_for_attach()

2021-02-06 Thread Li GuiFu via Linux-erofs
On 2021/1/23 1:11, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Seperate erofs_balloc() to make the logic more clearer. > > Cc: Hu Weiwen > Signed-off-by: Gao Xiang > --- > lib/cache.c | 81 + > 1 file changed, 50

Re: [PATCH v7 1/3] erofs-utils: get rid of `end' argument from erofs_mapbh()

2021-02-06 Thread Li GuiFu via Linux-erofs
On 2021/1/23 1:11, Gao Xiang via Linux-erofs wrote: > From: Hu Weiwen > > `end` arguement is completely broken now. Also, it could > be reintroduced later if needed. > > Signed-off-by: Hu Weiwen > Signed-off-by: Gao Xiang > --- > include/erofs/cache.h | 2 +- > lib/cache.c | 6

Re: [PATCH v3] erofs-utils: fix memory leak when erofs_fill_inode() fails

2021-02-06 Thread Li GuiFu via Linux-erofs
On 2021/1/22 0:21, Hu Weiwen wrote: > Signed-off-by: Hu Weiwen > --- > lib/inode.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > It looks good Reviewed-by: Li Guifu

Re: [PATCH] erofs-utils: fix BUILD_BUG_ON

2021-02-06 Thread Li GuiFu via Linux-erofs
On 2021/1/31 17:47, Hu Weiwen wrote: > Signed-off-by: Hu Weiwen > --- > include/erofs/defs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > It looks good Reviewed-by: Li Guifu

Re: [PATCH v2] AOSP: erofs-utils: fix sub-directory prefix for canned fs_config

2020-12-31 Thread Li GuiFu via Linux-erofs
On 2020/12/28 18:51, Gao Xiang wrote: > From: Gao Xiang > > "failed to find [%s] in canned fs_config" was observed by using > "--fs-config-file" option as reported by Yue Hu [1]. > > The root cause was that the mountpoint prefix to subdirectories is > also needed if "--mount-point" presents.

Re: [PATCH v2] AOSP: erofs-utils: fix sub-directory prefix for canned fs_config

2020-12-31 Thread Li GuiFu via Linux-erofs
Thank for your works, Yue Hu, Jianan, Gao Xiang On 2020/12/28 18:51, Gao Xiang wrote: > From: Gao Xiang > > "failed to find [%s] in canned fs_config" was observed by using > "--fs-config-file" option as reported by Yue Hu [1]. > > The root cause was that the mountpoint prefix to subdirectories

Re: [PATCH] erofs-utils: fuse: disable backtrace if unsupported

2020-12-17 Thread Li GuiFu via Linux-erofs
On 2020/12/17 17:06, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Let's enable backtrace conditionally since it's a GNU extension. > > Fixes: 5e35b75ad499 ("erofs-utils: introduce fuse implementation") > Signed-off-by: Gao Xiang > --- > configure.ac | 3 ++- > fuse/main.c | 8

Re: [PATCH] erofs-utils: fix multiple definition of `sbi'

2020-12-12 Thread Li GuiFu via Linux-erofs
On 2020/12/9 7:24, Gao Xiang wrote: > On Tue, Dec 08, 2020 at 06:16:57PM +0200, nl6720 wrote: >> On Tuesday, 8 December 2020 12:57:41 EET Gao Xiang wrote: >>> As nl6720 reported [1], lib/inode.o (mkfs) and lib/super.o (erofsfuse) >>> could be compiled together by some options. Fix it now. >>>

Re: [PATCH] erofs-utils: fuse: fix linking when using --with-selinux

2020-12-12 Thread Li GuiFu via Linux-erofs
On 2020/12/11 10:29, David Michael wrote: > The libselinux functions selabel_open and selabel_close are called > by lib/config.c, so include libselinux in CFLAGS and LIBS to fix > building erofsfuse. > > Signed-off-by: David Michael > --- > > Hi, > > Trying to build both mkfs.erofs with

Re: [PATCH] erofs-utils: mkfs: fix uuid.h location

2020-12-12 Thread Li GuiFu via Linux-erofs
On 2020/12/9 8:49, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > As Karel reported [1], "The subdirectory in > #include > > is unnecessary (or wrong), if you use > PKG_CHECK_MODULES([libuuid], [uuid]) > > than it returns the subdirectory as -I, see > > $ pkg-config

Re: [PATCH v2] erofs-utils: update i_nlink stat for directories

2020-12-05 Thread Li GuiFu via Linux-erofs
On 2020/12/5 17:16, Gao Xiang wrote: > From: Gao Xiang > > Previously, nlink of directories was treated as 1 for simplicity. > > Since st_nlink for dirs is actually not well defined, nlink=1 seems > to pacify `find' (even without -noleaf option) and other utilities. > AFAICT, isofs, romfs

Re: [PATCH] erofs-utils: update i_nlink stat for directories

2020-12-05 Thread Li GuiFu via Linux-erofs
On 2020/12/5 16:43, Gao Xiang wrote: > On Sat, Dec 05, 2020 at 04:38:37PM +0800, Gao Xiang wrote: >> On Sat, Dec 05, 2020 at 04:32:44PM +0800, Li GuiFu via Linux-erofs wrote: >> >> ... >> >>> >>>> @@ -957,6 +974,10 @@ struct erofs_inode *ero

Re: [PATCH v4 3/3] erofs-utils: fuse: add compressed file support

2020-12-05 Thread Li GuiFu via Linux-erofs
On 2020/11/27 20:24, Gao Xiang via Linux-erofs wrote: > From: Huang Jianan > > This patch adds a simple approach (~ 700 LOC) to EROFS fixed-sized > output decompression without inplace I/O or decompression inplace > so it's easy to be ported everywhere with less constraint. > > However, the

Re: [PATCH v3 2/3] erofs-utils: fuse: support symlink & special inode

2020-12-05 Thread Li GuiFu via Linux-erofs
On 2020/11/27 19:46, Gao Xiang via Linux-erofs wrote: > From: Huang Jianan > > This patch adds symlink and special inode (e.g. block dev, char, > socket, pipe inode) support. > > Signed-off-by: Huang Jianan > Signed-off-by: Guo Weichao > Signed-off-by: Gao Xiang > --- > fuse/main.c | 10

Re: [PATCH] erofs-utils: update i_nlink stat for directories

2020-12-05 Thread Li GuiFu via Linux-erofs
On 2020/12/5 13:57, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Previously, nlink of directories is treated as 1 for simplicity. > > Since st_nlink for dirs is actualy not well defined, nlink=1 seems > to pacify `find' (even without -noleaf option) and other utilities. > AFAICT,

Re: [PATCH v2 2/2] erofs-utils: fix cross-device submounts

2020-12-04 Thread Li GuiFu via Linux-erofs
On 2020/12/5 1:56, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Use device ID and inode number to identify hardlinks > rather than inode number only. > > Fixes: a17497f0844a ("erofs-utils: introduce inode operations") > Signed-off-by: Gao Xiang > --- > changes since v1: > - fix

Re: [PATCH 1/2] erofs-utils: don't create hardlinked directories

2020-12-04 Thread Li GuiFu via Linux-erofs
On 2020/12/5 1:20, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > From: Gao Xiang > > Fix an issue which behaves the same as the following > mkisofs BZ due to bindmount: > https://bugzilla.redhat.com/show_bug.cgi?id=1749860 > > Fixes: a17497f0844a ("erofs-utils: introduce inode

Re: [PATCH] erofs-utils: update .gitignore

2020-12-04 Thread Li GuiFu via Linux-erofs
On 2020/12/2 17:53, Gao Xiang via Linux-erofs wrote: > Add more extensions to .gitignore. > > Signed-off-by: Gao Xiang > --- > .gitignore | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH] erofs-utils: xattr: fix OOB access due to alignment

2020-12-04 Thread Li GuiFu via Linux-erofs
On 2020/11/27 22:33, Gao Xiang wrote: > From: Gao Xiang > > erofs_buf_write_bhops can only be safely used for block-aligned > buffers, otherwise, it could write random out-of-bound data due > to buffer alignment. Such random data is meaningless but it does > harm to reproducable builds. > >

[PATCH v2] erofs-utils: stop build tree if file fails to open

2020-11-22 Thread Li Guifu via Linux-erofs
stop and exit immediately if it fails to open a file, e.g mkfs.erofs doesn't run under the root user (e.g. run without sudo.) Signed-off-by: Li Guifu --- lib/inode.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/inode.c b/lib/inode.c index fee5c96..eb2e0f2

Re: [PATCH 1/3] erofs-utils: introduce fuse implementation

2020-11-21 Thread Li GuiFu via Linux-erofs
Gao Xiang It run good, some codes format need to be adjusted Please re-send to make more readable On 2020/11/21 1:41, Gao Xiang via Linux-erofs wrote: > From: Li Guifu > > Let's add a simple erofsfuse approach, and benefits are: > > - images can be supported on various platforms; > - new

[PATCH] erofs-utils: stop mkfs when access permission denied

2020-11-21 Thread Li Guifu via Linux-erofs
It would not has the permission to access one file when mkfs.erofs was not run in the root mode, eg run without sudo, So stop and exit immediately Signed-off-by: Li Guifu --- lib/inode.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/inode.c b/lib/inode.c index

Re: [PATCH v2 1/2] erofs-utils: drop known issue in README

2020-11-20 Thread Li GuiFu via Linux-erofs
On 2020/11/21 10:26, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Since lz4-1.9.3 has been released, > https://github.com/lz4/lz4/releases/tag/v1.9.3 > > Move this lz4hc issue (lz4 <= 1.9.2) to "Comments" instead. > > Signed-off-by: Gao Xiang > --- > v2: fix "lz4 <= 1.8.2" to

Re: [PATCH 1/2] erofs-utils: drop known issue in README

2020-11-20 Thread Li GuiFu via Linux-erofs
On 2020/11/16 20:55, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Since lz4-1.9.3 has been released, > https://github.com/lz4/lz4/releases/tag/v1.9.3 > > Move this lz4hc issue (lz4 <= 1.8.2) to "Comments" instead. > > Signed-off-by: Gao Xiang It looks good Reviewed-by: Li Guifu

Re: [PATCH] erofs-utils: fix the project prefix to "erofs-utils"

2020-11-01 Thread Li GuiFu via Linux-erofs
On 2020/10/24 18:05, Gao Xiang via Linux-erofs wrote: > Some of them were "erofs_utils" in source headers by mistake. > > Signed-off-by: Gao Xiang > --- It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH 4/4] mkfs: add option to use a pre-defined UUID

2020-11-01 Thread Li GuiFu via Linux-erofs
On 2020/10/30 20:30, Gao Xiang wrote: > Usage: mkfs.erofs -U > > The filesystem UUID can now be optionally specified during filesystem > creation. The default behavior is still to generate a random UUID. > > This is useful for reproducible builds. > > Signed-off-by: Gao Xiang It looks

Re: [PATCH 3/4] mkfs: introduce erofs_mkfs_default_options()

2020-11-01 Thread Li GuiFu via Linux-erofs
On 2020/10/30 20:30, Gao Xiang wrote: > Gather all default settings, and generate UUID before > parse_options_cfg(), therefore the UUID can be overridden > later by command line for reproducible images. > > Signed-off-by: Gao Xiang > --- It looks good Reviewed-by: Li Guifu Thanks,

Re: [PATCH 2/4] erofs-utils: support $SOURCE_DATE_EPOCH

2020-11-01 Thread Li GuiFu via Linux-erofs
On 2020/10/30 20:30, Gao Xiang wrote: > Currently, we use -T to set a given UNIX timestamp for all > files, yet reproducible builds [1] requires what is called > "timestamp clamping", IOW, a timestamp must be used no later > than the value of this variable. > > Let's support $SOURCE_DATE_EPOCH

Re: [PATCH 1/4] erofs-utils: fix build error without lz4 library

2020-11-01 Thread Li GuiFu via Linux-erofs
On 2020/10/30 20:30, Gao Xiang wrote: > This fixes a recent build error if lz4 library doesn't install, > > /bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Werror -I../include -g > -O2 -o mkfs.erofs mkfs_erofs-main.o -luuid ../lib/liberofs.la -llz4 > libtool: link: gcc -Wall -Werror

Re: [PATCH] erofs-utils: README: update known-issue status of lz4hc

2020-10-12 Thread Li GuiFu via Linux-erofs
On 2020/10/12 15:34, Gao Xiang wrote: > Known issue of LZ4_compress_HC_destSize() mentioned in README > was targeted by lz4 upstream days ago. > > Update README so all users can be noticed. > > Signed-off-by: Gao Xiang It looks good thanks Reviewed-by: Li Guifu

Re: [PATCH] AOSP: erofs-utils: update usage due to fs_config

2020-10-12 Thread Li GuiFu via Linux-erofs
On 2020/10/12 8:38, Gao Xiang wrote: > After fs_config support is added, usage() should > be updated together as well. > > Fixes: 8a9e8046f170 ("AOSP: erofs-utils: add fs_config support") > Cc: Li Guifu > Signed-off-by: Gao Xiang Reviewed-by: Li Guifu

Re: [PATCH v2] AOSP: erofs-utils: add fs_config support

2020-10-11 Thread Li GuiFu via Linux-erofs
在 2020/10/10 0:33, Li GuiFu 写道: > > > 在 2020/9/29 13:13, Gao Xiang 写道: >> So that mkfs can directly generate images with fs_config. >> All code for AOSP is wraped up with WITH_ANDROID macro. >> >> Signed-off-by: Gao Xiang >> --- >> changes since v1: >> - fix compile issues on Android /

[PATCH v11] erofs-utils: introduce segment compression

2020-07-05 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu --- Changes from

[PATCH v10] erofs-utils: introduce segment compression

2020-06-30 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu ---

[PATCH v8] erofs-utils: introduce segment compression

2020-06-21 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu ---

[PATCH v6] erofs-utils: introduce segment limits compression

2020-06-21 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu --- Changes since

[PATCH v5] erofs-utils: introduce segment compression

2020-06-19 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu ---

Re: [PATCH] erofs-utils: pass down inode for erofs_prepare_xattr_ibody

2020-06-19 Thread Li GuiFu via Linux-erofs
On 2020/6/17 15:27, Gao Xiang via Linux-erofs wrote: > From: Gao Xiang > > Instead of several independent arguments for convenience. > No logic changes. > > Signed-off-by: Gao Xiang > --- > > > It looks good > > Reviewed-by: Li Guifu >

[PATCH v4] erofs-utils: introduce segment compression

2020-06-18 Thread Li Guifu via Linux-erofs
Support segment compression which seperates files in several logic units (segments) and each segment is compressed independently. Advantages: - more friendly for data differencing; - it can also be used for parallel compression in the same file later. Signed-off-by: Li Guifu --- Changes since

[PATCH v3] erofs-utils: introduce segment size to limit the max input stream

2020-06-10 Thread Li Guifu via Linux-erofs
Limit the max input stream size by adding segment compression (e.g. 4M segment size), it will benefits: - more friendly to block diff (and more details about this); - it can also be used for parallel compression in the same file. Signed-off-by: Li Guifu --- include/erofs/config.h | 1 +

[PATCH v2] erofs-utils: add a compress limit to source input stream

2020-06-09 Thread Li Guifu via Linux-erofs
It cause a differential amplification when create binary diff image for upgrade. Give a limits to cut compress, so the amplification will be limit in the given size. Signed-off-by: Li Guifu --- changes since v1: - fix variable "readcount" use the min data with comprlimits

[PATCH] erofs-utils: add a compress limit to source input stream

2020-06-09 Thread Li Guifu via Linux-erofs
It cause a differential amplification when create binary diff image for upgrade. Give a limits to cut compress, so the amplification will be limit in the given size. Signed-off-by: Li Guifu --- include/erofs/internal.h | 1 + lib/compress.c | 15 --- 2 files changed, 13

Re: [PATCH v4] erofs-utils: support selinux file contexts

2020-06-08 Thread Li GuiFu via Linux-erofs
On 2020/6/8 21:08, hsiang...@aol.com wrote: > From: Gao Xiang > > Add --file-contexts flag that allows passing a selinux > file_context file to setup file selabels. > > Reviewed-and-tested-by: Li Guifu > Signed-off-by: Gao Xiang > --- > v4: freecon() should be used instead of free().

Re: [PATCH v2] erofs-utils: support selinux file contexts

2020-06-07 Thread Li GuiFu via Linux-erofs
It cacuses one build error in my Ubuntu 18.04.1 LTS and it seems selinux static lib link cause it libtool: link: gcc -Wall -Werror -I../include -g -O2 -static -o mkfs.erofs mkfs_erofs-main.o ../lib/.libs/liberofs.a -L/home/liguifu/codes/lz4 -luuid -lselinux -llz4

Re: [PATCH] erofs-utils: avoid using old compatibility type uint

2020-03-26 Thread Li GuiFu via Linux-erofs
On 2020/3/24 16:19, Gao Xiang wrote: > This should fix the following buildroot autobuild issues > with some configration on ARM platform [1]: > > compress.c: In function 'vle_compress_one': > compress.c:209:10: error: unknown type name 'uint' > const uint qh_aligned = round_down(ctx->head,

Re: [PATCH] erofs-utils: avoid _LARGEFILE64_SOURCE and _GNU_SOURCE redefinition

2020-03-26 Thread Li GuiFu via Linux-erofs
On 2020/3/14 18:52, Gao Xiang wrote: > From: Gao Xiang > > This patch can be used to resolve the following build errors: > > compress.c:10: error: "_LARGEFILE64_SOURCE" redefined [-Werror] > #define _LARGEFILE64_SOURCE > > : note: this is the location of the previous definition > >

Re: [PATCH] erofs-utils: avoid PAGE_SIZE redefinition

2020-03-26 Thread Li GuiFu via Linux-erofs
On 2020/3/25 16:29, Gao Xiang wrote: > Buildroot autobuild reported a PAGE_SIZE redefinition with some > configrations on i586 toolchain [1] (I didn't notice such report > from erofs-utils travis CI or distribution builds before.) > > In file included from config.c:11: >

Re: [PATCH v7] erofs-utils: introduce exclude dirs and files

2020-02-20 Thread Li GuiFu via Linux-erofs
On 2020/2/19 10:20, Gao Xiang wrote: > Hi Guifu, > > On Tue, Feb 18, 2020 at 10:30:47PM +0800, Li Guifu wrote: >> From: Li GuiFu >> >> Add excluded file feature "--exclude-path=" and '--exclude-regex=', >> which can be used to build EROFS image without some user specific >> files or dirs. Note

[PATCH v7] erofs-utils: introduce exclude dirs and files

2020-02-18 Thread Li Guifu via Linux-erofs
From: Li GuiFu Add excluded file feature "--exclude-path=" and '--exclude-regex=', which can be used to build EROFS image without some user specific files or dirs. Note that you may give multiple '--exclude-path' or '--exclude-regex' options. Signed-off-by: Gao Xiang Signed-off-by: Li Guifu

Re: [PATCH v6] erofs-utils: introduce exclude dirs and files

2020-02-18 Thread Li GuiFu via Linux-erofs
Good idea On 2020/2/18 10:32, Gao Xiang wrote: > On Mon, Feb 17, 2020 at 09:16:53PM +0800, Li Guifu wrote: >> From: Li GuiFu >> >> Add excluded file feature "--exclude-path=" and '--exclude-regex=', >> which can be used to build EROFS image without some user specific >> files or dirs. Note that

[PATCH v6] erofs-utils: introduce exclude dirs and files

2020-02-17 Thread Li Guifu via Linux-erofs
From: Li GuiFu Add excluded file feature "--exclude-path=" and '--exclude-regex=', which can be used to build EROFS image without some user specific files or dirs. Note that you may give multiple '--exclude-path' or '--exclude-regex' options. Signed-off-by: Gao Xiang Signed-off-by: Li Guifu

[PATCH v5] erofs-utils: introduce exclude dirs and files

2020-02-16 Thread Li Guifu via Linux-erofs
From: Li GuiFu Add excluded file feature "--exclude-path=" and '--exlude-regex=', which can be used to build EROFS image without some user specific files or dirs. Note that you may give multiple '--exclude-path' or '--exclude-regex' options. Signed-off-by: Li Guifu Signed-off-by: Gao Xiang

[PATCH v4] erofs-utils: introduce exclude dirs and files

2020-02-16 Thread Li Guifu via Linux-erofs
From: Li GuiFu Add excluded file feature "--exclude-path=" and '--exlude-regex=', which can be used to build EROFS image without some user specific files or dirs. Note that you may give multiple '--exclude-path' or '--exclude-regex' options. Signed-off-by: Li Guifu Signed-off-by: Gao Xiang

Re: Re: [PATCH v2] erofs-utils: introduce exclude dirs and files

2020-02-15 Thread Li GuiFu via Linux-erofs
Hi My e-mail of foxmail was broken in the mainline, use aliyun instead. On 2020/2/5 1:02, Gao Xiang via Linux-erofs wrote: > Hi Guifu, > > I cleanup the whole patch and get rid of all dedupe check in order > to make it as simple as possible since I think not too many exclude > files in general.