26 for (uint32_t i = 0; i < 12; i++) {
27 uint32_t blk = dir_inode.
direct[i];
38 if (entries[j].
inode == 0)
41 *out_ino = entries[j].
inode;
59 fuse_fill_dir_t filler, off_t offset) {
66 filler(buf,
".", NULL, 0, 0);
67 filler(buf,
"..", NULL, 0, 0);
70 for (uint32_t i = 0; i < 12; i++) {
71 uint32_t blk = dir_inode.
direct[i];
82 if (entries[j].
inode == 0)
84 if (entries[j].
name[0] ==
'\0')
86 filler(buf, entries[j].
name, NULL, 0, 0);
ssize_t read_block(int fd, uint32_t blk, void *out_buf)
지정한 블록 번호의 데이터를 읽어 버퍼에 저장
int dir_list(const struct sfuse_fs *fs, uint32_t dir_ino, void *buf, fuse_fill_dir_t filler, off_t offset)
디렉터리 엔트리 목록을 FUSE에 전달하여 나열
int dir_lookup(const struct sfuse_fs *fs, uint32_t dir_ino, const char *name, uint32_t *out_ino)
디렉터리 내에서 지정한 이름의 엔트리를 검색하여 inode 번호 반환
#define DENTS_PER_BLOCK
한 블록당 디렉터리 엔트리 수
int inode_load(int fd, const struct sfuse_superblock *sb, uint32_t ino, struct sfuse_inode *out)
디스크 이미지에서 아이노드를 읽어 구조체에 로드
struct sfuse_superblock sb
#define SFUSE_BLOCK_SIZE
블록 크기 (바이트 단위)