<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/disk-io.h, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-11-06T08:05:08Z</updated>
<entry>
<title>Merge branch 'for-chris' of git://github.com/sensille/linux into integration</title>
<updated>2011-11-06T08:05:08Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2011-11-06T08:05:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3'/>
<id>urn:sha1:531f4b1ae5e0fc8c9b3f03838218e5ea178f80d3</id>
<content type='text'>
Conflicts:
	fs/btrfs/ctree.h

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: make sure to flush queued bios if write_cache_pages waits</title>
<updated>2011-11-06T08:03:48Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2011-11-01T14:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01d658f2ca3c85c1ffb20b306e30d16197000ce7'/>
<id>urn:sha1:01d658f2ca3c85c1ffb20b306e30d16197000ce7</id>
<content type='text'>
write_cache_pages tries to build up a large bio to stuff down the pipe.
But if it needs to wait for a page lock, it needs to make sure and send
down any pending writes so we don't deadlock with anyone who has the
page lock and is waiting for writeback of things inside the bio.

Dave Sterba triggered this as a deadlock between the autodefrag code and
the extent write_cache_pages

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>btrfs: add READAHEAD extent buffer flag</title>
<updated>2011-10-02T06:47:57Z</updated>
<author>
<name>Arne Jansen</name>
</author>
<published>2011-05-23T12:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab0fff03055d2d1b01a7581badeba18db9c4f55c'/>
<id>urn:sha1:ab0fff03055d2d1b01a7581badeba18db9c4f55c</id>
<content type='text'>
Add a READAHEAD extent buffer flag.
Add a function to trigger a read with this flag set.

Changes v2:
 - use extent buffer flags instead of extent state flags

Changes v5:
 - adapt to changed read_extent_buffer_pages interface
 - don't return eb from reada_tree_block_flagged if it has CORRUPT flag set

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: make a lockdep class for each root</title>
<updated>2011-07-27T16:46:46Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2011-07-26T20:11:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85d4e461117b40eb10722f774566b19bd5e77879'/>
<id>urn:sha1:85d4e461117b40eb10722f774566b19bd5e77879</id>
<content type='text'>
This patch was originally from Tejun Heo.  lockdep complains about the btrfs
locking because we sometimes take btree locks from two different trees at the
same time.  The current classes are based only on level in the btree, which
isn't enough information for lockdep to figure out if the lock is safe.

This patch makes a class for each type of tree, and lumps all the FS trees that
actually have files and directories into the same class.

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cleanups' of git://repo.or.cz/linux-2.6/btrfs-unstable into inode_numbers</title>
<updated>2011-05-22T16:33:42Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2011-05-22T16:33:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=945d8962ceee6bb273365d0bdf42f763225b290f'/>
<id>urn:sha1:945d8962ceee6bb273365d0bdf42f763225b290f</id>
<content type='text'>
Conflicts:
	fs/btrfs/extent-tree.c
	fs/btrfs/free-space-cache.c
	fs/btrfs/inode.c
	fs/btrfs/tree-log.c

Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>btrfs: implement delayed inode items operation</title>
<updated>2011-05-21T13:30:56Z</updated>
<author>
<name>Miao Xie</name>
</author>
<published>2011-04-22T10:12:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=16cdcec736cd214350cdb591bf1091f8beedefa0'/>
<id>urn:sha1:16cdcec736cd214350cdb591bf1091f8beedefa0</id>
<content type='text'>
Changelog V5 -&gt; V6:
- Fix oom when the memory load is high, by storing the delayed nodes into the
  root's radix tree, and letting btrfs inodes go.

Changelog V4 -&gt; V5:
- Fix the race on adding the delayed node to the inode, which is spotted by
  Chris Mason.
- Merge Chris Mason's incremental patch into this patch.
- Fix deadlock between readdir() and memory fault, which is reported by
  Itaru Kitayama.

Changelog V3 -&gt; V4:
- Fix nested lock, which is reported by Itaru Kitayama, by updating space cache
  inode in time.

Changelog V2 -&gt; V3:
- Fix the race between the delayed worker and the task which does delayed items
  balance, which is reported by Tsutomu Itoh.
- Modify the patch address David Sterba's comment.
- Fix the bug of the cpu recursion spinlock, reported by Chris Mason

Changelog V1 -&gt; V2:
- break up the global rb-tree, use a list to manage the delayed nodes,
  which is created for every directory and file, and used to manage the
  delayed directory name index items and the delayed inode item.
- introduce a worker to deal with the delayed nodes.

Compare with Ext3/4, the performance of file creation and deletion on btrfs
is very poor. the reason is that btrfs must do a lot of b+ tree insertions,
such as inode item, directory name item, directory name index and so on.

If we can do some delayed b+ tree insertion or deletion, we can improve the
performance, so we made this patch which implemented delayed directory name
index insertion/deletion and delayed inode update.

Implementation:
- introduce a delayed root object into the filesystem, that use two lists to
  manage the delayed nodes which are created for every file/directory.
  One is used to manage all the delayed nodes that have delayed items. And the
  other is used to manage the delayed nodes which is waiting to be dealt with
  by the work thread.
