assignment代做 | os代写 | 操作系统代写 | C++代写  – FUSE filesystem

FUSE filesystem

assignment代做 | os代写 | 操作系统代写 | C++代写  – 这个是典型的一个os代写任务,涉及了fuse操作系统, 这个项目是assignment代写的代写题目

ass代做 assignment代写 代写assignment

In this assignment you will build a FUSE filesystem driver that will let you mount a 1MB disk image (data file) as a filesystem.

Step 1: Install FUSE

For this assignment you will need to use your local Ubuntu 18.04 VM (or another local modern Linux). You’ll need to install the libfuse-dev package.

Step 2: Implement a basic filesystem

You should extend the provided starter code so that it lets you do the following:

  • Create files.
  • List the files in the filesystem root directory (where you mounted it).
  • Write to small files (under 4k).
  • Read from small files (under 4k).
  • Delete files.
  • Rename files.

This will require that you come up with a structure for how the file system will store data in it’s 1MB “disk”. See the filesystem slides – especially the original ext filesystem – for inspiration.

Some additional code that might be useful is provided in the “hints” directory in the assignment download. You can use this if you want. Using a block structure and mmap to access the filesystem image file as shown in the “pages.c” file is recommended.

To Submit

Submit your filesystem source code in a hw12 directory in a .tar.gz archive.

Don’t submit your filesystem image data file or other binary files (run “make clean” before creating your tarball). Don’t submit stray dotfiles.

Hints & Tips

  • There aren’t man pages for FUSE. Instead, the documentation is in the header file: /usr/include/fuse/fuse.h
  • The basic development / testing strategy for this assignment is to run your program in one terminal window and try FS operations on the mounted filesystem in another separate terminal window.
  • Read the manual pages for the system calls you’re implementing.
  • To return an error from a FUSE callback, you return it as a negative number (e.g. return – ENOENT). Some things don’t work if you don’t return the right error codes.
  • Read and write, on success, return the number of bytes they actually read or wrote.
  • You need to implement getattr early and make sure it’s correct. Nothing works without getaddr. The mode for the root directory and hello.txt in the starter code are good default values.
  • The functions “dirname” and “basename” exist, but may mutate their argument.