erofs-utils: dump: fix --path after converting erofs_get_pathname()
PATCH 1/2 erofs-utils: dump: fix --path after converting erofs_get_pathname()
Otherwise it reports:
$ dump.erofs --path=/ foo.erofs.img <E> erofs: file path not found @ nid 36
Fixes e6082718f743 ("erofs-utils: lib: add API to get pathname of EROFS inode")
Signed-off-by Gao Xiang <[email protected]>
--- dump/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dump/main.c +1 -1
@@ -345,7 +345,7 @@ static void erofsdump_show_fileinfo(bool show_extent)return ; } - err =erofs_get_pathname (dumpcfg.nid, path,sizeof (path)); + err =erofs_get_pathname (inode.nid, path,sizeof (path));if (err <0 ) {erofs_err ("file path not found @ nid %llu" , inode.nid |0ULL );return ;
Signature · 1 line
2.24.4
PATCH 2/2 erofs-utils: lib: fix --blobdev without -Eforce-chunk-indexes
blockmap is used by default, chunk indexes should be switched instead if --blobdev is specified.
Fixes 016bd812be1e ("erofs-utils: mkfs: enable block map chunk format")
Signed-off-by Gao Xiang <[email protected]>
--- lib/blobchunk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/blobchunk.c +3 -1
@@ -113,7 +113,7 @@ int erofs_blob_write_chunk_indexes(struct erofs_inode *inode,if (multidev) { idx.device_id =1 ; - inode->u.chunkformat |=EROFS_CHUNK_FORMAT_INDEXES ; +DBG_BUGON (inode->u.chunkformat &EROFS_CHUNK_FORMAT_INDEXES ); }else { base_blkaddr = remapped_base; }
@@ -171,6 +171,8 @@ int erofs_blob_write_chunked_file(struct erofs_inode *inode)int fd, ret; inode->u.chunkformat |= inode->u.chunkbits -LOG_BLOCK_SIZE ; +if (multidev) + inode->u.chunkformat |=EROFS_CHUNK_FORMAT_INDEXES ;if (inode->u.chunkformat &EROFS_CHUNK_FORMAT_INDEXES ) unit =sizeof (struct erofs_inode_chunk_index );
Signature · 1 line
2.24.4
PATCH v2 2/2 erofs-utils: lib: fix --blobdev without -Eforce-chunk-indexes
blockmap is used by default, chunk indexes should be switched instead if --blobdev is specified.
Fixes 016bd812be1e ("erofs-utils: mkfs: enable block map chunk format")
Signed-off-by Gao Xiang <[email protected]>
--- lib/blobchunk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/blobchunk.c +3 -1
@@ -113,7 +113,7 @@ int erofs_blob_write_chunk_indexes(struct erofs_inode *inode,if (multidev) { idx.device_id =1 ; - inode->u.chunkformat |=EROFS_CHUNK_FORMAT_INDEXES ; +DBG_BUGON (!(inode->u.chunkformat &EROFS_CHUNK_FORMAT_INDEXES )); }else { base_blkaddr = remapped_base; }
@@ -171,6 +171,8 @@ int erofs_blob_write_chunked_file(struct erofs_inode *inode)int fd, ret; inode->u.chunkformat |= inode->u.chunkbits -LOG_BLOCK_SIZE ; +if (multidev) + inode->u.chunkformat |=EROFS_CHUNK_FORMAT_INDEXES ;if (inode->u.chunkformat &EROFS_CHUNK_FORMAT_INDEXES ) unit =sizeof (struct erofs_inode_chunk_index );
Signature · 1 line
2.24.4