<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/btrfs/check-integrity.c, branch v3.19.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Btrfs: include vmalloc.h in check-integrity.c</title>
<updated>2014-11-25T14:01:11+00:00</updated>
<author>
<name>Chris Mason</name>
<email>clm@fb.com</email>
</author>
<published>2014-11-25T13:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f608de699ec3dd0618795c42734e5db3b20353d'/>
<id>8f608de699ec3dd0618795c42734e5db3b20353d</id>
<content type='text'>
Fengguang's build monster reported warnings on some arches because we
don't have vmalloc.h included

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Reported-by: fengguang.wu@intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fengguang's build monster reported warnings on some arches because we
don't have vmalloc.h included

Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
Reported-by: fengguang.wu@intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: check-int: don't complain about balanced blocks</title>
<updated>2014-11-21T01:14:30+00:00</updated>
<author>
<name>Stefan Behrens</name>
<email>sbehrens@giantdisaster.de</email>
</author>
<published>2014-10-17T12:10:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cf90c59e680ee83c263a60ee2cd464a7d96cc6d5'/>
<id>cf90c59e680ee83c263a60ee2cd464a7d96cc6d5</id>
<content type='text'>
The xfstest btrfs/014 which tests the balance operation caused that the
check_int module complained that known blocks changed their physical
location. Since this is not an error in this case, only print such
message if the verbose mode was enabled.

Reported-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Tested-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The xfstest btrfs/014 which tests the balance operation caused that the
check_int module complained that known blocks changed their physical
location. Since this is not an error in this case, only print such
message if the verbose mode was enabled.

Reported-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Tested-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: check_int: use the known block location</title>
<updated>2014-11-21T01:14:29+00:00</updated>
<author>
<name>Stefan Behrens</name>
<email>sbehrens@giantdisaster.de</email>
</author>
<published>2014-10-16T15:48:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f382e4653f06f4e285b7800f80e6548e026f90a8'/>
<id>f382e4653f06f4e285b7800f80e6548e026f90a8</id>
<content type='text'>
The xfstest btrfs/014 which tests the balance operation caused issues with
the check_int module. The attempt was made to use btrfs_map_block() to
find the physical location for a written block. However, this was not
at all needed since the location of the written block was known since
a hook to submit_bio() was the reason for entering the check_int module.
Additionally, after a block relocation it happened that btrfs_map_block()
failed causing misleading error messages afterwards.

This patch changes the check_int module to use the known information of
the physical location from the bio.

Reported-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Tested-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The xfstest btrfs/014 which tests the balance operation caused issues with
the check_int module. The attempt was made to use btrfs_map_block() to
find the physical location for a written block. However, this was not
at all needed since the location of the written block was known since
a hook to submit_bio() was the reason for entering the check_int module.
Additionally, after a block relocation it happened that btrfs_map_block()
failed causing misleading error messages afterwards.

This patch changes the check_int module to use the known information of
the physical location from the bio.

Reported-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Tested-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix allocationg memory failure for btrfsic_state structure</title>
<updated>2014-11-21T01:14:28+00:00</updated>
<author>
<name>Shilong Wang</name>
<email>wangshilong1991@gmail.com</email>
</author>
<published>2014-10-10T21:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6b3a4d60dbf7a60b91d810498e8c212f26718efd'/>
<id>6b3a4d60dbf7a60b91d810498e8c212f26718efd</id>
<content type='text'>
size of @btrfsic_state needs more than 2M, it is very likely to
fail allocating memory using kzalloc(). see following mesage:

[91428.902148] Call Trace:
[&lt;ffffffff816f6e0f&gt;] dump_stack+0x4d/0x66
[&lt;ffffffff811b1c7f&gt;] warn_alloc_failed+0xff/0x170
[&lt;ffffffff811b66e1&gt;] __alloc_pages_nodemask+0x951/0xc30
[&lt;ffffffff811fd9da&gt;] alloc_pages_current+0x11a/0x1f0
[&lt;ffffffff811b1e0b&gt;] ? alloc_kmem_pages+0x3b/0xf0
[&lt;ffffffff811b1e0b&gt;] alloc_kmem_pages+0x3b/0xf0
[&lt;ffffffff811d1018&gt;] kmalloc_order+0x18/0x50
[&lt;ffffffff811d1074&gt;] kmalloc_order_trace+0x24/0x140
[&lt;ffffffffa06c097b&gt;] btrfsic_mount+0x8b/0xae0 [btrfs]
[&lt;ffffffff810af555&gt;] ? check_preempt_curr+0x85/0xa0
[&lt;ffffffff810b2de3&gt;] ? try_to_wake_up+0x103/0x430
[&lt;ffffffffa063d200&gt;] open_ctree+0x1bd0/0x2130 [btrfs]
[&lt;ffffffffa060fdde&gt;] btrfs_mount+0x62e/0x8b0 [btrfs]
[&lt;ffffffff811fd9da&gt;] ? alloc_pages_current+0x11a/0x1f0
[&lt;ffffffff811b0a5e&gt;] ? __get_free_pages+0xe/0x50
[&lt;ffffffff81230429&gt;] mount_fs+0x39/0x1b0
[&lt;ffffffff812509fb&gt;] vfs_kern_mount+0x6b/0x150
[&lt;ffffffff812537fb&gt;] do_mount+0x27b/0xc30
[&lt;ffffffff811b0a5e&gt;] ? __get_free_pages+0xe/0x50
[&lt;ffffffff812544f6&gt;] SyS_mount+0x96/0xf0
[&lt;ffffffff81701970&gt;] system_call_fastpath+0x16/0x1b

