[Ocfs2-tools-devel] Add compress dirs option in fsck.ocfs2

Sunil Mushran sunil.mushran at oracle.com
Tue Sep 1 16:34:52 PDT 2009


Joel Becker wrote:
> 	Two things.  First, what about empty records?  Imagine you've
> just seen a dirent, set its rec_len to saved_reclen+offset-write_off.
> You set prev=dirent.  Then next pass is a deleted dirent, dirent->inode
> = 0.  You skip this block and set prev=dirent.  Then you come to another
> valid dirent.  However, prev->inode is zero, and so you won't update the
> first dirent's rec_len, nor will you update write_off correctly.
> 	Second thing, when you reach the end of the block there is no
> guarantee the last dirent->rec_len covers the entire block.  It will if
> it was the last dirent, but not if there were empty ones after it.
>   

Also, don't we have to handle ocfs2_dir_block_trailer.



More information about the Ocfs2-tools-devel mailing list