- Every delayed node has two rb-tree, one is used to manage the directory name
  index which is going to be inserted into b+ tree, and the other is used to
  manage the directory name index which is going to be deleted from b+ tree.
- introduce a worker to deal with the delayed operation. This worker is used
  to deal with the works of the delayed directory name index items insertion
  and deletion and the delayed inode update.
  When the delayed items is beyond the lower limit, we create works for some
  delayed nodes and insert them into the work queue of the worker, and then
  go back.
  When the delayed items is beyond the upper bound, we create works for all
  the delayed nodes that haven't been dealt with, and insert them into the work
  queue of the worker, and then wait for that the untreated items is below some
  threshold value.
- When we want to insert a directory name index into b+ tree, we just add the
  information into the delayed inserting rb-tree.
  And then we check the number of the delayed items and do delayed items
  balance. (The balance policy is above.)
- When we want to delete a directory name index from the b+ tree, we search it
  in the inserting rb-tree at first. If we look it up, just drop it. If not,
  add the key of it into the delayed deleting rb-tree.
  Similar to the delayed inserting rb-tree, we also check the number of the
  delayed items and do delayed items balance.
  (The same to inserting manipulation)
- When we want to update the metadata of some inode, we cached the data of the
  inode into the delayed node. the worker will flush it into the b+ tree after
  dealing with the delayed insertion and deletion.
- We will move the delayed node to the tail of the list after we access the
  delayed node, By this way, we can cache more delayed items and merge more
  inode updates.
- If we want to commit transaction, we will deal with all the delayed node.
- the delayed node will be freed when we free the btrfs inode.
- Before we log the inode items, we commit all the directory name index items
  and the delayed inode update.

I did a quick test by the benchmark tool[1] and found we can improve the
performance of file creation by ~15%, and file deletion by ~20%.

Before applying this patch:
Create files:
        Total files: 50000
        Total time: 1.096108
        Average time: 0.000022
Delete files:
        Total files: 50000
        Total time: 1.510403
        Average time: 0.000030

After applying this patch:
Create files:
        Total files: 50000
        Total time: 0.932899
        Average time: 0.000019
Delete files:
        Total files: 50000
        Total time: 1.215732
        Average time: 0.000024

[1] http://marc.info/?l=linux-btrfs&amp;m=128212635122920&amp;q=p3

Many thanks for Kitayama-san's help!

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Reviewed-by: David Sterba &lt;dave@jikos.cz&gt;
Tested-by: Tsutomu Itoh &lt;t-itoh@jp.fujitsu.com&gt;
Tested-by: Itaru Kitayama &lt;kitayama@cl.bb4u.ne.jp&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>btrfs: remove all unused functions</title>
<updated>2011-05-06T10:34:03Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2011-05-05T10:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2a97a9dbd86eb1ef956bdf20e05c507b32beb96'/>
<id>urn:sha1:f2a97a9dbd86eb1ef956bdf20e05c507b32beb96</id>
<content type='text'>
Remove static and global declarations and/or definitions. Reduces size
of btrfs.ko by ~3.4kB.

  text    data     bss     dec     hex filename
402081    7464     200  409745   64091 btrfs.ko.base
398620    7144     200  405964   631cc btrfs.ko.remove-all

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>btrfs: remove unused function prototypes</title>
<updated>2011-05-04T12:01:26Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2011-05-04T10:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=621496f4fd56195b7b273521f467c2945165481f'/>
<id>urn:sha1:621496f4fd56195b7b273521f467c2945165481f</id>
<content type='text'>
function prototypes without a body

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>Btrfs: forced readonly mounts on errors</title>
<updated>2011-01-17T20:13:08Z</updated>
<author>
<name>liubo</name>
</author>
<published>2011-01-06T11:30:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=acce952b0263825da32cf10489413dec78053347'/>
<id>urn:sha1:acce952b0263825da32cf10489413dec78053347</id>
<content type='text'>
This patch comes from "Forced readonly mounts on errors" ideas.

As we know, this is the first step in being more fault tolerant of disk
corruptions instead of just using BUG() statements.

The major content:
- add a framework for generating errors that should result in filesystems
  going readonly.
- keep FS state in disk super block.
- make sure that all of resource will be freed and released at umount time.
- make sure that fter FS is forced readonly on error, there will be no more
  disk change before FS is corrected. For this, we should stop write operation.

After this patch is applied, the conversion from BUG() to such a framework can
happen incrementally.

Signed-off-by: Liu Bo &lt;liubo2009@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;chris.mason@oracle.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: use async helpers for DIO write checksumming</title>
<updated>2010-05-25T14:34:58Z</updated>
<author>
<name>Chris Mason</name>
</author>
<published>2010-05-25T13:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eaf25d933e64c2bf3c79b83e8820404f36fdfc52'/>
<id>urn:sha1:eaf25d933e64c2bf3c79b83e8820404f36fdfc52</id>
<content type='text'>
The async helper threads offload crc work onto all the
CPUs, and make streaming writes much faster.  This
changes the O_DIRECT write code to use them.  The only
small complication was that we need to pass in the
logical offset in the file for each bio, because we can't
find it in the bio's pages.

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