<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/btrfs/sysfs.c, branch linux-4.1.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2015-02-16T17:48:44+00:00</updated>
<entry>
<title>btrfs: constify structs with op functions or static definitions</title>
<updated>2015-02-16T17:48:44+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2015-01-02T17:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e8c9f18603f7ce2beca233401e228de730f121fa'/>
<id>urn:sha1:e8c9f18603f7ce2beca233401e228de730f121fa</id>
<content type='text'>
There are some op tables that can be easily made const, similarly the
sysfs feature and raid tables. This is motivated by PaX CONSTIFY plugin.

Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>Btrfs: add missing cleanup on sysfs init failure</title>
<updated>2015-02-03T03:24:49+00:00</updated>
<author>
<name>Filipe Manana</name>
<email>fdmanana@suse.com</email>
</author>
<published>2015-01-23T18:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=001a648df40ce6e7906773587f5fff48f61d0d73'/>
<id>urn:sha1:001a648df40ce6e7906773587f5fff48f61d0d73</id>
<content type='text'>
If we failed during initialization of sysfs, we weren't unregistering the
top level btrfs sysfs entry nor the debugfs stuff.
Not unregistering the top level sysfs entry makes future attempts to reload
the btrfs module impossible and the following is reported in dmesg:

[ 2246.451296] WARNING: CPU: 3 PID: 10999 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x91/0xb0()
[ 2246.451298] sysfs: cannot create duplicate filename '/fs/btrfs'
[ 2246.451298] Modules linked in: btrfs(+) raid6_pq xor bnep rfcomm bluetooth binfmt_misc nfsd auth_rpcgss oid_registry nfs_acl nfs lockd fscache sunrpc parport_pc parport psmouse serio_raw pcspkr evbug i2c_piix4 e1000 floppy [last unloaded: btrfs]
[ 2246.451310] CPU: 3 PID: 10999 Comm: modprobe Tainted: G        W    3.13.0-fdm-btrfs-next-24+ #7
[ 2246.451311] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[ 2246.451312]  0000000000000009 ffff8800d353fa08 ffffffff816f1da6 0000000000000410
[ 2246.451314]  ffff8800d353fa58 ffff8800d353fa48 ffffffff8104a32c ffff88020821a290
[ 2246.451316]  ffff88020821a290 ffff88020821a290 ffff8802148f0000 ffff8800d353fb80
[ 2246.451318] Call Trace:
[ 2246.451322]  [&lt;ffffffff816f1da6&gt;] dump_stack+0x4e/0x68
[ 2246.451324]  [&lt;ffffffff8104a32c&gt;] warn_slowpath_common+0x8c/0xc0
[ 2246.451325]  [&lt;ffffffff8104a416&gt;] warn_slowpath_fmt+0x46/0x50
[ 2246.451328]  [&lt;ffffffff81367dc5&gt;] ? strlcat+0x65/0x90
(....)

