after successfully reading the file inode with this:
retval = ext2fs_read_inode_full(current_fs, inode, inode_buf, EXT2_INODE_SIZE(current_fs->super));
if (retval) {
fprintf(stderr, "Failed to read inode\n");
free(fs);
free(inode_buf);
…
By default, the ext2/3/4 fs reserves 5% of its capacity to be able to keep running when diskspace is getting low.
I also believe it has something to do with allowing "fragmentation between files" or something like this (I haven't been able to find…
I am working on some ext2 filesystem stuff for a school project (implement ls, mkdir, that kind of thing) and have found that I am generating a lot of redundant code for tasks where I need to traverse an inode's i_block. I have functions to count…
I'm tasked with writing a reader program for windows that is able read an ext2 partition.
For my testing I'm using a drive I formatted to ext2 and a file I created using mkfs (a file that does mount and work well under linux)
For some reason when I…
I just tried to access my superblock information using the code as shown here:-
http://paste.pocoo.org/show/340724/
However, I get the error as shown here:-
http://paste.pocoo.org/show/340723/
My kernel version is 2.6.31-22-generic and I have not…
I create a variable to store the value of superblock's s_uuid. But I get trouble into how to print this variable like xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in this form. I tried to use printf in %x and %s to print my variable, but it doesn't work.
I…
I was reading the source for ext2fs where the filesystem is registered with the FS_REQUIRES_DEV flag in fs/ext2/super.c. Both fs.h and the kernel documentation don't say anything else about this flag.
I also tried to look up how the VFS uses of this…
I'm trying to patch and rebuild e2fsprog. Re-build is failing as test cases started failing post patching. I have just added a printf comment so not sure why this will lead to test case failure.
Steps I'm following.
a) make packages --> get source…
I am learning the EXT2 file system. I am confused about how the removal of a file works for EXT2. My understanding is that, upon deletion, it doesn't actually deletes the inode, instead it marks some metadata as unused. My question is that, what…
This question has totally confused me-
I have an array(fixed size):
unsigned int i_block[15];
I have a string(length <= 60):
"path/to/bla/is/bla"
How would I go about storing the characters of the string in the space for the array?
I was thinking…
I am trying to access the superblock in the opening and reading in of a ext2 filesystem from a vdi file. I want to use the struct ext2_super_block that exists in the ext2.h file (see line 415 of http://lxr.free-electrons.com/source/fs/ext2/ext2.h).…
How can I open a file in an ext2 file system. For example, lets say I want to open the file: /a/b/c.txt
I'm looking at the functions here: http://www.nongnu.org/ext2-doc/ext2.html
In c, how would I find a directory in a virtual disk? I can easily recurse the absolute path and tun that into just the name of the directory I am looking for (i.e. turning /x/y/z into just z). I know that the root is inode 2, and I know how to get…
In my linux machines, I use the command line utility e2cp to copy files from and to ext2 disk images. Unfortunately, OS X does not provide any ext2fs utility out of the box.
Is there a version of e2cp that is compatible to OS X, or a similar…