Since we are allocating memory for hash table array, so
it will be good if we could allocate continuous pages here.

Fix this problem by firstly trying kzalloc(), if we fail,
use vzalloc() instead.

Signed-off-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
size of @btrfsic_state needs more than 2M, it is very likely to
fail allocating memory using kzalloc(). see following mesage:

[91428.902148] Call Trace:
[&lt;ffffffff816f6e0f&gt;] dump_stack+0x4d/0x66
[&lt;ffffffff811b1c7f&gt;] warn_alloc_failed+0xff/0x170
[&lt;ffffffff811b66e1&gt;] __alloc_pages_nodemask+0x951/0xc30
[&lt;ffffffff811fd9da&gt;] alloc_pages_current+0x11a/0x1f0
[&lt;ffffffff811b1e0b&gt;] ? alloc_kmem_pages+0x3b/0xf0
[&lt;ffffffff811b1e0b&gt;] alloc_kmem_pages+0x3b/0xf0
[&lt;ffffffff811d1018&gt;] kmalloc_order+0x18/0x50
[&lt;ffffffff811d1074&gt;] kmalloc_order_trace+0x24/0x140
[&lt;ffffffffa06c097b&gt;] btrfsic_mount+0x8b/0xae0 [btrfs]
[&lt;ffffffff810af555&gt;] ? check_preempt_curr+0x85/0xa0
[&lt;ffffffff810b2de3&gt;] ? try_to_wake_up+0x103/0x430
[&lt;ffffffffa063d200&gt;] open_ctree+0x1bd0/0x2130 [btrfs]
[&lt;ffffffffa060fdde&gt;] btrfs_mount+0x62e/0x8b0 [btrfs]
[&lt;ffffffff811fd9da&gt;] ? alloc_pages_current+0x11a/0x1f0
[&lt;ffffffff811b0a5e&gt;] ? __get_free_pages+0xe/0x50
[&lt;ffffffff81230429&gt;] mount_fs+0x39/0x1b0
[&lt;ffffffff812509fb&gt;] vfs_kern_mount+0x6b/0x150
[&lt;ffffffff812537fb&gt;] do_mount+0x27b/0xc30
[&lt;ffffffff811b0a5e&gt;] ? __get_free_pages+0xe/0x50
[&lt;ffffffff812544f6&gt;] SyS_mount+0x96/0xf0
[&lt;ffffffff81701970&gt;] system_call_fastpath+0x16/0x1b

Since we are allocating memory for hash table array, so
it will be good if we could allocate continuous pages here.

Fix this problem by firstly trying kzalloc(), if we fail,
use vzalloc() instead.

Signed-off-by: Wang Shilong &lt;wangshilong1991@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: fix wrong disk size when writing super blocks</title>
<updated>2014-09-17T20:38:33+00:00</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2014-09-03T13:35:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=935e5cc935bcbf9b3d0dd59fed7dbc0f2ebca6bc'/>
<id>935e5cc935bcbf9b3d0dd59fed7dbc0f2ebca6bc</id>
<content type='text'>
total_size will be changed when resizing a device, and disk_total_size
will be changed if resizing is successful. Meanwhile, the on-disk super
blocks of the previous transaction might not be updated. Considering
the consistency of the metadata in the previous transaction, We should
use the size in the previous transaction to check if the super block is
beyond the boundary of the device. Fix it.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
total_size will be changed when resizing a device, and disk_total_size
will be changed if resizing is successful. Meanwhile, the on-disk super
blocks of the previous transaction might not be updated. Considering
the consistency of the metadata in the previous transaction, We should
use the size in the previous transaction to check if the super block is
beyond the boundary of the device. Fix it.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: use DIV_ROUND_UP instead of open-coded variants</title>
<updated>2014-09-17T20:37:17+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-06-04T23:59:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed6078f70335f158ca79790a0d0708ce558a6e9a'/>
<id>ed6078f70335f158ca79790a0d0708ce558a6e9a</id>
<content type='text'>
The form

  (value + PAGE_CACHE_SIZE - 1) &gt;&gt; PAGE_CACHE_SHIFT

