xref: /aosp_15_r20/external/erofs-utils/include/erofs/blobchunk.h (revision 33b1fccf6a0fada2c2875d400ed01119b7676ee5)
1*33b1fccfSAndroid Build Coastguard Worker /* SPDX-License-Identifier: GPL-2.0+ OR Apache-2.0 */
2*33b1fccfSAndroid Build Coastguard Worker /*
3*33b1fccfSAndroid Build Coastguard Worker  * erofs-utils/lib/blobchunk.h
4*33b1fccfSAndroid Build Coastguard Worker  *
5*33b1fccfSAndroid Build Coastguard Worker  * Copyright (C) 2021, Alibaba Cloud
6*33b1fccfSAndroid Build Coastguard Worker  */
7*33b1fccfSAndroid Build Coastguard Worker #ifndef __EROFS_BLOBCHUNK_H
8*33b1fccfSAndroid Build Coastguard Worker #define __EROFS_BLOBCHUNK_H
9*33b1fccfSAndroid Build Coastguard Worker 
10*33b1fccfSAndroid Build Coastguard Worker #ifdef __cplusplus
11*33b1fccfSAndroid Build Coastguard Worker extern "C"
12*33b1fccfSAndroid Build Coastguard Worker {
13*33b1fccfSAndroid Build Coastguard Worker #endif
14*33b1fccfSAndroid Build Coastguard Worker 
15*33b1fccfSAndroid Build Coastguard Worker #include "erofs/internal.h"
16*33b1fccfSAndroid Build Coastguard Worker 
17*33b1fccfSAndroid Build Coastguard Worker struct erofs_blobchunk *erofs_get_unhashed_chunk(unsigned int device_id,
18*33b1fccfSAndroid Build Coastguard Worker 		erofs_blk_t blkaddr, erofs_off_t sourceoffset);
19*33b1fccfSAndroid Build Coastguard Worker int erofs_blob_write_chunk_indexes(struct erofs_inode *inode, erofs_off_t off);
20*33b1fccfSAndroid Build Coastguard Worker int erofs_blob_write_chunked_file(struct erofs_inode *inode, int fd,
21*33b1fccfSAndroid Build Coastguard Worker 				  erofs_off_t startoff);
22*33b1fccfSAndroid Build Coastguard Worker int erofs_write_zero_inode(struct erofs_inode *inode);
23*33b1fccfSAndroid Build Coastguard Worker int tarerofs_write_chunkes(struct erofs_inode *inode, erofs_off_t data_offset);
24*33b1fccfSAndroid Build Coastguard Worker int erofs_mkfs_dump_blobs(struct erofs_sb_info *sbi);
25*33b1fccfSAndroid Build Coastguard Worker void erofs_blob_exit(void);
26*33b1fccfSAndroid Build Coastguard Worker int erofs_blob_init(const char *blobfile_path, erofs_off_t chunksize);
27*33b1fccfSAndroid Build Coastguard Worker int erofs_mkfs_init_devices(struct erofs_sb_info *sbi, unsigned int devices);
28*33b1fccfSAndroid Build Coastguard Worker 
29*33b1fccfSAndroid Build Coastguard Worker #ifdef __cplusplus
30*33b1fccfSAndroid Build Coastguard Worker }
31*33b1fccfSAndroid Build Coastguard Worker #endif
32*33b1fccfSAndroid Build Coastguard Worker 
33*33b1fccfSAndroid Build Coastguard Worker #endif
34