[PATCH] btrfs: Silence a static checker locking warning

2019-02-09 Thread Dan Carpenter
Back in the day, before commit 0b246afa62b0 ("btrfs: root->fs_info cleanup, add fs_info convenience variables") then we used to take different locks. But now it's just one lock and the static checkers think we can call down_read(&fs_info->subvol_sem); twice in a row which would lead to a deadlock.

Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Jakob Schöttl
Hi, I've setup a RAID1 with two disks (disk1 and disk2) and I'm testing the btrfs replace command. After replacing disk2 with disk3, I can only mount (a) disk1 or disk3 (if both disk are plugged) and (b) the original disk1 (degraded, if disk3 is unplugged). I cannot mount the replacement disk

Re: btrfs as / filesystem in RAID1

2019-02-09 Thread waxhead
Austin S. Hemmelgarn wrote: On 2019-02-08 13:10, waxhead wrote: Austin S. Hemmelgarn wrote: On 2019-02-07 13:53, waxhead wrote: Austin S. Hemmelgarn wrote: So why do BTRFS hurry to mount itself even if devices are missing? and if BTRFS still can mount , why whould it blindly accept a n

Re: Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Qu Wenruo
On 2019/2/9 下午6:36, Jakob Schöttl wrote: > Hi, > > I've setup a RAID1 with two disks (disk1 and disk2) and I'm testing the > btrfs replace command. > > After replacing disk2 with disk3, I can only mount > (a) disk1 or disk3 (if both disk are plugged) and > (b) the original disk1 (degraded, if d

Re: Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Jakob Schöttl
Thanks Qu, Am 09.02.19 um 13:16 schrieb Qu Wenruo: On 2019/2/9 下午6:36, Jakob Schöttl wrote: Hi, I've setup a RAID1 with two disks (disk1 and disk2) and I'm testing the btrfs replace command. After replacing disk2 with disk3, I can only mount (a) disk1 or disk3 (if both disk are plugged) and (

Re: Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Andrei Borzenkov
09.02.2019 16:45, Jakob Schöttl пишет: > Thanks Qu, > > Am 09.02.19 um 13:16 schrieb Qu Wenruo: >> On 2019/2/9 下午6:36, Jakob Schöttl wrote: >>> Hi, >>> >>> I've setup a RAID1 with two disks (disk1 and disk2) and I'm testing the >>> btrfs replace command. >>> >>> After replacing disk2 with disk3, I

Re: Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Andrei Borzenkov
09.02.2019 13:36, Jakob Schöttl пишет: >   btrfs filesystem show   # to get devid of device 2 Funny because for me it just says "Some devices missing" without giving exact device id. May be has been fixed in recent versions but for a long time it really annoyed me. OK, when I just unplug device i

Re: Cannot 'mount -o degraded /dev/replacement' after a replace

2019-02-09 Thread Jakob Schöttl
Am 09.02.19 um 16:32 schrieb Andrei Borzenkov: Running btrfs balance start -f -ssoft,convert=raid1 -dsoft,convert=raid1 -msoft,convert=raid1 /mnt fixes it. I am not sure whether btrfs is expected to do it automatically as of now. This fix seems to work for me, too. Output was: > Done, had t

Filesystem corruption under big endian MIPS

2019-02-09 Thread Rosen Penev
I'm getting this error every time I mount and use my drive [63046.831194] sd 0:0:0:0: [sda] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB) [63047.049574] sd 0:0:0:0: [sda] Write Protect is off [63047.054515] sd 0:0:0:0: [sda] Mode Sense: 4f 00 00 00 [63047.060695] sd 0:0:0:0: [sda] Write ca

corruption with multi-device btrfs + single bcache, won't mount

2019-02-09 Thread STEVE LEUNG
Hi all, I decided to try something a bit crazy, and try multi-device raid1 btrfs on top of dm-crypt and bcache. That is: btrfs -> dm-crypt -> bcache -> physical disks I have a single cache device in front of 4 disks. Maybe this wasn't that good of an idea, because the filesystem went read-on