<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/btrfs/sysfs.c, branch linux-3.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.17.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-08-21T14:55:20Z</updated>
<entry>
<title>Btrfs: fix regression of btrfs device replace</title>
<updated>2014-08-21T14:55:20Z</updated>
<author>
<name>Liu Bo</name>
</author>
<published>2014-07-29T11:09:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=87fa3bb0786f37dff0b92f2c38421dd56d8902a9'/>
<id>urn:sha1:87fa3bb0786f37dff0b92f2c38421dd56d8902a9</id>
<content type='text'>
Commit 49c6f736f34f901117c20960ebd7d5e60f12fcac(
btrfs: dev replace should replace the sysfs entry) added the missing sysfs entry
in the process of device replace, but didn't take missing devices into account,
so now we have

BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
IP: [&lt;ffffffffa0268551&gt;] btrfs_kobj_rm_device+0x21/0x40 [btrfs]
...

To reproduce it,
1. mkfs.btrfs -f disk1 disk2
2. mkfs.ext4 disk1
3. mount disk2 /mnt -odegraded
4. btrfs replace start -B 1 disk3 /mnt
--------------------------

This fixes the problem.

Reported-by: Chris Murphy &lt;lists@colorremedies.com&gt;
Signed-off-by: Liu Bo &lt;bo.li.liu@oracle.com&gt;
Reviewed-by: Satoru Takeuchi &lt;takeuchi_satoru@jp.fujitsu.com&gt;
Tested-by: Satoru Takeuchi &lt;takeuchi_satoru@jp.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: dev add should add its sysfs entry</title>
<updated>2014-06-28T20:48:43Z</updated>
<author>
<name>Anand Jain</name>
</author>
<published>2014-06-03T03:36:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0d39376aa28eba6d63d0120ccc399735842abc8e'/>
<id>urn:sha1:0d39376aa28eba6d63d0120ccc399735842abc8e</id>
<content type='text'>
we would need the device links to be created,
when device is added.

Signed-off-by: Anand Jain &lt;Anand.Jain@oracle.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: dev delete should remove sysfs entry</title>
<updated>2014-06-28T20:48:42Z</updated>
<author>
<name>Anand Jain</name>
</author>
<published>2014-06-03T03:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99994cde9c59c2b8bb67d46d531b26cc73e39747'/>
<id>urn:sha1:99994cde9c59c2b8bb67d46d531b26cc73e39747</id>
<content type='text'>
when we delete the device from the mounted btrfs,
we would need its corresponding sysfs enty to
be removed as well.

Signed-off-by: Anand Jain &lt;Anand.Jain@oracle.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: rename add_device_membership to btrfs_kobj_add_device</title>
<updated>2014-06-28T20:48:41Z</updated>
<author>
<name>Anand Jain</name>
</author>
<published>2014-06-03T03:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b4eaf43f4b0207b5d1ca8b8d22df88ea9e142fe'/>
<id>urn:sha1:9b4eaf43f4b0207b5d1ca8b8d22df88ea9e142fe</id>
<content type='text'>
Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: allocate raid type kobjects dynamically</title>
<updated>2014-06-10T00:21:01Z</updated>
<author>
<name>Jeff Mahoney</name>
</author>
<published>2014-05-27T16:59:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1895442be01c58449e3bf9272f22062a670e08f'/>
<id>urn:sha1:c1895442be01c58449e3bf9272f22062a670e08f</id>
<content type='text'>
We are currently allocating space_info objects in an array when we
allocate space_info. When a user does something like:

# btrfs balance start -mconvert=raid1 -dconvert=raid1 /mnt
# btrfs balance start -mconvert=single -dconvert=single /mnt -f
# btrfs balance start -mconvert=raid1 -dconvert=raid1 /

We can end up with memory corruption since the kobject hasn't
been reinitialized properly and the name pointer was left set.

The rationale behind allocating them statically was to avoid
creating a separate kobject container that just contained the
raid type. It used the index in the array to determine the index.

