<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/delayed-ref.c, branch linux-3.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-03-22T00:45:34Z</updated>
<entry>
<title>btrfs: return void in functions without error conditions</title>
<updated>2012-03-22T00:45:34Z</updated>
<author>
<name>Jeff Mahoney</name>
</author>
<published>2012-03-01T13:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=143bede527b054a271053f41bfaca2b57baa9408'/>
<id>urn:sha1:143bede527b054a271053f41bfaca2b57baa9408</id>
<content type='text'>
Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: Fix kfree of member instead of structure</title>
<updated>2012-03-22T00:45:30Z</updated>
<author>
<name>Jeff Mahoney</name>
</author>
<published>2011-10-04T03:23:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cddcd800189bc03745d576f913dc57692c6f439a'/>
<id>urn:sha1:cddcd800189bc03745d576f913dc57692c6f439a</id>
<content type='text'>
Correctness fix: The kfree calls in the add_delayed_* functions free
the node that's passed into it, but the node is a member of another
structure. It works because it's always the first member of the
containing structure, but it should really be using the containing
structure itself.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: add waitqueue instead of doing busy waiting for more delayed refs</title>
<updated>2012-01-04T15:12:48Z</updated>
<author>
<name>Jan Schmidt</name>
</author>
<published>2011-12-12T15:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a168650c08300434e1456abe7b6451f1448230d3'/>
<id>urn:sha1:a168650c08300434e1456abe7b6451f1448230d3</id>
<content type='text'>
Now that we may be holding back delayed refs for a limited period, we
might end up having no runnable delayed refs. Without this commit, we'd
do busy waiting in that thread until another (runnable) ref arives.
Instead, we're detecting this situation and use a waitqueue, such that
we only try to run more refs after
	a) another runnable ref was added  or
	b) delayed refs are no longer held back

Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: put back delayed refs that are too new</title>
<updated>2012-01-04T15:12:45Z</updated>
<author>
<name>Arne Jansen</name>
</author>
<published>2011-09-13T13:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1270cd91f308c9d22b2804720c36ccd32dbc35e'/>
<id>urn:sha1:d1270cd91f308c9d22b2804720c36ccd32dbc35e</id>
<content type='text'>
When processing a delayed ref, first check if there are still old refs in
the process of being added. If so, put this ref back to the tree. To avoid
looping on this ref, choose a newer one in the next loop.
btrfs_find_ref_cluster has to take care of that.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: add sequence numbers to delayed refs</title>
<updated>2012-01-04T15:12:42Z</updated>
<author>
<name>Arne Jansen</name>
</author>
<published>2011-09-14T10:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00f04b88791ff49dc64ada18819d40a5b0671709'/>
<id>urn:sha1:00f04b88791ff49dc64ada18819d40a5b0671709</id>
<content type='text'>
Sequence numbers are needed to reconstruct the backrefs of a given extent to
a certain point in time. The total set of backrefs consist of the set of
backrefs recorded on disk plus the enqueued delayed refs for it that existed
at that moment.

This patch also adds a list that records all delayed refs which are
currently in the process of being added.

When walking all refs of an extent in btrfs_find_all_roots(), we freeze the
current state of delayed refs, honor anythinh up to this point and prevent
processing newer delayed refs to assert consistency.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: always save ref_root in delayed refs</title>
<updated>2011-12-22T15:22:28Z</updated>
<author>
<name>Arne Jansen</name>
</author>
<published>2011-09-14T12:01:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eebe063b7f916087cd5c61de57b20a3a30894a96'/>
<id>urn:sha1:eebe063b7f916087cd5c61de57b20a3a30894a96</id>
<content type='text'>
For consistent backref walking and (later) qgroup calculation the
information to which root a delayed ref belongs is useful even for shared
refs.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>Btrfs: mark delayed refs as for cow</title>
<updated>2011-12-22T15:22:27Z</updated>
<author>
<name>Arne Jansen</name>
</author>
<published>2011-09-12T13:26:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=66d7e7f09f77456fe68683247d77721032a00ee5'/>
<id>urn:sha1:66d7e7f09f77456fe68683247d77721032a00ee5</id>
<content type='text'>
Add a for_cow parameter to add_delayed_*_ref and pass the appropriate value
from every call site. The for_cow parameter will later on be used to
determine if a ref will change anything with respect to qgroups.

Delayed refs coming from relocation are always counted as for_cow, as they
don't change subvol quota.

Also pass in the fs_info for later use.

btrfs_find_all_roots() will use this as an optimization, as changes that are
for_cow will not change anything with respect to which root points to a
certain leaf. Thus, we don't need to add the current sequence number to
those delayed refs.

