Page 1 of 1

What does linux put in inode 2 of ext2 filesystem?

Posted: Sun Apr 05, 2015 5:51 am
by glauxosdev
https://www.imageupload.co.uk/image/Zc88
What is this in red supposed to mean? Does not look like a file/directory/etc entry. File length 0BBh, file type 0CEh... Odd...
Could someone enlighten me?

Regards,
glauxosdev

Re: What does linux put in inode 2 of ext2 filesystem?

Posted: Sun Apr 05, 2015 9:32 am
by iansjack
It's an unused part of the block. I've no idea how it got there in your particular instance as it doesn't look like a deleted entry. Whatever, it's doing no harm.

Re: What does linux put in inode 2 of ext2 filesystem?

Posted: Sun Apr 05, 2015 12:20 pm
by glauxosdev
And how should my code know how to skip it?
I've no idea how it got there in your particular instance
I formatted my flash drive as ext2, I created a folder "sys" and I copied "docs", "programs", "source" and "system".

Edit: sometimes the length of this unused block is specified in place of file name length.

Re: What does linux put in inode 2 of ext2 filesystem?

Posted: Sun Apr 05, 2015 1:23 pm
by iansjack
And how should my code know how to skip it?
I've said it before, but it looks like I have to say it again.

Before you can work with ext2fs at a low level you have to understand the filesystem, its structures, and how they are used. And you have to at the very least read that document that I linked to describing the ext2 filesystem. It is evident that you have not yet reached that stage. I suggested before a way that you could work towards that level of enlightenment; you rejected my suggestion then, so there seems to be little point in repeating it now.

There is no easy path to OS development, and asking someone else to help you every time you hit something that you don't understand is not the magical path.

But, to answer your question: your code knows how to skip it because it reads the directory from the disk in the way it was designed to be read.