ext2 File system for Linux programmed in C
benhamlin314 / ext2fs_360 Goto Github PK
View Code? Open in Web Editor NEWext2 File system for Linux programmed in C
ext2 File system for Linux programmed in C
deallocates inode
must deallocate blocks first
--to be decided if that is within this function or called before
increments free inode count in super and group blocks
frees up the inode
Currently the code does not have comments, we need to add them as we go along and go back and add to previously written code.
create unlink command
verify path is file
decrement inode link by 1
if inode link is 0 deallocate block of inode
then deallocate inode
remove name from parent
link to website follows: http://www.eecs.wsu.edu/~cs360/link_unlink.html
We corrected rpwd but have not tested it yet. This can be done today but should be added to the list until is is successfully run a few times.
mkdir and creat are similar so should be done together
link to webpage follows: http://www.eecs.wsu.edu/~cs360/mkdir_creat.html
Remake getino getting rid of KC's code and replacing with our style
EASY function
stat prints the information of the file or directory
prints the following:
file/dir name
size
blocks
IO block
file type
device
inode
linkcount
access permissions
owner as uid
owner as gid
access time
modified time
created time
All of this information is contained within Inode of itself and its parent. I believe a function already exists to get inode's name from parent
create link command
form of link command follows: link oldname newname
creates file with same inode as oldname but with newname
and increments the i_links_count of the oldname inode
link to website follows: http://www.eecs.wsu.edu/~cs360/link_unlink.html
Your mkdir/creat may trash the disk iamge (by writing to wrong inode or data
blocks), which will cause problems later even if your program is correct. So,
it's better to use a FRESH disk image each time during development.
Write a sh script "run" or "doit" containing:
mkfs disk 1440 # renew the disk image file
a.out
Enter run or doit to test YOUR new a.out, so that you use a NEW disk image
file each time until YOUR a.out no longer traches the disk image.
After running YOUR mkdir/creat commands, it's better to check the results
under LINUX. Write a sh script "s" containing
mount -o loop disk /mnt
ls -l /mnt
umount /mnt
so that s will show the disk contents under LINUX.
make deallocate block function
deallocates all blocks in the inode
--should only be block 0 for us
----future iterations will deallocate all blocks; i.e. direct, indirect, double indirect, and triple indirect
increments the free block counters
make rmdir
utilize utility function to remove child from parent block
link to website follows: http://www.eecs.wsu.edu/~cs360/rmdir.html
http://www.eecs.wsu.edu/~cs360/link_unlink.html
function will be created in link-unlink.c
check to see if path exists if it does then do the following
chmod changes access permissions of the inode in the i_mode field
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.