EFS question
Just to make sure I understand this correctly:
- when an inode has <= EFS_DIRECTEXTENTS extents, they're stored directly in the inode.
- when an inode has > EFS_DIRECTEXTENTS extents, the extents in the inode refer to contiguous block regions that contain extents referring to the real data.
The EFS code that Alan posted, in addition to having a curious aversion to structures, seemed to think that the first 4 bytes of dinode->di_u were the block number of a block containing extents, and thus doesn't work very well with files with numext > EFS_DIRECTEXTENTS. I just want to ensure that I make a sane fix.
Mike
Signature · 5 lines
#> Mike Shaver ([email protected]) Ingenia Communications Corporation #> UNIX medicine man -- dark magick, cheap! #> #> When the going gets tough, the tough give cryptic error messages. #> "We believe in rough consensus and running code."
Quoted 7 lines · Mike Shaver
Just to make sure I understand this correctly:
- when an inode has <=EFS_DIRECTEXTENTSextents, they're stored directly in the inode.
- when an inode has >EFS_DIRECTEXTENTSextents, the extents in the inode refer to contiguous block regions that contain extents referring to the real data.
Quoted 5 lines
The EFS code that Alan posted, in addition to having a curious aversion to structures, seemed to think that the first 4 bytes of
dinode->di_uwere the block number of a block containing extents, and thus doesn't work very well with files with numext >EFS_DIRECTEXTENTS. I just want to ensure that I make a sane fix.
...
The above is correct. When there are indirect extents,
the offset field of the first indirect extent in the inode contains the number of indirect extents, not a file offset.
Thus spake William J. Earl:
Quoted 3 lines
When there are indirect extents,
the offset field of the first indirect extent in the inode contains the number of indirect extents, not a file offset.
_Ah!_
That makes _much_ more sense, then.
Mike
Signature · 5 lines
#> Mike Shaver ([email protected]) Ingenia Communications Corporation #> Commando Developer - Whatever It Takes #> #> "See, you not only have to be a good coder to create a system like #> Linux, you have to be a sneaky bastard too." - Linus Torvalds