<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/extent_map.h, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-09-18T20:08:52Z</updated>
<entry>
<title>Btrfs: search for an allocation hint while filling file COW</title>
<updated>2009-09-18T20:08:52Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2009-09-18T20:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b917b7c3be50435fa8257591b964934e917f2d45'/>
<id>urn:sha1:b917b7c3be50435fa8257591b964934e917f2d45</id>
<content type='text'>
The allocator has some nice knobs for sending hints about where
to try and allocate new blocks, but when we're doing file allocations
we're not sending any hint at all.

This commit adds a simple extent map search to see if we can
quickly and easily find a hint for the allocator.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Fix extent replacment race</title>
<updated>2009-09-11T17:31:07Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2009-09-11T16:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1ed835e1ab5795f91b198d08c43e2f56848dcf3'/>
<id>urn:sha1:a1ed835e1ab5795f91b198d08c43e2f56848dcf3</id>
<content type='text'>
Data COW means that whenever we write to a file, we replace any old
extent pointers with new ones.  There was a window where a readpage
might find the old extent pointers on disk and cache them in the
extent_map tree in ram in the middle of a given write replacing them.

Even though both the readpage and the write had their respective bytes
in the file locked, the extent readpage inserts may cover more bytes than
it had locked down.

This commit closes the race by keeping the new extent pinned in the extent
map tree until after the on-disk btree is properly setup with the new
extent pointers.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: switch extent_map to a rw lock</title>
<updated>2009-09-11T17:31:05Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2009-09-02T20:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=890871be854b5f5e43e7ba2475f706209906cc24'/>
<id>urn:sha1:890871be854b5f5e43e7ba2475f706209906cc24</id>
<content type='text'>
There are two main users of the extent_map tree.  The
first is regular file inodes, where it is evenly spread
between readers and writers.

The second is the chunk allocation tree, which maps blocks from
logical addresses to phyiscal ones, and it is 99.99% reads.

The mapping tree is a point of lock contention during heavy IO
workloads, so this commit switches things to a rw lock.

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: Add fallocate support v2</title>
<updated>2008-10-30T18:25:28Z</updated>
<author>
<name>Yan Zheng</name>
</author>
<published>2008-10-30T18:25:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d899e05215178fed903ad0e7fc1cb4d8e0cc0a88'/>
<id>urn:sha1:d899e05215178fed903ad0e7fc1cb4d8e0cc0a88</id>
<content type='text'>
This patch updates btrfs-progs for fallocate support.

fallocate is a little different in Btrfs because we need to tell the
COW system that a given preallocated extent doesn't need to be
cow'd as long as there are no snapshots of it.  This leverages the
-o nodatacow checks.
 
Signed-off-by: Yan Zheng &lt;zheng.yan@oracle.com&gt;

</content>
</entry>
<entry>
<title>Btrfs: update hole handling v2</title>
<updated>2008-10-30T18:19:41Z</updated>
<author>
<name>Yan Zheng</name>
</author>
<published>2008-10-30T18:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9036c10208e1fc496cef7692ba66a78699b360dc'/>
<id>urn:sha1:9036c10208e1fc496cef7692ba66a78699b360dc</id>
<content type='text'>
This patch splits the hole insertion code out of btrfs_setattr
into btrfs_cont_expand and updates btrfs_get_extent to properly
handle the case that file extent items are not continuous.

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

</content>
</entry>
<entry>
<title>Btrfs: Add zlib compression support</title>
<updated>2008-10-29T18:49:59Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-10-29T18:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8b978188c9a0fd3d535c13debd19d522b726f1f'/>
<id>urn:sha1:c8b978188c9a0fd3d535c13debd19d522b726f1f</id>
<content type='text'>
This is a large change for adding compression on reading and writing,
both for inline and regular extents.  It does some fairly large
surgery to the writeback paths.

Compression is off by default and enabled by mount -o compress.  Even
when the -o compress mount option is not used, it is possible to read
compressed extents off the disk.

If compression for a given set of pages fails to make them smaller, the
file is flagged to avoid future compression attempts later.

* While finding delalloc extents, the pages are locked before being sent down
to the delalloc handler.  This allows the delalloc handler to do complex things
such as cleaning the pages, marking them writeback and starting IO on their
behalf.

* Inline extents are inserted at delalloc time now.  This allows us to compress
the data before inserting the inline extent, and it allows us to insert
an inline extent that spans multiple pages.

* All of the in-memory extent representations (extent_map.c, ordered-data.c etc)
are changed to record both an in-memory size and an on disk size, as well
as a flag for compression.

From a disk format point of view, the extent pointers in the file are changed
to record the on disk size of a given extent and some encoding flags.
Space in the disk format is allocated for compression encoding, as well
as encryption and a generic 'other' field.  Neither the encryption or the
'other' field are currently used.

In order to limit the amount of data read for a single random read in the
file, the size of a compressed extent is limited to 128k.  This is a
software only limit, the disk format supports u64 sized compressed extents.

In order to limit the ram consumed while processing extents, the uncompressed
size of a compressed extent is limited to 256k.  This is a software only limit
and will be subject to tuning later.

Checksumming is still done on compressed extents, and it is done on the
uncompressed version of the data.  This way additional encodings can be
layered on without having to figure out which encoding to checksum.

Compression happens at delalloc time, which is basically singled threaded because
it is usually done by a single pdflush thread.  This makes it tricky to
spread the compression load across all the cpus on the box.  We'll have to
look at parallel pdflush walks of dirty inodes at a later time.

Decompression is hooked into readpages and it does spread across CPUs nicely.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Fix some data=ordered related data corruptions</title>
<updated>2008-09-25T15:04:05Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-07-22T15:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f421950f86bf96a11fef932e167ab2e70d4c43a0'/>
<id>urn:sha1:f421950f86bf96a11fef932e167ab2e70d4c43a0</id>
<content type='text'>
Stress testing was showing data checksum errors, most of which were caused
by a lookup bug in the extent_map tree.  The tree was caching the last
pointer returned, and searches would check the last pointer first.

But, search callers also expect the search to return the very first
matching extent in the range, which wasn't always true with the last
pointer usage.

For now, the code to cache the last return value is just removed.  It is
easy to fix, but I think lookups are rare enough that it isn't required anymore.

This commit also replaces do_sync_mapping_range with a local copy of the
related functions.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Keep extent mappings in ram until pending ordered extents are done</title>
<updated>2008-09-25T15:04:05Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-07-18T16:01:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f3c74fb831fa19bafe087e817c0a5ff3883f1ea'/>
<id>urn:sha1:7f3c74fb831fa19bafe087e817c0a5ff3883f1ea</id>
<content type='text'>
It was possible for stale mappings from disk to be used instead of the
new pending ordered extent.  This adds a flag to the extent map struct
to keep it pinned until the pending ordered extent is actually on disk.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: Split the extent_map code into two parts</title>
<updated>2008-09-25T15:03:59Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2008-01-24T21:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1310b2e0cd98eb1348553e69b73827b436dca7b'/>
<id>urn:sha1:d1310b2e0cd98eb1348553e69b73827b436dca7b</id>
<content type='text'>
There is now extent_map for mapping offsets in the file to disk and
extent_io for state tracking, IO submission and extent_bufers.

The new extent_map code shifts from [start,end] pairs to [start,len], and
pushes the locking out into the caller.  This allows a few performance
optimizations and is easier to use.

A number of extent_map usage bugs were fixed, mostly with failing
to remove extent_map entries when changing the file.

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