Home
last modified time | relevance | path

Searched refs:ext2 (Results 1 – 8 of 8) sorted by relevance

/lk-master/lib/fs/ext2/
A Dext2.c104 ext2->dev = dev; in ext2_mount()
119ext2->s_group_count = (ext2->sb.s_blocks_count + ext2->sb.s_blocks_per_group - 1) / ext2->sb.s_blo… in ext2_mount()
146 ext2->gd = malloc(sizeof(struct ext2_group_desc) * ext2->s_group_count); in ext2_mount()
147 err = bio_read(ext2->dev, (void *)ext2->gd, in ext2_mount()
168 ext2->cache = bcache_create(ext2->dev, EXT2_BLOCK_SIZE(ext2->sb), 4); in ext2_mount()
171 err = ext2_load_inode(ext2, EXT2_ROOT_INO, &ext2->root_inode); in ext2_mount()
177 *cookie = (fscookie *)ext2; in ext2_mount()
184 free(ext2); in ext2_mount()
193 free(ext2->gd); in ext2_unmount()
194 free(ext2); in ext2_unmount()
[all …]
A Dio.c18 return bcache_read_block(ext2->cache, buf, bnum); in ext2_read_block()
22 return bcache_get_block(ext2->cache, ptr, bnum); in ext2_get_block()
25 int ext2_put_block(ext2_t *ext2, blocknum_t bnum) { in ext2_put_block() argument
26 return bcache_put_block(ext2->cache, bnum); in ext2_put_block()
113 ext2_put_block(ext2, last_block); in ext2_get_indirect_block_pointer_cache_block()
155 ext2_put_block(ext2, phys_block); in file_block_to_fs_block()
186 uint8_t temp[EXT2_BLOCK_SIZE(ext2->sb)]; in ext2_read_inode()
209 while (len >= EXT2_BLOCK_SIZE(ext2->sb)) { in ext2_read_inode()
220 len -= EXT2_BLOCK_SIZE(ext2->sb); in ext2_read_inode()
221 bytes_read += EXT2_BLOCK_SIZE(ext2->sb); in ext2_read_inode()
[all …]
A Ddir.c18 static int ext2_dir_lookup(ext2_t *ext2, struct ext2_inode *dir_inode, const char *name, inodenum_t… in ext2_dir_lookup() argument
27 buf = malloc(EXT2_BLOCK_SIZE(ext2->sb)); in ext2_dir_lookup()
32 …err = ext2_read_inode(ext2, dir_inode, buf, file_blocknum * EXT2_BLOCK_SIZE(ext2->sb), EXT2_BLOCK_… in ext2_dir_lookup()
41 while (pos < EXT2_BLOCK_SIZE(ext2->sb)) { in ext2_dir_lookup()
106 err = ext2_dir_lookup(ext2, &dir_inode, ptr, inum); in ext2_walk()
114 err = ext2_load_inode(ext2, *inum, &inode); in ext2_walk()
124 err = ext2_read_link(ext2, &inode, link, sizeof(link)); in ext2_walk()
133 err = ext2_walk(ext2, link, &ext2->root_inode, inum, recurse + 1); in ext2_walk()
135 err = ext2_walk(ext2, link, &dir_inode, inum, recurse + 1); in ext2_walk()
172 int ext2_lookup(ext2_t *ext2, const char *_path, inodenum_t *inum) { in ext2_lookup() argument
[all …]
A Dfile.c20 ext2_t *ext2 = (ext2_t *)cookie; in ext2_open_file() local
25 err = ext2_lookup(ext2, path, &inum); in ext2_open_file()
34 err = ext2_load_inode(ext2, inum, &file->inode); in ext2_open_file()
40 file->ext2 = ext2; in ext2_open_file()
57 err = ext2_read_inode(file->ext2, &file->inode, buf, offset, len); in ext2_read_file()
78 off_t ext2_file_len(ext2_t *ext2, struct ext2_inode *inode) { in ext2_file_len() argument
81 …if ((ext2->sb.s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_LARGE_FILE) && (S_ISREG(inode->i_mode))… in ext2_file_len()
92 stat->size = ext2_file_len(file->ext2, &file->inode); in ext2_stat_file()
102 int ext2_read_link(ext2_t *ext2, struct ext2_inode *inode, char *str, size_t len) { in ext2_read_link() argument
105 off_t linklen = ext2_file_len(ext2, inode); in ext2_read_link()
[all …]
A Dext2_priv.h36 ext2_t *ext2; member
43 int ext2_load_inode(ext2_t *ext2, inodenum_t num, struct ext2_inode *inode);
44 int ext2_lookup(ext2_t *ext2, const char *path, inodenum_t *inum); // path to inode
47 int ext2_read_block(ext2_t *ext2, void *buf, blocknum_t bnum);
48 int ext2_get_block(ext2_t *ext2, void **ptr, blocknum_t bnum);
49 int ext2_put_block(ext2_t *ext2, blocknum_t bnum);
51 off_t ext2_file_len(ext2_t *ext2, struct ext2_inode *inode);
52 ssize_t ext2_read_inode(ext2_t *ext2, struct ext2_inode *inode, void *buf, off_t offset, size_t len…
53 int ext2_read_link(ext2_t *ext2, struct ext2_inode *inode, char *str, size_t len);
A Drules.mk11 $(LOCAL_DIR)/ext2.c \
/lk-master/project/virtual/
A Dfs.mk5 lib/fs/ext2 \
/lk-master/project/
A Darmemu-test.mk11 lib/fs/ext2 \

Completed in 14 milliseconds