Ultimately, though, this wastes more memory than it saves in all
but the most complex scenarios and introduces kobject lifetime
questions.

This patch allocates the kobjects dynamically instead. Note that
we also remove the kobject_get/put of the parent kobject since
kobject_add and kobject_del do that internally.

Signed-off-by: Jeff Mahoney &lt;jeffm@suse.com&gt;
Reported-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: usage error should not be logged into system log</title>
<updated>2014-06-10T00:20:54Z</updated>
<author>
<name>Anand Jain</name>
</author>
<published>2014-05-20T06:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=402a0f475938f26b0c7b3175c8163b91a12a8a9a'/>
<id>urn:sha1:402a0f475938f26b0c7b3175c8163b91a12a8a9a</id>
<content type='text'>
I have an opinion that system logs /var/log/messages are
valuable info to investigate the real system issues at
the data center. People handling data center issues
do spend a lot time and efforts analyzing messages
files. Having usage error logged into /var/log/messages
is something we should avoid.

Signed-off-by: Anand Jain &lt;Anand.Jain@oracle.com&gt;
Reviewed-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: export more from FS_INFO to sysfs</title>
<updated>2014-06-10T00:20:28Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2014-05-07T16:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df93589a17378277c0ac394858dd8a2a41e5fb5a'/>
<id>urn:sha1:df93589a17378277c0ac394858dd8a2a41e5fb5a</id>
<content type='text'>
Similar to the FS_INFO updates, export the basic filesystem info through
sysfs: node size, sector size and clone alignment.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: add simple debugfs interface</title>
<updated>2014-03-10T19:15:51Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2014-02-05T14:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1bae30982bc86ab66d61ccb6e22792593b45d44d'/>
<id>urn:sha1:1bae30982bc86ab66d61ccb6e22792593b45d44d</id>
<content type='text'>
Help during debugging to export various interesting infromation and
tunables without the need of extra mount options or ioctls.

Usage:
* declare your variable in sysfs.h, and include where you need it
* define the variable in sysfs.c and make it visible via
  debugfs_create_TYPE

Depends on CONFIG_DEBUG_FS.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105</title>
<updated>2014-02-15T16:03:09Z</updated>
<author>
<name>Anand Jain</name>
</author>
<published>2014-01-15T09:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f085381e6d08f4c8d6882825f31accd455c54d70'/>
<id>urn:sha1:f085381e6d08f4c8d6882825f31accd455c54d70</id>
<content type='text'>
bdev is null when disk has disappeared and mounted with
the degrade option

stack trace
---------
btrfs_sysfs_add_one+0x105/0x1c0 [btrfs]
open_ctree+0x15f3/0x1fe0 [btrfs]
btrfs_mount+0x5db/0x790 [btrfs]
? alloc_pages_current+0xa4/0x160
mount_fs+0x34/0x1b0
vfs_kern_mount+0x62/0xf0
do_mount+0x22e/0xa80
? __get_free_pages+0x9/0x40
? copy_mount_options+0x31/0x170
SyS_mount+0x7e/0xc0
system_call_fastpath+0x16/0x1b
---------

reproducer:
-------
mkfs.btrfs -draid1 -mraid1 /dev/sdc /dev/sdd
(detach a disk)
devmgt detach /dev/sdc [1]
mount -o degrade /dev/sdd /btrfs
-------

[1] github.com/anajain/devmgt.git

Signed-off-by: Anand Jain &lt;Anand.Jain@oracle.com&gt;
Tested-by: Hidetoshi Seto &lt;seto.hidetoshi@jp.fujitsu.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: sysfs: list the NO_HOLES feature</title>
<updated>2014-01-28T21:20:42Z</updated>
<author>
<name>David Sterba</name>
</author>
<published>2014-01-21T17:56:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c736c095de53c1a0a23909239d69bb56693df8ef'/>
<id>urn:sha1:c736c095de53c1a0a23909239d69bb56693df8ef</id>
<content type='text'>
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
Signed-off-by: Josef Bacik &lt;jbacik@fb.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
</feed>
