15 uint32_t inode_index = ino;
18 off_t offset_within_block =
35 ssize_t n = pread(fd, out,
sizeof(
struct sfuse_inode), offs);
39 return (n ==
sizeof(
struct sfuse_inode) ? 0 : -EIO);
54 ssize_t n = pwrite(fd, in,
sizeof(
struct sfuse_inode), offs);
58 return (n ==
sizeof(
struct sfuse_inode) ? 0 : -EIO);
int inode_load(int fd, const struct sfuse_superblock *sb, uint32_t ino, struct sfuse_inode *out)
디스크에서 지정한 아이노드 번호의 아이노드 구조체를 읽어 옴
int inode_sync(int fd, const struct sfuse_superblock *sb, uint32_t ino, const struct sfuse_inode *in)
아이노드 구조체를 디스크에 동기화(쓰기)함
static off_t inode_offset(const struct sfuse_superblock *sb, uint32_t ino)
아이노드 테이블 내 특정 아이노드의 디스크 내 바이트 오프셋을 계산
#define SFUSE_INODES_PER_BLOCK
한 블록에 담을 수 있는 아이노드 수
uint32_t inode_table_start
#define SFUSE_BLOCK_SIZE
블록 크기 (바이트 단위)