<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/btrfs/tests, branch master</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=master</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2016-12-16T18:53:01+00:00</updated>
<entry>
<title>Merge branch 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2016-12-16T18:53:01+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-16T18:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=087a76d390cbb8c0d21ea0cb3672ab4a7bb76362'/>
<id>urn:sha1:087a76d390cbb8c0d21ea0cb3672ab4a7bb76362</id>
<content type='text'>
Pull btrfs updates from Chris Mason:
 "Jeff Mahoney and Dave Sterba have a really nice set of cleanups in
  here, and Christoph pitched in corrections/improvements to make btrfs
  use proper helpers for bio walking instead of doing it by hand.

  There are some key fixes as well, including some long standing bugs
  that took forever to track down in btrfs_drop_extents and during
  balance"

* 'for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (77 commits)
  btrfs: limit async_work allocation and worker func duration
  Revert "Btrfs: adjust len of writes if following a preallocated extent"
  Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors
  btrfs: opencode chunk locking, remove helpers
  btrfs: remove root parameter from transaction commit/end routines
  btrfs: split btrfs_wait_marked_extents into normal and tree log functions
  btrfs: take an fs_info directly when the root is not used otherwise
  btrfs: simplify btrfs_wait_cache_io prototype
  btrfs: convert extent-tree tracepoints to use fs_info
  btrfs: root-&gt;fs_info cleanup, access fs_info-&gt;delayed_root directly
  btrfs: root-&gt;fs_info cleanup, add fs_info convenience variables
  btrfs: root-&gt;fs_info cleanup, update_block_group{,flags}
  btrfs: root-&gt;fs_info cleanup, lock/unlock_chunks
  btrfs: root-&gt;fs_info cleanup, btrfs_calc_{trans,trunc}_metadata_size
  btrfs: pull node/sector/stripe sizes out of root and into fs_info
  btrfs: root-&gt;fs_info cleanup, io_ctl_init
  btrfs: root-&gt;fs_info cleanup, use fs_info-&gt;dev_root everywhere
  btrfs: struct reada_control.root -&gt; reada_control.fs_info
  btrfs: struct btrfsic_state-&gt;root should be an fs_info
  btrfs: alloc_reserved_file_extent trace point should use extent_root
  ...
</content>
</entry>
<entry>
<title>radix-tree: improve multiorder iterators</title>
<updated>2016-12-15T00:04:10+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>mawilcox@microsoft.com</email>
</author>
<published>2016-12-14T23:08:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=148deab223b23734069abcacb5c7118b0e7deadc'/>
<id>urn:sha1:148deab223b23734069abcacb5c7118b0e7deadc</id>
<content type='text'>
This fixes several interlinked problems with the iterators in the
presence of multiorder entries.

1. radix_tree_iter_next() would only advance by one slot, which would
   result in the iterators returning the same entry more than once if
   there were sibling entries.

2. radix_tree_next_slot() could return an internal pointer instead of
   a user pointer if a tagged multiorder entry was immediately followed by
   an entry of lower order.

3. radix_tree_next_slot() expanded to a lot more code than it used to
   when multiorder support was compiled in.  And I wasn't comfortable with
   entry_to_node() being in a header file.

Fixing radix_tree_iter_next() for the presence of sibling entries
necessarily involves examining the contents of the radix tree, so we now
need to pass 'slot' to radix_tree_iter_next(), and we need to change the
calling convention so it is called *before* dropping the lock which
protects the tree.  Also rename it to radix_tree_iter_resume(), as some
people thought it was necessary to call radix_tree_iter_next() each time
around the loop.

radix_tree_next_slot() becomes closer to how it looked before multiorder
support was introduced.  It only checks to see if the next entry in the
chunk is a sibling entry or a pointer to a node; this should be rare
enough that handling this case out of line is not a performance impact
(and such impact is amortised by the fact that the entry we just
processed was a multiorder entry).  Also, radix_tree_next_slot() used to
force a new chunk lookup for untagged entries, which is more expensive
than the out of line sibling entry skipping.

Link: http://lkml.kernel.org/r/1480369871-5271-55-git-send-email-mawilcox@linuxonhyperv.com
Signed-off-by: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Tested-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Konstantin Khlebnikov &lt;koct9i@gmail.com&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Cc: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>btrfs: fix race in btrfs_free_dummy_fs_info()</title>
<updated>2016-12-15T00:04:10+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>mawilcox@microsoft.com</email>
</author>
<published>2016-12-14T23:08:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=b35df27a39f40e39fabf1b1e9569c7b24e1add6a'/>
<id>urn:sha1:b35df27a39f40e39fabf1b1e9569c7b24e1add6a</id>
<content type='text'>
We drop the lock which protects the radix tree, so we must call
radix_tree_iter_next() in order to avoid a modification to the tree
invalidating the iterator state.

