From: Hans Reiser <reiser@namesys.com>
To: Roy Sigurd Karlsbakk <roy@karlsbakk.net>
Cc: Andreas Dilger <adilger@turbolabs.com>, linux-kernel@vger.kernel.org
Subject: Re: writing a plugin for reiserfs compression
Date: Fri, 02 Nov 2001 02:16:46 +0300 [thread overview]
Message-ID: <3BE1D7DE.3C768CFB@namesys.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0111012218420.3201-100000@mustard.heime.net>
Roy Sigurd Karlsbakk wrote:
>
> > > I just thought there was a patch doing windows nt-like
> > > compress-em-all-realtime-and-get-doomed!
> >
> > I don't know what the actual heuristics for determining which files are
> > compression with the ext2 patch. It is definitely NOT a compressed
> > block device. Files are compressed in chunks (32kB?), so that it is
> > possible to seek and do read-modify-write (e.g. appending to a file)
> > without decompressing the entire file and/or recompressing it. This also
> > protects against block corruption, since you would limit the amount of
> > data lost to the end of the chunk after the bad spot.
>
> But still... Are the files are compressed as they are created/modified on
> the filesystem? My main point was to avoid the compression overhead and
> just decompress the file at access time if it's compressed. Compression
> should (IMO) be done nightly.
>
> Perhaps a file should be decompressed when it's modified and either (a)
> set scheduled to next nightly compression or (b) stay uncompressed the
> next <n> days. I mean - as a file is being modified, the chance is large
> that the file will be accessed pretty soon...
>
> > Yes, definitely disabling compression for a file is good. The "accessed
> > in last 7 days flag" is questionable. This could be determined via the
> > atime on Unix and doesn't need a separate flag. Also, the difference
> > between "do not compress" and "can't compress" is very small. If it is
> > found that the file is incompressible, you could just as easily set the
> > "do not compress" flag.
>
> I agree on the 'accessed in last <n> days'. It'd be better to check atime.
>
> I'd still like to separate 'do not compress' and 'can't compress', as to
> show why the falg has been set - the former is set by the admin and the
> latter by the system.
>
> roy
I think you'll find it easiest to code it such that doing anything to the file
body, reading or writing, decompresses it. Fancier stuff can wait for later
versions.
Hans
next prev parent reply other threads:[~2001-11-01 23:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-01 20:17 writing a plugin for reiserfs compression Roy Sigurd Karlsbakk
2001-11-01 21:14 ` Andreas Dilger
2001-11-01 21:27 ` Roy Sigurd Karlsbakk
2001-11-01 21:37 ` Padraig Brady
2001-11-01 21:43 ` Roy Sigurd Karlsbakk
2001-11-02 9:24 ` Robert Varga
2001-11-01 23:16 ` Hans Reiser [this message]
2001-11-09 23:27 ` Andreas Dilger
-- strict thread matches above, loose matches on Subject: below --
2001-11-01 17:14 Roy Sigurd Karlsbakk
2001-11-01 20:07 ` Andreas Dilger
2001-11-01 23:01 ` Hans Reiser
2001-11-01 23:09 ` Hans Reiser
2001-11-02 9:29 ` Nikita Danilov
2001-11-01 22:54 ` Hans Reiser
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=3BE1D7DE.3C768CFB@namesys.com \
--to=reiser@namesys.com \
--cc=adilger@turbolabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roy@karlsbakk.net \
/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