[PATCH 1/2] btrfs-progs: Fix a bug in __btrfs_map_block() always maps wrong stripe for DUP/RAID1

2015-05-10 Thread Qu Wenruo
In __btrfs_map_block(), stripe_index is always wrong if mirror_num is given. For DUP/RAID1 case, if mirror_num is given, e.g. 1, it should return the second stripe. But codes consider the mirror_num is start from 1 and always minus 1, causing even mirror number is given as 1, __btrfs_map_block() w

Re: [PATCH 2/3] NILFS2: support NFSv2 export

2015-05-10 Thread Ryusuke Konishi
On Fri, 08 May 2015 10:16:23 +1000, NeilBrown wrote: > The "fh_len" passed to ->fh_to_* is not guaranteed to be that same as > that returned by encode_fh - it may be larger. > > With NFSv2, the filehandle is fixed length, so it may appear longer > than expected and be zero-padded. > > So we must

Got 10 csum errors according to dmesg but 0 errors according to dev stats

2015-05-10 Thread Philip Seeger
I have installed a new virtual machine (VirtualBox) with Arch on btrfs (just a root fs and swap partition, no other partitions). I suddenly noticed 10 checksum errors in the kernel log: $ dmesg | grep csum [ 736.283506] BTRFS warning (device sda1): csum failed ino 1704363 off 761856 csum 114598