27 Jan, 2016

1 commit


22 Jan, 2016

2 commits


29 Sep, 2015

5 commits


22 Jun, 2015

1 commit


27 May, 2015

18 commits


17 Feb, 2015

1 commit


03 Feb, 2015

1 commit

  • 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] [] dump_stack+0x4e/0x68
    [ 2246.451324] [] warn_slowpath_common+0x8c/0xc0
    [ 2246.451325] [] warn_slowpath_fmt+0x46/0x50
    [ 2246.451328] [] ? strlcat+0x65/0x90
    (....)

    This fixes the following change:

    btrfs: add simple debugfs interface
    commit 1bae30982bc86ab66d61ccb6e22792593b45d44d

    Signed-off-by: Filipe Manana
    Signed-off-by: Chris Mason

    Filipe Manana
     

12 Nov, 2014

2 commits


18 Sep, 2014

5 commits

  • Not sure how this escaped many eyes so far

    Signed-off-by: Anand Jain
    Signed-off-by: Chris Mason

    Anand Jain
     
  • BTRFS_ATTR_RW could set the mode and be inline with BTRFS_ATTR

    Signed-off-by: Anand Jain
    Signed-off-by: Chris Mason

    Anand Jain
     
  • 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
    Signed-off-by: Chris Mason

    Anand Jain
     
  • we have BTRFS_ATTR define to create sysfs RO file, use that.

    Signed-off-by: Anand Jain
    Signed-off-by: Chris Mason

    Anand Jain
     
  • 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..." >&2
    LINES="$(cat $LABELFILE | wc -l | awk '{print $1}')"
    RET=0

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

    echo "Test for non-empty label..." >&2

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

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

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

    Signed-off-by: Satoru Takeuchi
    Signed-off-by: Chris Mason

    Satoru Takeuchi
     

21 Aug, 2014

1 commit

  • 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: [] 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
    Signed-off-by: Liu Bo
    Reviewed-by: Satoru Takeuchi
    Tested-by: Satoru Takeuchi
    Signed-off-by: Chris Mason

    Liu Bo
     

29 Jun, 2014

3 commits