[PATCH] btrfs-progs: Don't return any fs_info that contain NULL tree_root or fs_root.

2014-09-29 Thread Qu Wenruo
[BUG] btrfsck will segfault if it fails to open the fs tree or tree root. [REPRODUCER] Execute btrfsck on a highly damaged btrfs image. fsfuzz can be used to make a junk btrfs image. [REASON] Current open_ctree() in btrfs-progs support OPEN_CTREE_PARTIAL flag to allow return fs_info even some of

Re: [PATCH 1/2] btrfs: fix sparse address space warnings

2014-09-29 Thread David Sterba
On Mon, Sep 29, 2014 at 12:45:12PM -0700, Omar Sandoval wrote: > > > @@ -639,8 +640,7 @@ static int send_header(struct send_ctx *sctx) > > > - return write_buf(sctx->send_filp, &hdr, sizeof(hdr), > > > - &sctx->send_off); > > > + return write_buf(sctx->send_filp, &hd

Re: [PATCH 1/2] btrfs: fix sparse address space warnings

2014-09-29 Thread Omar Sandoval
On Mon, Sep 29, 2014 at 06:07:38PM +0200, David Sterba wrote: > On Sun, Sep 28, 2014 at 01:48:11AM -0700, Omar Sandoval wrote: > > The buffer passed to vfs_write in send and several casts of ioctl fields are > > missing the __user annotation. Also fixes a couple of related trivial style > > issues.

Re: [PATCH v4 02/15] btrfs: new test to run btrfs balance and scrub simultaneously

2014-09-29 Thread Josef Bacik
On 09/26/2014 12:14 AM, Eryu Guan wrote: Run btrfs balance and scrub operations simultaneously with fsstress running in background. Signed-off-by: Eryu Guan --- common/rc | 9 + tests/btrfs/060 | 114 tests/btrfs/060.o

Re: [PATCH v4 01/15] btrfs: new test to run btrfs balance and subvolume test simultaneously

2014-09-29 Thread Josef Bacik
On 09/26/2014 12:14 AM, Eryu Guan wrote: Run btrfs balance and subvolume create/mount/umount/delete simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan --- common/rc | 110 +++-- tests/btrfs/059 | 115 +++

Re: 3.16.3 btrfs receive dies with rename o4736059-335172-0 -> merlin/RC/OSD failed. Directory not empty machine

2014-09-29 Thread Marc MERLIN
On Mon, Sep 29, 2014 at 06:29:25PM +0100, Filipe David Manana wrote: > It's better than before, but I still need the *full* output from the > tree commands and receive -vv --max-errors=0. (sent off list due to size) Marc -- "A mouse is a device used to point at the xterm you want to type in" - A

Re: 3.16.3 btrfs receive dies with rename o4736059-335172-0 -> merlin/RC/OSD failed. Directory not empty machine

2014-09-29 Thread Filipe David Manana
On Mon, Sep 29, 2014 at 4:43 PM, Marc MERLIN wrote: > On Mon, Sep 29, 2014 at 01:10:37PM +0100, Filipe David Manana wrote: >> > Is there a patch you'd like me to try, or should I just work around the >> > problem by deleting all these directories and recreating in 2 steps to >> > get around the bu

[PATCH] btrfs-progs: add root to dirty list when fixing bad keys

2014-09-29 Thread Josef Bacik
A user reported a WARN_ON() when trying to run btrfsck --repair on his fs with bad key ordering. This was because the root that was broken wasn't part of the transaction yet. We do this open coded thing in a few other places in fsck, so just make it a helper function and make sure all the places

Re: [PATCH 1/4] btrfs: correct empty compression property behavior

2014-09-29 Thread David Sterba
On Fri, Sep 19, 2014 at 05:45:49PM +0900, Satoru Takeuchi wrote: > In the current implementation, compression property == "" has > the two different meanings: one is with BTRFS_INODE_NOCOMPRESS, > and the other is without this flag. > > So, even if the two files a and b have the same compression >

Re: [PATCH v2 3/4] btrfs: Rename and export __btrfs_set_prop to be called from running transaction

2014-09-29 Thread David Sterba
On Thu, Sep 25, 2014 at 02:55:29PM +0900, Satoru Takeuchi wrote: > Since "__" prefix means static helper, rename __btrfs_set_prop() to > btrfs_set_prop_trans. > > Signed-off-by: Naohiro Aota > Signed-off-by: Satoru Takeuchi Reviewed-by: David Sterba -- To unsubscribe from this list: send the l

Re: [PATCH 2/2] btrfs: fix sparse lock context warnings

2014-09-29 Thread David Sterba
On Sun, Sep 28, 2014 at 01:48:12AM -0700, Omar Sandoval wrote: > Fix several sparse warnings that can easily be addressed with context > annotations. These annotations also provide some sort of documentation for the > internal helper functions. > > Signed-off-by: Omar Sandoval Reviewed-by: David

Re: [PATCH 1/2] btrfs: fix sparse address space warnings

2014-09-29 Thread David Sterba
On Sun, Sep 28, 2014 at 01:48:11AM -0700, Omar Sandoval wrote: > The buffer passed to vfs_write in send and several casts of ioctl fields are > missing the __user annotation. Also fixes a couple of related trivial style > issues. > > Signed-off-by: Omar Sandoval Reviewed-by: David Sterba > @@

Re: [PATCH] btrfs: fix a overflowing boundary writing in csum_tree_block

2014-09-29 Thread David Sterba
On Thu, Sep 11, 2014 at 10:02:16AM -0400, Chris Mason wrote: > On 09/09/2014 05:19 AM, rongqing...@windriver.com wrote: > > From: Li RongQing > > > > It is impossible that csum_size is larger than sizeof(long), but the codes > > still add the handler for this condition, like allocate new memory,

Re: 3.16.3 btrfs receive dies with rename o4736059-335172-0 -> merlin/RC/OSD failed. Directory not empty machine

2014-09-29 Thread Marc MERLIN
On Mon, Sep 29, 2014 at 01:10:37PM +0100, Filipe David Manana wrote: > > Is there a patch you'd like me to try, or should I just work around the > > problem by deleting all these directories and recreating in 2 steps to > > get around the bug? > > For the moment you'll have to use the workaround.

Re: Btrfs-progs releases

2014-09-29 Thread David Sterba
On Thu, Sep 18, 2014 at 10:38:03PM +0100, WorMzy Tykashi wrote: > I was wondering if you could shed some light on the status of the > integration branches. Are these going to be discontinued now that you > are maintaining and tagging the official btrfs-progs releases, or will > they stick around, s

Re: 3.17.0-rc6 system freeze

2014-09-29 Thread Tomasz Chmielewski
On 2014-09-29 16:10 (Mon), Liu Bo wrote: Hi Tomasz, On Mon, Sep 29, 2014 at 02:00:18PM +0200, Tomasz Chmielewski wrote: System froze under 3.17.0-rc6 with btrfs. It had to be hard rebooted. How does this happen? A stressful write with compression? Rsync (with --inplace - can be stressful

Re: kernel BUG at fs/btrfs/relocation.c:1065 in 3.14.16 to 3.17-rc3

2014-09-29 Thread Liu Bo
On Wed, Sep 03, 2014 at 02:04:29PM +0200, Olivier Bonvalet wrote: > Hi, > > I have a btrfs partition which throw kernel BUG, even with linux > 3.17-rc3 (I tried 3.14.16, 3.16.1 and 3.17-rc3 kernels) : > > [ 45.058466] [ cut here ] > [ 45.058539] kernel BUG at fs/btrfs/

Re: 3.17.0-rc6 system freeze

2014-09-29 Thread Liu Bo
Hi Tomasz, On Mon, Sep 29, 2014 at 02:00:18PM +0200, Tomasz Chmielewski wrote: > System froze under 3.17.0-rc6 with btrfs. It had to be hard rebooted. > > Sep 29 05:50:21 bkp010 kernel: [559018.459704] NMI watchdog: BUG: > soft lockup - CPU#6 stuck for 22s! [kworker/u16:24:16872] > Sep 29 05:50:2

[PATCH RFC] btrfs: introduce procfs interface for the device list

2014-09-29 Thread Anand Jain
From: Anand Jain (added RFC prefix to the patch header) (as of now just an experimental interface) This patch introduces profs interface /proc/fs/btrfs/devlist, which as of now exports all the members of kernel fs_devices. The current /sys/fs/btrfs interface works when the fs is mounted, and is

[PATCH] btrfs: introduce procfs interface for the device list

2014-09-29 Thread Anand Jain
(as of now just an experimental interface) This patch introduces profs interface /proc/fs/btrfs/devlist, which as of now exports all the members of kernel fs_devices. The current /sys/fs/btrfs interface works when the fs is mounted, and is on the file directory hierarchy and also has the sysfs li

Re: 3.16.3 btrfs receive dies with rename o4736059-335172-0 -> merlin/RC/OSD failed. Directory not empty machine

2014-09-29 Thread Filipe David Manana
On Sat, Sep 27, 2014 at 9:19 PM, Marc MERLIN wrote: > Hi Filipe and others, > > After I moved directories around, and since then my hourly > btrfs backup is failing. > > Does this output help? Partially. > > Is there a patch you'd like me to try, or should I just work around the > problem by del

3.17.0-rc6 system freeze

2014-09-29 Thread Tomasz Chmielewski
System froze under 3.17.0-rc6 with btrfs. It had to be hard rebooted. Sep 29 05:50:21 bkp010 kernel: [559018.459704] NMI watchdog: BUG: soft lockup - CPU#6 stuck for 22s! [kworker/u16:24:16872] Sep 29 05:50:21 bkp010 kernel: [559018.459705] NMI watchdog: BUG: soft lockup - CPU#2 stuck for 22s!

Re: BTRFS backup questions

2014-09-29 Thread James Pharaoh
On 27/09/14 18:59, Hugo Mills wrote: 2. Duplicating NOCOW files Are you trying to cross a mount-point with that? It works for me: Here's a script which replicates what I'm doing: https://gist.github.com/jamespharaoh/d693067ffd203689ebea And here's the output when I run it: https://gist.

[PATCH][v2] btrfs: fix a overflowing boundary writing in csum_tree_block

2014-09-29 Thread roy . qing . li
From: Li RongQing It is impossible that csum_size is larger than sizeof(long), but the codes still add the handler for this condition, like allocate new memory, for extension. If it becomes true someday, copying csum_size size memory to local 32bit variable found and val will overflow these two v