All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gregory Maxwell <gmaxwell@gmail.com>
To: Edward Shishkin <edward@namesys.com>
Cc: Fred Schaettgen <namesys.Sch@ttgen.net>, reiserfs-list@namesys.com
Subject: Re: Will I need to re-format my partition for using the compression plugin?
Date: Thu, 22 Sep 2005 16:54:38 -0400	[thread overview]
Message-ID: <e692861c0509221354127bd13e@mail.gmail.com> (raw)
In-Reply-To: <43330E14.9050209@namesys.com>

On 9/22/05, Edward Shishkin <edward@namesys.com> wrote:
> Yes. It is impossible to implement all features in one file plugin.
> Checksuming means a low
> performance: in order to read some bytes of such file you will need
> first to read the whole file
> to check a checksum (isnt it?). So it will be suitable for a small
> number of special files.
> To write this new file plugin you will want to use already existing
> cipher and compression
> transform plugins (dont mix it with cryptcompress file plugin which also
> calls those plugins)
> to compress and encrypt your checksumed file.

For file data integrity it would actually be more useful to have a per
block hash or checksum. This solves the update problem.  It would be
useful if the file offset and some file identifier were also mixed
into the calculation so that a misplaced block will fail as well. This
would fit quite nicely into the existing actions of the cryptocompress
plugin, and could be accomplished as just another compression algo..
one that always adds the 64-256 bits of check data per block.. At
least as long as the error handling in the FS is robust enough to be
able to treat a decompression failure as an IO error.  ...

If it were desirable to produce a cryptographically strong checksum
which can be handed to the user, what you would do is perform a hash
per block, and store that with each block, then a hash of the hashes
which is returned to the user. This is called a tree hash (google it),
usually you have a deeper hierarchy than two, depends on the
application. This makes incremental updates cheap enough (just hash
the block, then ripple the changes up the tree).  This would remove
the ability to include the file id and offsets directly in the hash,
but i would argue that they should still be used: for example you
could xor the hash value with them before writing it to disk and on
reading it from disk. This would still allow you to detect a misplaced
block but would not make the tree value differ for multiple copies of
the same file.

  parent reply	other threads:[~2005-09-22 20:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-20 13:31 Will I need to re-format my partition for using the compression plugin? Clemens Eisserer
2005-09-20 13:58 ` Edward Shishkin
2005-09-20 15:49 ` Vladimir V. Saveliev
2005-09-20 16:12   ` Edward Shishkin
2005-09-20 19:19     ` Clemens Eisserer
2005-09-20 19:38       ` Tomasz Chmielewski
2005-09-20 19:43         ` Edward Shishkin
2005-09-22 15:24           ` Grzegorz Jaśkiewicz
2005-09-22 16:41             ` Edward Shishkin
2005-09-22 17:51               ` Fred Schaettgen
2005-09-22 20:03                 ` Edward Shishkin
2005-09-22 20:11                   ` David Masover
2005-09-22 20:49                     ` Valdis.Kletnieks
2005-09-22 20:54                       ` michael chang
2005-09-22 21:05                         ` Valdis.Kletnieks
2005-09-23  9:00                         ` Edward Shishkin
2005-09-22 22:13                       ` Gregory Maxwell
2005-09-23  6:08                         ` Valdis.Kletnieks
2005-09-22 20:38                   ` Valdis.Kletnieks
2005-09-22 20:54                   ` Gregory Maxwell [this message]
2005-09-22 21:33                   ` PFC
2005-09-22 21:38                   ` Fred Schaettgen
2005-09-23 11:12                     ` Edward Shishkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e692861c0509221354127bd13e@mail.gmail.com \
    --to=gmaxwell@gmail.com \
    --cc=edward@namesys.com \
    --cc=namesys.Sch@ttgen.net \
    --cc=reiserfs-list@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.