Re: partially encrypted filesystem

From: Matthew Wilcox
Date: Fri Dec 05 2003 - 15:29:57 EST

On Fri, Dec 05, 2003 at 02:47:56PM -0500, Erez Zadok wrote:
> Thanks for the info, Matthew. Yes, clearly a scheme that keeps some "holes"
> in compressed files can help; one of our ideas was to leave sparse holes
> every N blocks, exactly for this kind of expansion, and to update the index
> file's format to record where the spaces are (so we can efficiently
> calculate how many holes we need to consume upon a new write).

But the genius is that you don't need to calculate anything. If the
data block turns out to be incompressible (those damn .tar.bz2s!), you
just write the block in-place. If it is compressible, you write as much
into that block's entry as you need and leave a gap. The underlying
file system doesn't write any data there. There's no need for an index
file -- you know exactly where to start reading each block.

"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at