Signed-off-by: Arne Jansen &lt;sensille@gmx.net&gt;
Signed-off-by: Jan Schmidt &lt;list.btrfs@jan-o-sch.net&gt;
</content>
</entry>
<entry>
<title>btrfs: remove old unused commented out code</title>
<updated>2011-05-06T10:34:10Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2011-05-05T11:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=182608c8294b5fe90d7bbd4b026c82bf0a24b736'/>
<id>urn:sha1:182608c8294b5fe90d7bbd4b026c82bf0a24b736</id>
<content type='text'>
Remove code which has been #if0-ed out for a very long time and does not
seem to be related to current codebase anymore.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&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: add initial tracepoint support for btrfs</title>
<updated>2011-03-28T09:37:33Z</updated>
<author>
<name>liubo</name>
</author>
<published>2011-03-24T11:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1abe9b8a138c9988ba8f7bfded6453649a31541f'/>
<id>urn:sha1:1abe9b8a138c9988ba8f7bfded6453649a31541f</id>
<content type='text'>
Tracepoints can provide insight into why btrfs hits bugs and be greatly
helpful for debugging, e.g
              dd-7822  [000]  2121.641088: btrfs_inode_request: root = 5(FS_TREE), gen = 4, ino = 256, blocks = 8, disk_i_size = 0, last_trans = 8, logged_trans = 0
              dd-7822  [000]  2121.641100: btrfs_inode_new: root = 5(FS_TREE), gen = 8, ino = 257, blocks = 0, disk_i_size = 0, last_trans = 0, logged_trans = 0
 btrfs-transacti-7804  [001]  2146.935420: btrfs_cow_block: root = 2(EXTENT_TREE), refs = 2, orig_buf = 29368320 (orig_level = 0), cow_buf = 29388800 (cow_level = 0)
 btrfs-transacti-7804  [001]  2146.935473: btrfs_cow_block: root = 1(ROOT_TREE), refs = 2, orig_buf = 29364224 (orig_level = 0), cow_buf = 29392896 (cow_level = 0)
 btrfs-transacti-7804  [001]  2146.972221: btrfs_transaction_commit: root = 1(ROOT_TREE), gen = 8
   flush-btrfs-2-7821  [001]  2155.824210: btrfs_chunk_alloc: root = 3(CHUNK_TREE), offset = 1103101952, size = 1073741824, num_stripes = 1, sub_stripes = 0, type = DATA
   flush-btrfs-2-7821  [001]  2155.824241: btrfs_cow_block: root = 2(EXTENT_TREE), refs = 2, orig_buf = 29388800 (orig_level = 0), cow_buf = 29396992 (cow_level = 0)
   flush-btrfs-2-7821  [001]  2155.824255: btrfs_cow_block: root = 4(DEV_TREE), refs = 2, orig_buf = 29372416 (orig_level = 0), cow_buf = 29401088 (cow_level = 0)
   flush-btrfs-2-7821  [000]  2155.824329: btrfs_cow_block: root = 3(CHUNK_TREE), refs = 2, orig_buf = 20971520 (orig_level = 0), cow_buf = 20975616 (cow_level = 0)
 btrfs-endio-wri-7800  [001]  2155.898019: btrfs_cow_block: root = 5(FS_TREE), refs = 2, orig_buf = 29384704 (orig_level = 0), cow_buf = 29405184 (cow_level = 0)
 btrfs-endio-wri-7800  [001]  2155.898043: btrfs_cow_block: root = 7(CSUM_TREE), refs = 2, orig_buf = 29376512 (orig_level = 0), cow_buf = 29409280 (cow_level = 0)

Here is what I have added:

1) ordere_extent:
        btrfs_ordered_extent_add
        btrfs_ordered_extent_remove
        btrfs_ordered_extent_start
        btrfs_ordered_extent_put

These provide critical information to understand how ordered_extents are
updated.

2) extent_map:
        btrfs_get_extent

extent_map is used in both read and write cases, and it is useful for tracking
how btrfs specific IO is running.

3) writepage:
        __extent_writepage
        btrfs_writepage_end_io_hook

Pages are cirtical resourses and produce a lot of corner cases during writeback,
so it is valuable to know how page is written to disk.

4) inode:
        btrfs_inode_new
        btrfs_inode_request
        btrfs_inode_evict

These can show where and when a inode is created, when a inode is evicted.

5) sync:
        btrfs_sync_file
        btrfs_sync_fs

These show sync arguments.

6) transaction:
        btrfs_transaction_commit

In transaction based filesystem, it will be useful to know the generation and
who does commit.

7) back reference and cow:
	btrfs_delayed_tree_ref
	btrfs_delayed_data_ref
	btrfs_delayed_ref_head
	btrfs_cow_block

Btrfs natively supports back references, these tracepoints are helpful on
understanding btrfs's COW mechanism.

8) chunk:
	btrfs_chunk_alloc
	btrfs_chunk_free

Chunk is a link between physical offset and logical offset, and stands for space
infomation in btrfs, and these are helpful on tracing space things.

9) reserved_extent:
	btrfs_reserved_extent_alloc
	btrfs_reserved_extent_free

These can show how btrfs uses its space.

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