GDT = Group Descriptor Table ; GD = Group Descriptor. I'm trying to figure out how many bytes I need to read after the superblock to extract the entire GDT, because it's needed for a program I'm making. As we know each GD is 64B, and each block group is supposed to have GD, but since there is special flags such as flex_bg or sparse_super or meta_bg which will make there less GD than there should be. In that case how am I suppose to know the length of GDT?
-
how does libext2fs calculate that? The official tools need to do the same as you, so you should probably use the same methodology. (in fact, this sounds very much like you shouldn't be writing this yourself, but use libext2fs instead)Marcus Müller– Marcus Müller2025-02-09 15:56:57 +00:00Commented Feb 9 at 15:56
-
@MarcusMüller I'm trying to make ext4 writable on windows, so I has to write it my self.james– james2025-02-09 17:00:09 +00:00Commented Feb 9 at 17:00
-
that is not true, you can and should use the working code for that from libext2fs for that. It's GPL code so that you can do exactly what you're doing here: use it in other software.Marcus Müller– Marcus Müller2025-02-09 17:35:15 +00:00Commented Feb 9 at 17:35
-
I thought there was already a windows driver for ext4? Anyway, this question is deep enough in the weeds you should at least be looking at the source code even if you don't use the library, which you should.user10489– user104892025-02-09 22:01:36 +00:00Commented Feb 9 at 22:01
Add a comment
|