GithubHelp home page GithubHelp logo

fuse-filesystem's Introduction

FUSE-filesystem study

This is a place for studying FUSE in Dankook University.

1. FUSE란?

From the official repository

FUSE는 user-space에서 파일 시스템을 개발하는데 사용되는 프레임워크이다. User-space에서는 수많은 툴과 라이브러리를 이용하여 커널단에 비해 파일 시스템을 쉽게 개발할 수 있다. FUSE는 현재 가장 일반적으로 사용되며, 현재 100개 이상의 FUSE 기반 파일 시스템이 나와있다.

2. FUSE Structure

FUSE구조

FUSE는 kernel의 FUSE 모듈과 user-space의 FUSE daemon, 라이브러리 libfuse로 구성된다.

FUSE 모듈은 load된 후 파일시스템 타입(fuse, fuseblk, fusectl)과 /dev/fuse character 디바이스를 등록한다. 그 이후 사용자 application이 FUSE filesystem이 mount된 폴더를 대상으로 system call을 호출하면 VFS를 지나 /dev/fuse로 전달된다. 그 후 FUSE 데몬은 /dev/fuse에서 요청을 읽어 수행하고, 수행이 끝나면 드라이버에 요청이 끝났음을 전달하고 이는 application으로 보내진다.

Libfuse 설치

https://github.com/libfuse/libfuse/releases

3. How to use my file system

  • 디렉토리로 들어가서 mount할 지점인 폴더를 생성
$ cd study; mkdir <mount point>
  • 컴파일 후 프로그램 실행
$ gcc -Wall my_passthrough.c `pkg-config fuse3 --cflags --libs` -o my_passthrough
$ ./my_passthrough -d -f <mount point>
  • 다른 shell 창에서 mount point로 들어가서 작업 수행

Flags to gcc

FLAG MEANING CONSEQUENCE
-Wall Turn on warnings 모든 경고 표시
`pkg-config fuse3 --cflags --libs` Required 컴파일과 링크에 대한 정보 제공, FUSE3 버전 사용

Flags to ./my_passthrough

FLAG MEANING CONSEQUENCE
-d Debug mode FUSE에 의해서 추가적인 디버깅 정보가 표시됨
-f Run in foreground -f 플래그가 없으면 my_passthrough는 백그라운드 데몬으로 돌아감

4. example output

예제수행결과

my_passthrough: mirrors the file system hierarchy, starting at the root file system


Contact

Dankook University

Yejin Han E-MAIL : [email protected]

fuse-filesystem's People

Contributors

yj243 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.