linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaya Potter <spotter@cs.columbia.edu>
To: Maciej Zenczykowski <maze@cela.pl>
Cc: "Pat LaVarre" <p.lavarre@ieee.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Matthew Wilcox" <willy@debian.org>,
	"Erez Zadok" <ezk@cs.sunysb.edu>,
	"Jörn Engel" <joern@wohnheim.fh-wedel.de>,
	"Phillip Lougher" <phillip@lougher.demon.co.uk>,
	"Kallol Biswas" <kbiswas@neoscale.com>
Subject: Re: partially encrypted filesystem
Date: Sat, 06 Dec 2003 19:04:00 -0500	[thread overview]
Message-ID: <1070755439.4726.3.camel@zaphod> (raw)
In-Reply-To: <Pine.LNX.4.44.0312061233280.11259-100000@gaia.cela.pl>

On Sat, 2003-12-06 at 06:43, Maciej Zenczykowski wrote:
> > Suppose we wish to encrypt the files on a disc or disk or drive that we
> > carry from one computer to another.
> > 
> > Where else can the encryption go, if not "down to the file system"?
> 
> Of course down to the file system - in this sense.  My point was that you
> were utilizing sparse features of the filesystem in ways for which it
> likely wasn't designed, thus you would likely encounter problems and/or
> slowdowns.  Face it: sparse files are seldom used and when they are used
> it is mostly for static files.  It is unusual for a file of 500 blocks to
> have 200 1 block sparse holes and 25 2 block sparse holes.  This is what
> you'd get with your compression (assuming a 50% comp ratio).  That's a
> single smallish files with 225 sparse empty regions.  I doubt the
> filesystem is optimized to deal nicely with that.  The problem being that
> any later write access to such a file which compresses better or worse
> than the original data in that area (ie uses one (or more) less/more
> blocks than what used to be there) causes fragmentations and requires
> extra pointers etc... you may soon end up with a 500 block file with 225
> sparse holes and 275 pointers to single blocks (instead of one long
> continuous area with data represented with a single pointer and length).  
> Sure, the file system will likely manage to deal with it - but a) this'll
> be a real filesystem stress test (assuming stuff like this happens in
> every file... you'd have millions of single blocks instead of thousands of
> contiguous areas)) and b) this'll stress code (which hasn't been as
> optimized as the rest) and algorithms (which aren't fast to begin with).  
> In other words you are likely to hit fs bugs and slowdowns.  I'm not
> saying this isn't the best way to do it - but, you may be required to
> invest significant time into making sparse file handling work _well_ in
> extreme cases in order for this to work stabily and/or quickly.  And of 
> course if you then change the underlying file system you'll have to start 
> the sparse handling rewrite over from the bottom-up.  That's why I'm not 
> sure whether this shouldn't be done with some other method - a method 
> which would be less likely to cause massive disk fragmentation.

on this topic, bittorrent on linux would also stree the system, as I
believe what it does is first create one huge sparse file (empty) and
then begins to fill in regions.


  reply	other threads:[~2003-12-07  0:12 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03 21:07 partially encrypted filesystem Kallol Biswas
2003-12-03 21:44 ` Richard B. Johnson
2003-12-03 23:20   ` bill davidsen
2003-12-03 21:44 ` Jörn Engel
2003-12-04  0:08   ` Linus Torvalds
2003-12-04  1:25     ` Jeff Garzik
2003-12-04  2:08       ` Linus Torvalds
2003-12-04  3:59       ` H. Peter Anvin
2003-12-04  2:37     ` Charles Manning
2003-12-04 14:17     ` Jörn Engel
2003-12-04 15:20       ` Linus Torvalds
2003-12-04 16:07         ` Phillip Lougher
2003-12-04 17:26         ` Jörn Engel
2003-12-04 18:20           ` Phillip Lougher
2003-12-04 18:40             ` Jörn Engel
2003-12-04 19:41             ` Erez Zadok
2003-12-05 11:20               ` Jörn Engel
2003-12-05 16:16                 ` Erez Zadok
2003-12-05 19:14                   ` Matthew Wilcox
2003-12-05 19:47                     ` Erez Zadok
2003-12-05 20:28                       ` Matthew Wilcox
2003-12-05 21:38                         ` Pat LaVarre
2003-12-06  0:15                         ` Maciej Zenczykowski
2003-12-06  1:35                           ` Pat LaVarre
2003-12-06  2:39                             ` Valdis.Kletnieks
2003-12-06 11:43                             ` Maciej Zenczykowski
2003-12-07  0:04                               ` Shaya Potter [this message]
2003-12-08 14:08                               ` Jörn Engel
2003-12-06  0:50                         ` Phillip Lougher
2003-12-08 11:37                           ` David Woodhouse
2003-12-08 13:44                             ` phillip
2003-12-08 14:07                               ` David Woodhouse
2003-12-10  1:16                               ` [OT?]Re: " Charles Manning
2003-12-10 17:45                                 ` Phillip Lougher
2003-12-09 23:40                             ` Pat LaVarre
2003-12-10  0:07                             ` Pavel Machek
2003-12-10  1:28                               ` Pat LaVarre
2003-12-10  2:13                               ` Charles Manning
2003-12-05 19:58                     ` Pat LaVarre
2003-12-08 11:28             ` David Woodhouse
2003-12-08 13:49               ` phillip
2003-12-04 19:18           ` David Wagner
2003-12-05 13:02             ` Jörn Engel
2003-12-05 17:28               ` Frank v Waveren
2003-12-05 23:59               ` David Wagner
2003-12-19 15:01     ` Rik van Riel
2003-12-04  3:10 ` Valdis.Kletnieks
2003-12-04 18:16 ` Hans Reiser
2003-12-06 19:56 Pat LaVarre
2003-12-06 22:07 ` Maciej Zenczykowski
2003-12-10  3:22 Valient Gough

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=1070755439.4726.3.camel@zaphod \
    --to=spotter@cs.columbia.edu \
    --cc=ezk@cs.sunysb.edu \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=kbiswas@neoscale.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maze@cela.pl \
    --cc=p.lavarre@ieee.org \
    --cc=phillip@lougher.demon.co.uk \
    --cc=willy@debian.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).