diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-25 01:08:42 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-25 01:08:42 +0000 |
commit | b9ada7fbfc06c1e52a013d3a855f2b0feec5284e (patch) | |
tree | 165e0a09ae315622b4cf64cf5c6d4417debb7cd0 | |
parent | e17bfd50f539649f5f9838e8fb3b82d1efd0ae7f (diff) | |
parent | 45ee690acb651d56e11f254a5632618ab2bc0692 (diff) | |
download | erofs-utils-android14-qpr2-s1-release.tar.gz |
Snap for 10998418 from 45ee690acb651d56e11f254a5632618ab2bc0692 to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: I6ad5f71612b713f9d2870fc86ba8de7952087a1a
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | METADATA | 6 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | include/erofs/internal.h | 5 | ||||
-rw-r--r-- | lib/inode.c | 34 | ||||
-rw-r--r-- | lib/tar.c | 2 |
7 files changed, 37 insertions, 27 deletions
@@ -1,3 +1,12 @@ +erofs-utils 1.7.1 + + * A quick maintenance release includes the following fixes: + - fix a build issue of cross-compilation with autoconf (Sandeep Dhavale); + - fix an invalid error code in lib/tar.c (Erik Sjölund); + - fix corrupted directories with hardlinks. + + -- Gao Xiang <xiang@kernel.org> Fri, 20 Oct 2023 00:00:00 +0800 + erofs-utils 1.7 * This release includes the following updates: @@ -9,11 +9,11 @@ third_party { type: GIT value: "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git" } - version: "v1.7" + version: "v1.7.1" license_type: RESTRICTED last_upgrade_date { year: 2023 - month: 9 - day: 25 + month: 10 + day: 23 } } @@ -1,2 +1,2 @@ -1.7 -2023-09-21 +1.7.1 +2023-10-20 diff --git a/configure.ac b/configure.ac index 13ee616..a546310 100644 --- a/configure.ac +++ b/configure.ac @@ -284,8 +284,8 @@ AS_IF([test "x$MAX_BLOCK_SIZE" = "x"], [ return 0; ]])], [erofs_cv_max_block_size=`cat conftest.out`], - [], - [])) + [erofs_cv_max_block_size=4096], + [erofs_cv_max_block_size=4096])) ], [erofs_cv_max_block_size=$MAX_BLOCK_SIZE]) # Configure debug mode diff --git a/include/erofs/internal.h b/include/erofs/internal.h index d859905..c1ff582 100644 --- a/include/erofs/internal.h +++ b/include/erofs/internal.h @@ -159,8 +159,9 @@ struct erofs_inode { union { /* (erofsfuse) runtime flags */ unsigned int flags; - /* (mkfs.erofs) queued sub-directories blocking dump */ - u32 subdirs_queued; + + /* (mkfs.erofs) next pointer for directory dumping */ + struct erofs_inode *next_dirwrite; }; unsigned int i_count; struct erofs_sb_info *sbi; diff --git a/lib/inode.c b/lib/inode.c index fb062a1..8409ccd 100644 --- a/lib/inode.c +++ b/lib/inode.c @@ -1210,7 +1210,6 @@ fail: inode->i_parent = dir; erofs_igrab(inode); list_add_tail(&inode->i_subdirs, dirs); - ++dir->subdirs_queued; } ftype = erofs_mode_to_ftype(inode->i_mode); i_nlink += (ftype == EROFS_FT_DIR); @@ -1235,17 +1234,10 @@ err_closedir: return ret; } -static void erofs_mkfs_dump_directory(struct erofs_inode *dir) -{ - erofs_write_dir_file(dir); - erofs_write_tail_end(dir); - dir->bh->op = &erofs_write_inode_bhops; -} - struct erofs_inode *erofs_mkfs_build_tree_from_path(const char *path) { LIST_HEAD(dirs); - struct erofs_inode *inode, *root, *parent; + struct erofs_inode *inode, *root, *dumpdir; root = erofs_iget_from_path(path, true); if (IS_ERR(root)) @@ -1253,9 +1245,9 @@ struct erofs_inode *erofs_mkfs_build_tree_from_path(const char *path) (void)erofs_igrab(root); root->i_parent = root; /* rootdir mark */ - root->subdirs_queued = 1; list_add(&root->i_subdirs, &dirs); + dumpdir = NULL; do { int err; char *trimmed; @@ -1275,15 +1267,23 @@ struct erofs_inode *erofs_mkfs_build_tree_from_path(const char *path) root = ERR_PTR(err); break; } - parent = inode->i_parent; - DBG_BUGON(!parent->subdirs_queued); - if (S_ISDIR(inode->i_mode) && !inode->subdirs_queued) - erofs_mkfs_dump_directory(inode); - if (!--parent->subdirs_queued) - erofs_mkfs_dump_directory(parent); - erofs_iput(inode); + if (S_ISDIR(inode->i_mode)) { + inode->next_dirwrite = dumpdir; + dumpdir = inode; + } else { + erofs_iput(inode); + } } while (!list_empty(&dirs)); + + while (dumpdir) { + inode = dumpdir; + erofs_write_dir_file(inode); + erofs_write_tail_end(inode); + inode->bh->op = &erofs_write_inode_bhops; + dumpdir = inode->next_dirwrite; + erofs_iput(inode); + } return root; } @@ -241,7 +241,7 @@ static long long tarerofs_otoi(const char *ptr, int len) val = strtol(ptr, &endp, 8); if ((!val && endp == inp) | (*endp && *endp != ' ')) - errno = -EINVAL; + errno = EINVAL; return val; } |