<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/compression.c, branch linux-2.6.30.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.30.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-01-21T15:49:16Z</updated>
<entry>
<title>Btrfs: removed unused #include &lt;version.h&gt;'s</title>
<updated>2009-01-21T15:49:16Z</updated>
<author>
<name>Huang Weiyi</name>
</author>
<published>2009-01-21T15:49:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7eaebe7d503c3ef240ac7b3efc5433fe647c0298'/>
<id>urn:sha1:7eaebe7d503c3ef240ac7b3efc5433fe647c0298</id>
<content type='text'>
Removed unused #include &lt;version.h&gt;'s in btrfs

Signed-off-by: Huang Weiyi &lt;weiyi.huang@gmail.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</content>
</entry>
<entry>
<title>Btrfs: Fix checkpatch.pl warnings</title>
<updated>2009-01-06T02:25:51Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2009-01-06T02:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d397712bcc6a759a560fd247e6053ecae091f958'/>
<id>urn:sha1:d397712bcc6a759a560fd247e6053ecae091f958</id>
<content type='text'>
There were many, most are fixed now.  struct-funcs.c generates some warnings
but these are bogus.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix nodatasum handling in balancing code</title>
<updated>2008-12-12T15:03:38Z</updated>
<author>
<name>Yan Zheng</name>
</author>
<published>2008-12-12T15:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17d217fe970d34720f4f1633dca73a6aa2f3d9d1'/>
<id>urn:sha1:17d217fe970d34720f4f1633dca73a6aa2f3d9d1</id>
<content type='text'>
Checksums on data can be disabled by mount option, so it's
possible some data extents don't have checksums or have
invalid checksums. This causes trouble for data relocation.
This patch contains following things to make data relocation
work.

1) make nodatasum/nodatacow mount option only affects new
files. Checksums and COW on data are only controlled by the
inode flags.

2) check the existence of checksum in the nodatacow checker.
If checksums exist, force COW the data extent. This ensure that
checksum for a given block is either valid or does not exist.

3) update data relocation code to properly handle the case
of checksum missing.

Signed-off-by: Yan Zheng &lt;zheng.yan@oracle.com&gt;

</content>
</entry>
<entry>
<title>Btrfs: move data checksumming into a dedicated tree</title>
<updated>2008-12-08T21:58:54Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-12-08T21:58:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d20f7043fa65659136c1a7c3c456eeeb5c6f431f'/>
<id>urn:sha1:d20f7043fa65659136c1a7c3c456eeeb5c6f431f</id>
<content type='text'>
Btrfs stores checksums for each data block.  Until now, they have
been stored in the subvolume trees, indexed by the inode that is
referencing the data block.  This means that when we read the inode,
we've probably read in at least some checksums as well.

But, this has a few problems:

* The checksums are indexed by logical offset in the file.  When
compression is on, this means we have to do the expensive checksumming
on the uncompressed data.  It would be faster if we could checksum
the compressed data instead.

* If we implement encryption, we'll be checksumming the plain text and
storing that on disk.  This is significantly less secure.

* For either compression or encryption, we have to get the plain text
back before we can verify the checksum as correct.  This makes the raid
layer balancing and extent moving much more expensive.

* It makes the front end caching code more complex, as we have touch
the subvolume and inodes as we cache extents.

* There is potentitally one copy of the checksum in each subvolume
referencing an extent.

The solution used here is to store the extent checksums in a dedicated
tree.  This allows us to index the checksums by phyiscal extent
start and length.  It means:

* The checksum is against the data stored on disk, after any compression
or encryption is done.

* The checksum is stored in a central location, and can be verified without
following back references, or reading inodes.

This makes compression significantly faster by reducing the amount of
data that needs to be checksummed.  It will also allow much faster
raid management code in general.

The checksums are indexed by a key with a fixed objectid (a magic value
in ctree.h) and offset set to the starting byte of the extent.  This
allows us to copy the checksum items into the fsync log tree directly (or
any other tree), without having to invent a second format for them.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: compat code fixes</title>
<updated>2008-11-20T15:22:27Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-11-20T15:22:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b4e25f2a6ddb070bab7f7dd2bd2926fb8db9e04'/>
<id>urn:sha1:4b4e25f2a6ddb070bab7f7dd2bd2926fb8db9e04</id>
<content type='text'>
The btrfs git kernel trees is used to build a standalone tree for
compiling against older kernels.  This commit makes the standalone tree
work with 2.6.27

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Fixes for 2.6.28-rc API changes</title>
<updated>2008-11-20T02:17:22Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-11-20T02:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=15916de835a683bd8133a0d1ac0c982b795ab4ff'/>
<id>urn:sha1:15916de835a683bd8133a0d1ac0c982b795ab4ff</id>
<content type='text'>
* open/close_bdev_excl -&gt; open/close_bdev_exclusive
* blkdev_issue_discard takes a GFP mask now
* Fix blkdev_issue_discard usage now that it is enabled

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Fix compile warnings on 32 bit machines</title>
<updated>2008-11-11T14:34:41Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-11-11T14:34:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5b050f04c8ce911c5b6831305a24d70eab95e732'/>
<id>urn:sha1:5b050f04c8ce911c5b6831305a24d70eab95e732</id>
<content type='text'>
Simple casting here and there to fix things up.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;

</content>
</entry>
<entry>
<title>Btrfs: Fix use after free during compressed reads</title>
<updated>2008-11-10T16:44:58Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-11-10T16:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e04ca626baee684bea9d6239e4e1119b696101b2'/>
<id>urn:sha1:e04ca626baee684bea9d6239e4e1119b696101b2</id>
<content type='text'>
Yan's fix to use the correct file offset during compressed reads used the
extent_map struct pointer after it had been freed.  This saves the
fields we want for later use instead.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Fix csum error for compressed data</title>
<updated>2008-11-10T12:34:43Z</updated>
<author>
<name>Yan Zheng</name>
</author>
<published>2008-11-10T12:34:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff5b7ee33d82414bf4baf299c21fb703bcc89629'/>
<id>urn:sha1:ff5b7ee33d82414bf4baf299c21fb703bcc89629</id>
<content type='text'>
The decompress code doesn't take the logical offset in extent
pointer into account. If the logical offset isn't zero, data
will be decompressed into wrong pages.

The solution used here is to record the starting offset of the extent
in the file separately from the logical start of the extent_map struct.
This allows us to avoid problems inserting overlapping extents.

Signed-off-by: Yan Zheng &lt;zheng.yan@oracle.com&gt;

</content>
</entry>
<entry>
<title>Btrfs: make sure compressed bios don't complete too soon</title>
<updated>2008-11-07T17:35:44Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-11-07T17:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af09abfece59aa50bfbf16f6f1f85822554e061f'/>
<id>urn:sha1:af09abfece59aa50bfbf16f6f1f85822554e061f</id>
<content type='text'>
When writing a compressed extent, a number of bios are created that
point to a single struct compressed_bio.  At end_io time an atomic counter in
the compressed_bio struct makes sure that all of the bios have finished
before final end_io processing is done.

But when multiple bios are needed to write a compressed extent, the
counter was being incremented after the first bio was sent to submit_bio.
It is possible the bio will complete before the counter is incremented,
making the end_io handler free the compressed_bio struct before
processing is finished.

The fix is to increment the atomic counter before bio submission,
both for compressed reads and writes.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
</feed>