This fixes the following change:

    btrfs: add simple debugfs interface
    commit 1bae30982bc86ab66d61ccb6e22792593b45d44d

Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: move commit out of sysfs when changing label</title>
<updated>2014-11-12T15:53:15+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-05-30T17:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a6f69dc8018dbb4ce2009ccba49b53f68c8bdc64'/>
<id>urn:sha1:a6f69dc8018dbb4ce2009ccba49b53f68c8bdc64</id>
<content type='text'>
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>btrfs: move commit out of sysfs when changing features</title>
<updated>2014-11-12T15:53:14+00:00</updated>
<author>
<name>David Sterba</name>
<email>dsterba@suse.cz</email>
</author>
<published>2014-11-12T13:22:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0eae2747ec1ddcef5018827bce8f7d33b7d920e1'/>
<id>urn:sha1:0eae2747ec1ddcef5018827bce8f7d33b7d920e1</id>
<content type='text'>
Signed-off-by: David Sterba &lt;dsterba@suse.cz&gt;
</content>
</entry>
<entry>
<title>btrfs: sysfs label interface should check for read only FS</title>
<updated>2014-09-17T20:38:01+00:00</updated>
<author>
<name>Anand Jain</name>
<email>Anand.Jain@oracle.com</email>
</author>
<published>2014-07-30T12:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=79aec2b80db1089f983d60e4a22cb95d8b939844'/>
<id>urn:sha1:79aec2b80db1089f983d60e4a22cb95d8b939844</id>
<content type='text'>
Not sure how this escaped many eyes so far

Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: code optimize: BTRFS_ATTR_RW could set the mode</title>
<updated>2014-09-17T20:37:59+00:00</updated>
<author>
<name>Anand Jain</name>
<email>Anand.Jain@oracle.com</email>
</author>
<published>2014-07-30T12:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=20ee0825ecec889afdf12f7c13b9dc3af0bb9f14'/>
<id>urn:sha1:20ee0825ecec889afdf12f7c13b9dc3af0bb9f14</id>
<content type='text'>
BTRFS_ATTR_RW could set the mode and be inline with BTRFS_ATTR

Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: code optimize: BTRFS_ATTR could handle the mode</title>
<updated>2014-09-17T20:37:58+00:00</updated>
<author>
<name>Anand Jain</name>
<email>Anand.Jain@oracle.com</email>
</author>
<published>2014-07-30T12:04:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=98b3d389eb473f28ef69547c0a9f72041c4c40e6'/>
<id>urn:sha1:98b3d389eb473f28ef69547c0a9f72041c4c40e6</id>
<content type='text'>
All that uses BTRFS_ATTR want mode to be set at 0444 so just do
it at the define.  And few spacing alignments.

Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: use BTRFS_ATTR instead of btrfs_no_store()</title>
<updated>2014-09-17T20:37:57+00:00</updated>
<author>
<name>Anand Jain</name>
<email>Anand.Jain@oracle.com</email>
</author>
<published>2014-07-30T12:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3f4b57e09d6cbd97f92311a801e1b83992506dcd'/>
<id>urn:sha1:3f4b57e09d6cbd97f92311a801e1b83992506dcd</id>
<content type='text'>
we have BTRFS_ATTR define to create sysfs RO file, use that.

Signed-off-by: Anand Jain &lt;anand.jain@oracle.com&gt;
Signed-off-by: Chris Mason &lt;clm@fb.com&gt;
</content>
</entry>
<entry>
<title>btrfs: label should not contain return char</title>
<updated>2014-09-17T20:37:25+00:00</updated>
<author>
<name>Satoru Takeuchi</name>
<email>takeuchi_satoru@jp.fujitsu.com</email>
</author>
<published>2014-07-01T08:00:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48fcc3ff7dce0138c053833adf81670494f177f3'/>
<id>urn:sha1:48fcc3ff7dce0138c053833adf81670494f177f3</id>
<content type='text'>
Rediffed remaining parts of original patch from Anand Jain.  This makes
sure to avoid trailing newlines in the btrfs label output

reproducer.sh:

===============================================================================

TEST_DEV=/dev/vdb
TEST_DIR=/home/sat/mnt

umount /home/sat/mnt

mkfs.btrfs -f $TEST_DEV
UUID=$(btrfs fi show $TEST_DEV | head -1 | sed -e 's/.*uuid: \([-0-9a-z]*\)$/\1/')
mount $TEST_DEV $TEST_DIR
LABELFILE=/sys/fs/btrfs/$UUID/label

echo "Test for empty label..." &gt;&amp;2
LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"
RET=0

if [ $LINES -eq 0 ] ; then
    echo '[PASS] Trailing \n is removed correctly.' &gt;&amp;2
else
    echo '[FAIL] Trailing \n still exists.' &gt;&amp;2
    RET=1
fi

echo "Test for non-empty label..." &gt;&amp;2

echo testlabel &gt;$LABELFILE
LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"

if [ $LINES -eq 1 ] ; then
    echo '[PASS] Trailing \n is removed correctly.' &gt;&amp;2
else
    echo '[FAIL] Trailing \n still exists.' &gt;&amp;2
    RET=1
fi

exit $RET
===============================================================================

Signed-off-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: fix regression of btrfs device replace</title>
<updated>2014-08-21T14:55:20+00:00</updated>
<author>
<name>Liu Bo</name>
<email>bo.li.liu@oracle.com</email>
</author>
<published>2014-07-29T11:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.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>
</feed>
