Giter Club home page Giter Club logo

cs393_ext2's Introduction

This is a starting point for parsing and navigating ext2 file systems. cargo run will start a session that looks like a shell. All you can do for now are the ls, and cd commands. It's left as an exercise to implement cat to view the contents of files, and removing other limitations.

Here's an example session:

% cargo run
   <building and intro stuff>
:> ls
.	..	lost+found	test_directory	hello.txt	
:> cat hello.txt
cat not yet implemented
:> cd test_directory
:> ls
.	..	file_in_folder.txt	
:> cd file_in_folder.txt    # <- whoops
:> ls
'm a file inside a folder.  # <- whoops^2
	
:> 

Limitations (also possible exercises):

  • see "TODO" in cd command - you can currently cd into a text file - whoops!
  • implement cat command to view text files
  • currently it only parses small directories, remove this limitation
  • implement mkdir
  • implement link <source name> <destination path> to create hard links
  • write tests
  • write more tests
  • implement rm (aka unlink) for plain files
  • make link robust against ... (what should link be robust against?)
  • once modifications can be made, implement unmount which cleanly writes modifications back to the "device" (file)
  • implement import to get a file from the "host" filesystem into ours
  • implement a mount <host-file> <dirname> command to mount a local file as an ext2 filesystem over an empty directory.

Big projects:

  • make it #[no_std] compatible
  • instead of reading from a big byte-buffer, read from a device into manually managed page-sized buffers
  • implement a buffer cache
  • implement fsck - identify different inconsistencies and find them
  • implement a simple line editor (ed?) to create text files in the filesystem

Bigger projects:

  • ext4 support?
  • integrate with reedos kernel memory allocation
  • integrate caching with kernel VM

Credits: Reed College CS393 students, @tzlil on the Rust #osdev discord

cs393_ext2's People

Contributors

dylanmc 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.