File System Overview

less than 1 minute read

Introduction

  • use file descriptor to read/write/close file
  • hard link: just create a file to underlying inode
  • rm: unlink

VSFS(very simple file system)

vsfs

Inode: metadata for a file

  • Type: file or directory?
  • uid: user
  • rwx: permission
  • size: size in bytes
  • blocks: size in blocks
  • time: access time
  • ctime: create time
  • links_count: how many paths
  • addrs[N]: N data blocks

name stores in data block of dir

file operations

open and read

create and write