is equivalent to

  (value + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE

The rest is a simple subsitution, no difference in the generated
assembly code.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The form

  (value + PAGE_CACHE_SIZE - 1) &gt;&gt; PAGE_CACHE_SHIFT

is equivalent to

  (value + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE

The rest is a simple subsitution, no difference in the generated
assembly code.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: use nodesize everywhere, kill leafsize</title>
<updated>2014-09-17T20:37:14+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-06-04T17:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=707e8a071528385a87b63a72a37c2322e463c7b8'/>
<id>707e8a071528385a87b63a72a37c2322e463c7b8</id>
<content type='text'>
The nodesize and leafsize were never of different values. Unify the
usage and make nodesize the one. Cleanup the redundant checks and
helpers.

Shaves a few bytes from .text:

  text    data     bss     dec     hex filename
852418   24560   23112  900090   dbbfa btrfs.ko.before
851074   24584   23112  898770   db6d2 btrfs.ko.after

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The nodesize and leafsize were never of different values. Unify the
usage and make nodesize the one. Cleanup the redundant checks and
helpers.

Shaves a few bytes from .text:

  text    data     bss     dec     hex filename
852418   24560   23112  900090   dbbfa btrfs.ko.before
851074   24584   23112  898770   db6d2 btrfs.ko.after

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btrfs: check_int: propagate out-of-memory error upwards</title>
<updated>2014-06-10T00:20:21+00:00</updated>
<author>
<name>Stefan Behrens</name>
<email>sbehrens@giantdisaster.de</email>
</author>
<published>2014-05-09T13:28:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=98806b446db8f15e83b59d065dae62901138e5cb'/>
<id>98806b446db8f15e83b59d065dae62901138e5cb</id>
<content type='text'>
This issue was not causing any harm but IMO (and in the opinion of the
static code checker) it is better to propagate this error status upwards.

Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This issue was not causing any harm but IMO (and in the opinion of the
static code checker) it is better to propagate this error status upwards.

Signed-off-by: Stefan Behrens &lt;sbehrens@giantdisaster.de&gt;
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs</title>
<updated>2014-02-04T20:26:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-02-04T20:26:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=878a876b2e10888afe53766dcca33f723ae20edc'/>
<id>878a876b2e10888afe53766dcca33f723ae20edc</id>
<content type='text'>
Pull btrfs fixes from Chris Mason:
 "Filipe is fixing compile and boot problems with our crc32c rework, and
  Josef has disabled snapshot aware defrag for now.

  As the number of snapshots increases, we're hitting OOM.  For the
  short term we're disabling things until a bigger fix is ready"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: use late_initcall instead of module_init
  Btrfs: use btrfs_crc32c everywhere instead of libcrc32c
  Btrfs: disable snapshot aware defrag for now
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull btrfs fixes from Chris Mason:
 "Filipe is fixing compile and boot problems with our crc32c rework, and
  Josef has disabled snapshot aware defrag for now.

  As the number of snapshots increases, we're hitting OOM.  For the
  short term we're disabling things until a bigger fix is ready"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: use late_initcall instead of module_init
  Btrfs: use btrfs_crc32c everywhere instead of libcrc32c
  Btrfs: disable snapshot aware defrag for now
</pre>
</div>
</content>
</entry>
<entry>
<title>Btrfs: use btrfs_crc32c everywhere instead of libcrc32c</title>
<updated>2014-02-03T17:01:27+00:00</updated>
<author>
<name>Filipe David Borba Manana</name>
<email>fdmanana@gmail.com</email>
</author>
<published>2014-01-29T21:06:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b947aff1599afbbd2ec07ada87b05af0f94cf10'/>
<id>0b947aff1599afbbd2ec07ada87b05af0f94cf10</id>
<content type='text'>
After the commit titled "Btrfs: fix btrfs boot when compiled as built-in",
LIBCRC32C requirement was removed from btrfs' Kconfig. This made it not
possible to build a kernel with btrfs enabled (either as module or built-in)
if libcrc32c is not enabled as well. So just replace all uses of libcrc32c
with the equivalent function in btrfs hash.h - btrfs_crc32c.

Signed-off-by: Filipe David Borba Manana &lt;fdmanana@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After the commit titled "Btrfs: fix btrfs boot when compiled as built-in",
LIBCRC32C requirement was removed from btrfs' Kconfig. This made it not
possible to build a kernel with btrfs enabled (either as module or built-in)
if libcrc32c is not enabled as well. So just replace all uses of libcrc32c
with the equivalent function in btrfs hash.h - btrfs_crc32c.

Signed-off-by: Filipe David Borba Manana &lt;fdmanana@gmail.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
