Age | Commit message (Collapse) | Author |
|
Currently mkfs.erofs picks up whatever the system time happened to be
when the input file structure was created. Since there's no (easy) way for
userspace to control ctime, there's no way to control the per-file ctime
that mkfs.erofs uses.
In preparation for switching to mtime, rename the "ctime" members of the
inode structure.
Link: https://lore.kernel.org/r/20220311041724.3107622-1-dvander@google.com
Signed-off-by: David Anderson <dvander@google.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: Iff6f5f8a1e5f729f6a5949719b1891a91fd34c41
|
|
* Added useful error messages.
* Most errors start with lower-case, let's make all non-summarizing
error messages lower-case for better consistency.
* Sorted default values in fsck's main function to match the struct.
Link: https://lore.kernel.org/r/20220129182204.26-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220129194532.26-1-igoreisberg@gmail.com
Signed-off-by: Igor Ostapenko <igoreisberg@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: Ic905051925a8e63b1ad09b8a3c6d8d405c8ac3b1
|
|
* Added tar-like default behaviors for --[no-]preserve options:
normal user - uses user's owner ID + umask on perms by default;
root user - preserve original owner IDs + perms by default;
and add appropriate error message when used without --extract=X.
* "--[no-]same-owner" and "--[no-]same-permissions" were renamed
to "--[no-]preserve-owner" and "--[no-]preserve-perms" to
better represent what these options do, the word "same" is
ambiguous and tells nothing to the user ("same" to what?).
* Added "--[no-]preserve" as shortcuts for both options in one.
* Fixed option descriptions as they had typos and were too ambiguous
("extract information" to where? separate file?).
* Added --force option to allow extracting directly to root path.
Fixes: 412c8f908132 ("erofs-utils: fsck: add --extract=X support to extract to path X")
Link: https://lore.kernel.org/r/20220128040511.27-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128044613.26-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128045018.26-1-igoreisberg@gmail.com
Link: https://lore.kernel.org/r/20220128160036.101-1-igoreisberg@gmail.com
Signed-off-by: Igor Ostapenko <igoreisberg@gmail.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: I80c63a2b8eac71fe5ff664a5edc18856960d39a6
|
|
Just cleanup.
Link: https://lore.kernel.org/r/20220129074540.5501-1-xiang@kernel.org
Signed-off-by: Gao Xiang <xiang@kernel.org>
Change-Id: Iaa4d9b5a42fee1c2f4957aa2a3391a499c994911
|
|
Otherwise, when --extract is specified, it will report:
<W> erofs: erofsfsck_set_attributes() Line[189] failed to set times: (null)
<W> erofs: erofsfsck_set_attributes() Line[197] failed to set permissions: (null)
...
Link: https://lore.kernel.org/r/20220126033726.15865-2-hsiangkao@linux.alibaba.com
Fixes: 412c8f908132 ("erofs-utils: fsck: add --extract=X support to extract to path X")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: I405d8fea9f7436a6a2572e021d986fcef7ef42eb
|
|
Otherwise, we could face potential security issues.
Link: https://lore.kernel.org/r/20220126033726.15865-1-hsiangkao@linux.alibaba.com
Fixes: 412c8f908132 ("erofs-utils: fsck: add --extract=X support to extract to path X")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: Ia0e1c175fb076857bdafa8355b2293d778a8eb27
|
|
Add support to extract directories, regular files and symlinks.
Allocation for extract_path is done only once, then the buffer is
reused.
Raw and compressed data chunks are handled with a unified function
to avoid code duplication, compressed data is verified linearly (with
EROFS_GET_BLOCKS_FIEMAP) instead of lookback, as it's problematic to
extract data when looking backwards.
Link: https://lore.kernel.org/r/20220120013203.25990-1-xiang@kernel.org
Signed-off-by: Igor Ostapenko <igoreisberg@gmail.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>
Change-Id: Iea39e71a3bf63a34e20b7f7445510705f5ffa00e
|
|
Otherwise musl C library builds fail with missing S_IFMT/S_IFDIR
definitions.
Link: https://lore.kernel.org/r/20211206191403.1435229-1-alex@linutronix.de
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: I4525fa13ab61ba9575976e00b0bb7189cf949293
|
|
No need to open code after erofs_iterate_dir() is finalized in
liberofs.
However, there are still some TODOs for fsck:
- Avoid too deep recursive traversal, sceptically forming a loop;
- Check link counts at runtime to keep consistency;
- Check if any ftype / i_mode mismatches.
Link: https://lore.kernel.org/r/20211216012436.10111-2-xiang@kernel.org
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Change-Id: I279cdc579b8320075bd867531b6bb87e08f01744
|
|
Keep in sync with the latest kernel
commit 8f89926290c4 ("erofs: get compression algorithms directly on mapping")
And it also fixes fsck MicroLZMA support, btw.
Link: https://lore.kernel.org/r/20211116094939.32246-7-hsiangkao@linux.alibaba.com
Reviewed-by: Yue Hu <huyue2@yulong.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
|
|
Add preliminary multiple device support for fsck feature.
Link: https://lore.kernel.org/r/20211116094939.32246-6-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
|
|
In order for erofsfuse to support multiple devices.
Link: https://lore.kernel.org/r/20211116094939.32246-2-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
|
|
Keep in sync with fsck.cramfs naming.
Link: https://lore.kernel.org/r/20211110065008.182193-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
|
|
Otherwise, build will fail when enabling liblzma support.
Link: https://lore.kernel.org/r/20211109111812.63959-1-hsiangkao@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
|
|
I made a fsck.erofs tool to check erofs filesystem image integrity
and calculate filesystem compression ratio.
Here are options to support now.
fsck.erofs [options] IMAGE
-V print the version number of fsck.erofs and exit.
-d# set output message level to # (maximum 9)
-p print total compression ratio of all files
-c check if all compressed files are well decompressed
Link: https://lore.kernel.org/r/20211029171312.2189648-1-daeho43@gmail.com
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>
|