Link: http://lkml.kernel.org/r/1480369871-5271-54-git-send-email-mawilcox@linuxonhyperv.com
Signed-off-by: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Tested-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Konstantin Khlebnikov &lt;koct9i@gmail.com&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Cc: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>btrfs: pull node/sector/stripe sizes out of root and into fs_info</title>
<updated>2016-12-06T15:06:58+00:00</updated>
<author>
<name>Jeff Mahoney</name>
<email>jeffm@suse.com</email>
</author>
<published>2016-06-15T13:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=da17066c40472c2d6a1aab7bb0090c3d285531c9'/>
<id>urn:sha1:da17066c40472c2d6a1aab7bb0090c3d285531c9</id>
<content type='text'>
We track the node sizes per-root, but they never vary from the values
in the superblock.  This patch messes with the 80-column style a bit,
but subsequent patches to factor out root-&gt;fs_info into a convenience
variable fix it up again.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: remove constant parameter to memset_extent_buffer and rename it</title>
<updated>2016-11-30T12:45:17+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-11-08T17:09:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=b159fa2808b1b53d784807a48ad95fa809be10b0'/>
<id>urn:sha1:b159fa2808b1b53d784807a48ad95fa809be10b0</id>
<content type='text'>
The only memset we do is to 0, so sink the parameter to the function and
simplify all calls. Rename the function to reflect the behaviour.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fst-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.9</title>
<updated>2016-10-12T20:16:00+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2016-10-12T20:16:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=d9ed71e5457c8c5bf1dc706e06468eab9e2aa87e'/>
<id>urn:sha1:d9ed71e5457c8c5bf1dc706e06468eab9e2aa87e</id>
<content type='text'>
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: tests: uninline member definitions in free_space_extent</title>
<updated>2016-10-03T16:52:15+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-09-23T11:57:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=0e6757859efea6ed919fc37e4ee468634220b2d2'/>
<id>urn:sha1:0e6757859efea6ed919fc37e4ee468634220b2d2</id>
<content type='text'>
The recommended way is to put all members on separate lines.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>btrfs: tests: constify free space extent specs</title>
<updated>2016-10-03T16:52:15+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.com</email>
</author>
<published>2016-09-23T11:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=d2d9ac6aae1b743d729b2e4027d5666b2bc93003'/>
<id>urn:sha1:d2d9ac6aae1b743d729b2e4027d5666b2bc93003</id>
<content type='text'>
We don't change the given extent ranges, mark them const to catch
accidental changes.

Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: expand free space tree sanity tests to catch endianness bug</title>
<updated>2016-10-03T16:52:14+00:00</updated>
<author>
<name>Omar Sandoval</name>
<email>osandov@fb.com</email>
</author>
<published>2016-09-23T00:24:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=781e3bcf0e7632736d7562b52451a2d4fdfa231c'/>
<id>urn:sha1:781e3bcf0e7632736d7562b52451a2d4fdfa231c</id>
<content type='text'>
The free space tree format conversion functions were broken on
big-endian systems, but the sanity tests didn't catch it because all of
the operations were aligned to multiple words. This was meant to catch
any bugs in the extent buffer code's handling of high memory, but it
ended up hiding the endianness bug. Expand the tests to do both
sector-aligned and page-aligned operations.

Tested-by: Chandan Rajendra &lt;chandan@linux.vnet.ibm.com&gt;
Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
<entry>
<title>Btrfs: fix extent buffer bitmap tests on big-endian systems</title>
<updated>2016-10-03T16:52:14+00:00</updated>
<author>
<name>Omar Sandoval</name>
<email>osandov@fb.com</email>
</author>
<published>2016-09-23T00:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=9426ce754fab0f02a45b61402119c57de446ffa3'/>
<id>urn:sha1:9426ce754fab0f02a45b61402119c57de446ffa3</id>
<content type='text'>
The in-memory bitmap code manipulates words and is therefore sensitive
to endianness, while the extent buffer bitmap code addresses bytes and
is byte-order agnostic. Because the byte addressing of the extent buffer
bitmaps is equivalent to a little-endian in-memory bitmap, the extent
buffer bitmap tests fail on big-endian systems.

34b3e6c92af1 ("Btrfs: self-tests: Fix extent buffer bitmap test fail on
BE system") worked around another endianness bug in the tests but missed
this one because ed9e4afdb055 ("Btrfs: self-tests: Execute page
straddling test only when nodesize &lt; PAGE_SIZE") disables this part of
the test on ppc64. That change lost the original meaning of the test,
however. We really want to test that an equivalent series of operations
using the in-memory bitmap API and the extent buffer bitmap API produces
equivalent results.

To fix this, don't use memcmp_extent_buffer() or write_extent_buffer();
do everything bit-by-bit.

Reported-by: Anatoly Pugachev &lt;matorola@gmail.com&gt;
Tested-by: Anatoly Pugachev &lt;matorola@gmail.com&gt;
Tested-by: Feifei Xu &lt;xufeifei@linux.vnet.ibm.com&gt;
Tested-by: Chandan Rajendra &lt;chandan@linux.vnet.ibm.com&gt;
Signed-off-by: Omar Sandoval &lt;osandov@fb.com&gt;
Signed-off-by: David Sterba &lt;dsterba@suse.com&gt;
</content>
</entry>
</feed>
