From: Spelic <spelic@shiftmail.org>
To: C Anthony Risinger <anthony@extof.me>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [GIT PULL] Btrfs updates
Date: Wed, 19 Jan 2011 10:15:44 +0100 [thread overview]
Message-ID: <4D36ABC0.1060109@shiftmail.org> (raw)
In-Reply-To: <AANLkTimDGtzw9GSC7FigFsKO+w9cO30LUZ2=XK0aK9Hj@mail.gmail.com>
On 01/18/2011 04:22 PM, C Anthony Risinger wrote:
> On Tue, Jan 18, 2011 at 4:14 AM, Felix Blanke<felixblanke@gmail.com> wrote:
>
>
> i don't know about the readonly snapshots, but the LZO stuff is a
> mount option; should be in the pull.
>
> and for the record, i'm totally stoked to run LZO on all my btrfs
> machines (esp. the netbooks/SSDs :-)
>
Excuse the newbie question: how does Btrfs deal with the compressed data
not being block aligned anymore?
E.g. suppose you have a LZO compressed file, then a program rewrites
some data which is in the middle of the file, and suppose the newly
written data is less compressible.
Btrfs is a copy-on-write FS so this simplifies things a bit,
nevertheless it has to support the fact that after the rewrite there
will in general be 2 or 3 blocks in the middle of the file which are not
completely full: probably the one where old data ends and new data
starts will be truncated, a few new blocks will be allocated for newly
written data (which won't in general end at a block bounday so this is
the second block which is not completely full) and then the place where
old data restarts will again be not a full block.
Is btrfs capable of that? If yes, calculating offsets in files for
random reads is going to be quite a bit slower...
Also, if yes, this could significantly impact data deduplication, in
both positive and negative ways:
positive: (with a lot of work) btrfs could detect and merge equal parts
at different offsets in different files, even not block aligned.
negative: (without a lot of work) if for some reason one of the first
blocks in a file gets truncated and all the rest of the file gets hence
shifted forward (but this could probably happen only during the first
write of that file, maybe if lzo was turned on and then off again), data
deduplication won't probably work for that file... ok this might not be
big issue.
next prev parent reply other threads:[~2011-01-19 9:15 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-17 21:13 [GIT PULL] Btrfs updates Chris Mason
2011-01-18 10:14 ` Felix Blanke
2011-01-18 15:22 ` C Anthony Risinger
2011-01-18 17:56 ` Mitch Harder
2011-01-18 18:51 ` C Anthony Risinger
2011-01-19 9:15 ` Spelic [this message]
2011-01-22 23:41 ` Clemens Eisserer
2011-01-22 23:53 ` cwillu
2011-01-18 18:55 ` Goffredo Baroncelli
2011-03-09 22:01 ` Diego Calleja
-- strict thread matches above, loose matches on Subject: below --
2013-05-18 14:30 Chris Mason
2013-03-29 17:47 Chris Mason
2013-03-09 0:38 Chris Mason
2013-02-16 1:55 Chris Mason
2012-12-17 21:44 Chris Mason
2012-12-19 18:09 ` Roy Sigurd Karlsbakk
2012-12-19 19:07 ` Hugo Mills
2012-12-17 21:28 Chris Mason
2012-08-29 16:01 Chris Mason
2012-07-05 19:55 Chris Mason
2012-06-21 15:47 Chris Mason
2012-06-15 18:09 Chris Mason
2012-06-15 23:57 ` Linus Torvalds
2012-06-16 0:21 ` Chris Mason
2012-06-01 13:18 Chris Mason
2012-04-13 13:38 Chris Mason
2012-04-16 1:19 ` Tsutomu Itoh
2012-03-10 2:01 Chris Mason
2012-02-24 16:41 Chris Mason
2011-12-01 15:39 Chris Mason
2011-12-05 8:10 ` Miao Xie
2011-12-05 13:14 ` Chris Mason
2011-12-05 14:08 ` David Sterba
2011-12-06 3:25 ` Miao Xie
2011-08-18 18:04 Chris Mason
2011-08-18 21:51 ` Sage Weil
2011-08-20 14:01 ` Chris Mason
2011-07-27 22:46 Chris Mason
2011-06-27 18:15 Chris Mason
2011-06-20 1:12 Chris Mason
2011-06-12 11:57 Chris Mason
2011-06-12 18:08 ` Linus Torvalds
2011-06-13 1:02 ` Andi Kleen
2011-06-13 1:02 ` Andi Kleen
2011-06-13 1:52 ` Chris Mason
2011-06-13 1:52 ` Chris Mason
2011-06-13 2:05 ` Li Zefan
2011-06-13 2:05 ` Li Zefan
2011-06-04 14:37 Chris Mason
2011-05-27 19:55 Chris Mason
2011-05-27 21:44 ` Chester
2011-05-27 21:44 ` Chester
2011-05-15 14:47 Chris Mason
2011-05-15 15:41 ` kehon
2011-04-26 14:24 Chris Mason
2011-04-18 14:26 Chris Mason
2011-02-15 3:49 Chris Mason
2011-02-07 20:12 Chris Mason
2011-02-08 20:05 ` Helmut Hullen
2010-12-14 1:54 Chris Mason
2010-05-27 15:15 Chris Mason
2010-05-27 17:18 ` Linus Torvalds
2010-05-27 17:32 ` Chris Mason
2010-05-27 17:47 ` Linus Torvalds
2010-06-02 2:59 ` Miao Xie
2010-09-12 12:38 ` Felipe Contreras
2010-09-12 12:38 ` Felipe Contreras
2010-09-12 12:38 ` Felipe Contreras
2010-04-05 19:36 Chris Mason
2010-04-06 15:40 ` Chris Mason
2010-03-15 19:18 Chris Mason
2010-03-16 21:01 ` Chris Mason
2010-03-18 16:59 ` Chris Mason
2009-10-15 0:06 Chris Mason
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=4D36ABC0.1060109@shiftmail.org \
--to=spelic@shiftmail.org \
--cc=anthony@extof.me \
--cc=linux-btrfs@vger.kernel.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 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.