SFUSE_Documentation
|
함수 | |
int | bitmap_load (int fd, uint32_t start_blk, struct sfuse_bitmaps *bmaps, uint32_t count) |
디스크에서 연속된 비트맵 블록들을 읽어 메모리에 로드 | |
int | bitmap_sync (int fd, uint32_t start_blk, const struct sfuse_bitmaps *bmaps, uint32_t count) |
메모리에 있는 비트맵을 디스크에 저장 | |
int | alloc_bit (uint8_t *map, uint32_t total_bits) |
비트맵에서 0인 비트를 찾아 1로 설정하고 인덱스를 반환 | |
void | free_bit (uint8_t *map, uint32_t idx) |
비트맵에서 지정한 인덱스 비트를 0으로 설정 | |
int | alloc_inode (struct sfuse_superblock *sb, struct sfuse_inode_bitmap *imap) |
새로운 아이노드 할당 | |
void | free_inode (struct sfuse_superblock *sb, struct sfuse_inode_bitmap *imap, uint32_t ino) |
아이노드 해제 | |
int | alloc_block (struct sfuse_superblock *sb, struct sfuse_block_bitmap *bmap) |
새로운 데이터 블록 할당 | |
void | free_block (struct sfuse_superblock *sb, struct sfuse_block_bitmap *bmap, uint32_t blk) |
데이터 블록 해제 |
변수 | |
static const uint32_t | BITS_PER_BLOCK = 4096 * 8 |
한 블록에 담길 수 있는 비트 수 |
int alloc_bit | ( | uint8_t * | map, |
uint32_t | total_bits ) |
비트맵에서 0인 비트를 찾아 1로 설정하고 인덱스를 반환
비트맵에서 비트를 할당
map | 비트맵 버퍼 |
total_bits | 전체 비트 수 |
bitmap.c 파일의 57 번째 라인에서 정의되었습니다.
int alloc_block | ( | struct sfuse_superblock * | sb, |
struct sfuse_block_bitmap * | bmap ) |
새로운 데이터 블록 할당
슈퍼블록 기반으로 데이터 블록 할당
sb | 슈퍼블록 포인터 |
bmap | 블록 비트맵 포인터 |
bitmap.c 파일의 121 번째 라인에서 정의되었습니다.
int alloc_inode | ( | struct sfuse_superblock * | sb, |
struct sfuse_inode_bitmap * | imap ) |
새로운 아이노드 할당
슈퍼블록 기반으로 아이노드 할당
sb | 슈퍼블록 포인터 |
imap | 아이노드 비트맵 포인터 |
bitmap.c 파일의 95 번째 라인에서 정의되었습니다.
int bitmap_load | ( | int | fd, |
uint32_t | start_blk, | ||
struct sfuse_bitmaps * | bmaps, | ||
uint32_t | count ) |
디스크에서 연속된 비트맵 블록들을 읽어 메모리에 로드
비트맵을 디스크에서 읽어 메모리에 로드
fd | 파일 디스크립터 |
start_blk | 시작 블록 번호 |
bmaps | 비트맵 구조체 포인터 |
count | 읽을 블록 수 |
bitmap.c 파일의 21 번째 라인에서 정의되었습니다.
int bitmap_sync | ( | int | fd, |
uint32_t | start_blk, | ||
const struct sfuse_bitmaps * | bmaps, | ||
uint32_t | count ) |
메모리에 있는 비트맵을 디스크에 저장
메모리 비트맵을 디스크에 동기화
fd | 파일 디스크립터 |
start_blk | 시작 블록 번호 |
bmaps | 비트맵 구조체 포인터 (읽기 전용) |
count | 기록할 블록 수 |
bitmap.c 파일의 40 번째 라인에서 정의되었습니다.
void free_bit | ( | uint8_t * | map, |
uint32_t | idx ) |
void free_block | ( | struct sfuse_superblock * | sb, |
struct sfuse_block_bitmap * | bmap, | ||
uint32_t | blk ) |
데이터 블록 해제
슈퍼블록 기반으로 데이터 블록 해제
sb | 슈퍼블록 포인터 |
bmap | 블록 비트맵 포인터 |
blk | 해제할 블록 번호 |
bitmap.c 파일의 135 번째 라인에서 정의되었습니다.
void free_inode | ( | struct sfuse_superblock * | sb, |
struct sfuse_inode_bitmap * | imap, | ||
uint32_t | ino ) |