[PATCH] Btrfs: adjust len of writes if following a preallocated extent

2016-11-04 Thread Liu Bo
If we have |0--hole--4095||4096--preallocate--12287| instead of using preallocated space, a 8K direct write will just create a new 8K extent and it'll end up with |0--new extent--8191||8192--preallocate--12287| It's because we find a hole em and then go to create a new 8K extent directly

Re: [Bug 186671] New: OOM on system with just rsync running 32GB of ram 30GB of pagecache

2016-11-04 Thread Vlastimil Babka
On 11/04/2016 03:13 PM, E V wrote: > After the system panic'd yesterday I booted back into 4.8.4 and > restarted the rsync's. I'm away on vacation next week, so when I get > back I'll get rc4 or rc5 and try again. In the mean time here's data > from the system running 4.8.4 without problems for

Re: [PATCH] btrfs: remove old tree_root dirent processing in btrfs_real_readdir()

2016-11-04 Thread kbuild test robot
Hi Jeff, [auto build test WARNING on btrfs/next] [also build test WARNING on v4.9-rc3 next-20161028] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[PATCH] btrfs: remove old tree_root dirent processing in btrfs_real_readdir()

2016-11-04 Thread jeffm
From: Jeff Mahoney Commit 3de4586c527 (Btrfs: Allow subvolumes and snapshots anywhere in the directory tree) introduced the current system of placing snapshots in the directory tree. It also introduced the behavior of creating the snapshot and then creating the directory entries

[PATCH v2 3/3] btrfs-progs: send: fix handling of -c option

2016-11-04 Thread Tsutomu Itoh
When two or more -c options are specified, cannot find a suitable parent. So, output stream is bigger than correct one. [before] # btrfs send -f /tmp/data1 -c Snap0 -c ../SnapX Snap[12] ../SnapY At subvol Snap1 At subvol Snap2 At subvol ../SnapY # ls -l /tmp/data1 -rw--- 1 root root 3153 Oct

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-11-04 Thread Roman Mamedov
On Fri, 4 Nov 2016 01:01:13 -0700 Marc MERLIN wrote: > Basically I have this: > sde8:64 0 3.7T 0 > └─sde1 8:65 0 3.7T 0 > └─md59:50 14.6T 0 > └─bcache0252:00

[PATCH] btrfs-progs: send-test: add checking of clone-src option

2016-11-04 Thread Tsutomu Itoh
Sending stream size of clone-src(-c) option is checked. Signed-off-by: Tsutomu Itoh --- tests/misc-tests/016-send-clone-src/test.sh | 54 + 1 file changed, 54 insertions(+) create mode 100755 tests/misc-tests/016-send-clone-src/test.sh diff

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-11-04 Thread Marc MERLIN
On Mon, Oct 31, 2016 at 09:21:40PM -0700, Marc MERLIN wrote: > On Tue, Nov 01, 2016 at 12:13:38PM +0800, Qu Wenruo wrote: > > Would you try to locate the range where we starts to fail to read? > > > > I still think the root problem is we failed to read the device in user > > space. > >

[PATCH V2] btrfs: Remove some dead code

2016-11-04 Thread Christophe JAILLET
'btrfs_iget()' can not return NULL, so this test can be removed. Signed-off-by: Christophe JAILLET --- V1 --> v2: fix the patch description --- fs/btrfs/free-space-cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/btrfs/free-space-cache.c

[PATCH] btrfs: make block group flags in balance printks human-readable

2016-11-04 Thread Adam Borowski
They're not even documented anywhere, letting users with no recourse but to RTFS. It's no big burden to output the bitfield as words. Also, display unknown flags as hex. Signed-off-by: Adam Borowski --- fs/btrfs/relocation.c | 34 -- 1 file

Re: Identifying reflink / CoW files

2016-11-04 Thread Saint Germain
On Thu, 3 Nov 2016 01:17:07 -0400, Zygo Blaxell wrote : > On Thu, Oct 27, 2016 at 01:30:11PM +0200, Saint Germain wrote: > > Hello, > > > > Following the previous discussion: > > https://www.spinics.net/lists/linux-btrfs/msg19075.html > > > > I would be

Re: [Bug 186671] New: OOM on system with just rsync running 32GB of ram 30GB of pagecache

2016-11-04 Thread E V
After the system panic'd yesterday I booted back into 4.8.4 and restarted the rsync's. I'm away on vacation next week, so when I get back I'll get rc4 or rc5 and try again. In the mean time here's data from the system running 4.8.4 without problems for about a day. I'm not familiar with xxd and

[GIT PULL] Btrfs

2016-11-04 Thread Chris Mason
Hi Linus, My for-linus-4.9 branch: git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus-4.9 Has some fixes that Dave Sterba collected. We held off on these last week because I was focused on the memory corruption testing. I had asked you about pulling this directly

Re: btrfs check --repair: ERROR: cannot read chunk root

2016-11-04 Thread Marc MERLIN
On Fri, Nov 04, 2016 at 02:00:43PM +0500, Roman Mamedov wrote: > On Fri, 4 Nov 2016 01:01:13 -0700 > Marc MERLIN wrote: > > > Basically I have this: > > sde8:64 0 3.7T 0 > > └─sde1 8:65 0 3.7T 0 > > └─md5