SFUSE_Documentation
로딩중...
검색중...
일치하는것 없음
fs.h
이 파일의 문서화 페이지로 가기
1// File: include/fs.h
2
3#ifndef SFUSE_FS_H
4#define SFUSE_FS_H
5
6#include "super.h"
7#include <fuse3/fuse.h>
8#include <sys/stat.h>
9#include <sys/types.h>
10#include <time.h>
11
12/* 전역 선언 */
13struct sfuse_bitmaps;
15
16extern bool g_force_format;
17
27
34struct sfuse_fs *fs_initialize(const char *path, int *error_out);
35
40void fs_teardown(struct sfuse_fs *fs);
41
49int fs_resolve_path(struct sfuse_fs *fs, const char *path, uint32_t *out_ino);
50
51/* 고수준 FUSE 연동 함수 선언 */
52
60int fs_getattr(struct sfuse_fs *fs, const char *path, struct stat *stbuf);
61
69int fs_access(struct sfuse_fs *fs, const char *path, int mask);
70
80int fs_readdir(struct sfuse_fs *fs, const char *path, void *buf,
81 fuse_fill_dir_t filler, off_t offset);
82
90int fs_open(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi);
91
101int fs_read(struct sfuse_fs *fs, const char *path, char *buf, size_t size,
102 off_t offset);
103
113int fs_write(struct sfuse_fs *fs, const char *path, const char *buf,
114 size_t size, off_t offset);
115
124int fs_create(struct sfuse_fs *fs, const char *path, mode_t mode,
125 struct fuse_file_info *fi);
126
134int fs_mkdir(struct sfuse_fs *fs, const char *path, mode_t mode);
135
142int fs_unlink(struct sfuse_fs *fs, const char *path);
143
150int fs_rmdir(struct sfuse_fs *fs, const char *path);
151
159int fs_rename(struct sfuse_fs *fs, const char *from, const char *to);
160
168int fs_truncate(struct sfuse_fs *fs, const char *path, off_t size);
169
177int fs_utimens(struct sfuse_fs *fs, const char *path,
178 const struct timespec tv[2]);
179
187int fs_flush(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi);
188
197int fs_fsync(struct sfuse_fs *fs, const char *path, int datasync,
198 struct fuse_file_info *fi);
199
204struct fuse_operations *sfuse_get_operations(void);
205
206#endif /* SFUSE_FS_H */
int fs_getattr(struct sfuse_fs *fs, const char *path, struct stat *stbuf)
파일/디렉터리 속성 조회
Definition fs.c:237
bool g_force_format
강제 포맷 옵션 플래그
Definition main.c:32
int fs_mkdir(struct sfuse_fs *fs, const char *path, mode_t mode)
디렉터리 생성
Definition fs.c:702
struct sfuse_fs * fs_initialize(const char *path, int *error_out)
파일 시스템 초기화
Definition fs.c:105
int fs_read(struct sfuse_fs *fs, const char *path, char *buf, size_t size, off_t offset)
파일 읽기
Definition fs.c:310
void fs_teardown(struct sfuse_fs *fs)
파일 시스템 정리
Definition fs.c:165
int fs_create(struct sfuse_fs *fs, const char *path, mode_t mode, struct fuse_file_info *fi)
파일 생성
Definition fs.c:570
int fs_truncate(struct sfuse_fs *fs, const char *path, off_t size)
파일 크기 조정 (truncate)
Definition fs.c:1138
struct fuse_operations * sfuse_get_operations(void)
SFUSE용 FUSE operations 구조체 반환
Definition ops.c:232
int fs_utimens(struct sfuse_fs *fs, const char *path, const struct timespec tv[2])
파일의 시간 속성 변경 (utimens)
Definition fs.c:1318
int fs_rmdir(struct sfuse_fs *fs, const char *path)
디렉터리 삭제
Definition fs.c:963
int fs_resolve_path(struct sfuse_fs *fs, const char *path, uint32_t *out_ino)
경로를 inode 번호로 변환
Definition fs.c:198
int fs_open(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
파일 열기
Definition fs.c:290
int fs_fsync(struct sfuse_fs *fs, const char *path, int datasync, struct fuse_file_info *fi)
FUSE에서 fsync 요청 처리
Definition fs.c:1280
int fs_unlink(struct sfuse_fs *fs, const char *path)
파일 삭제
Definition fs.c:829
int fs_readdir(struct sfuse_fs *fs, const char *path, void *buf, fuse_fill_dir_t filler, off_t offset)
디렉터리 내용 읽기
Definition fs.c:272
int fs_access(struct sfuse_fs *fs, const char *path, int mask)
접근 권한 검사
Definition fs.c:1343
int fs_write(struct sfuse_fs *fs, const char *path, const char *buf, size_t size, off_t offset)
파일 쓰기
Definition fs.c:407
int fs_rename(struct sfuse_fs *fs, const char *from, const char *to)
파일 또는 디렉터리 이름 변경
Definition fs.c:1011
int fs_flush(struct sfuse_fs *fs, const char *path, struct fuse_file_info *fi)
FUSE에서 플러시 요청 처리
Definition fs.c:1302
아이노드 비트맵과 블록 비트맵을 함께 담는 구조체
Definition bitmap.h:30
SFUSE 파일 시스템 컨텍스트 구조체
Definition fs.h:21
struct sfuse_bitmaps * bmaps
Definition fs.h:24
struct sfuse_superblock sb
Definition fs.h:23
struct sfuse_inode_block * inode_table
Definition fs.h:25
int backing_fd
Definition fs.h:22
아이노드 블록: 여러 아이노드를 담는 블록
Definition inode.h:38
슈퍼블록 구조체
Definition super.h:51