[PATCH] btrfs: Fix a deadlock in btrfs_dev_replace_finishing()

2014-08-20 Thread Qu Wenruo
btrfs-transacion:5657 [stack snip] btrfs_bio_map() btrfs_bio_counter_inc_blocked() percpu_counter_inc(fs_info-bio_counter) ###bio_counter 0(A) __btrfs_bio_map() btrfs_dev_replace_lock() mutex_lock(dev_replace-lock) ###wait mutex(B)

Re: [PATCH] Btrfs: fix crash on endio of reading corrupted block

2014-08-20 Thread Liu Bo
On Tue, Aug 19, 2014 at 04:42:42PM -0500, Eric Sandeen wrote: On 8/19/14, 10:33 AM, Liu Bo wrote: The crash is [ cut here ] kernel BUG at fs/btrfs/extent_io.c:2124! [...] Workqueue: btrfs-endio normal_work_helper [btrfs] RIP: 0010:[a02d6055]

Re: [PATCH] Btrfs: cleanup the same name in end_bio_extent_readpage

2014-08-20 Thread Liu Bo
On Tue, Aug 19, 2014 at 03:31:00PM -0400, Chris Mason wrote: On 08/19/2014 11:32 AM, Liu Bo wrote: We've defined a 'offset' out of bio_for_each_segment_all. This isn't causing problems though? It should just be shadowing the bio_for_each_segment_all variable for the duration of the

[PATCH v5] Btrfs: send, lower mem requirements for processing xattrs

2014-08-20 Thread Filipe Manana
Maximum xattr size can be up to nearly the leaf size. For an fs with a leaf size larger than the page size, using kmalloc requires allocating multiple pages that are contiguous, which might not be possible if there's heavy memory fragmentation. Therefore fallback to vmalloc if we fail to allocate

[PATCH v2] Btrfs: fix crash on endio of reading corrupted block

2014-08-20 Thread Liu Bo
The crash is [ cut here ] kernel BUG at fs/btrfs/extent_io.c:2124! invalid opcode: [#1] SMP ... CPU: 3 PID: 88 Comm: kworker/u8:7 Not tainted 3.17.0-0.rc1.git0.1.fc22.x86_64 #1 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 Workqueue:

Re: Questions on using BtrFS for fileserver

2014-08-20 Thread Tomasz Chmielewski
we are thinking about using BtrFS on standard hardware for a fileserver with about 50T (100T raw) of storage (25×4TByte). I would recommend carefully reading this thread titled: 1 week to rebuid 4x 3TB raid10 is a long time! So I have a 2 x 2.6 TB devices in btrfs RAID-1, 716G used. Linux

Re: [btrfs] 8d875f95: xfstests.generic.226.fail

2014-08-20 Thread Miao Xie
On Tue, 19 Aug 2014 10:58:09 -0400, Chris Mason wrote: On 08/19/2014 10:23 AM, David Sterba wrote: On Tue, Aug 19, 2014 at 07:58:20PM +0800, Fengguang Wu wrote: We noticed an xfstests failure on commit 8d875f95da43c6a8f18f77869f2ef26e9594fecc (btrfs: disable strict file flushes for renames

Re: [PATCH 1/3] btrfs-progs: random fixes of btrfs-filesystem documentation

2014-08-20 Thread David Sterba
On Tue, Aug 19, 2014 at 10:33:44AM -0500, Eric Sandeen wrote: Seems like using /proc/partitions would make more sense in that case than a recursive scan of every file under /dev, wouldn't it? Any details on those reports? It does make sense. I'm just wondering when you might possibly have

Re: Questions on using BtrFS for fileserver

2014-08-20 Thread Benjamin O'Connor
As a counter-argument, I use BTRFS on a filesystem with about 280TB raw right now as a fileserver. Note that this is mostly transient data (raid 0), and I have stuck with 3.14, hearing the horror stories of 3.15/3.16 locking up. Even at that size (29TB LUNs), I have been able to add and

Re: [btrfs] 8d875f95: xfstests.generic.226.fail

2014-08-20 Thread Chris Mason
On 08/20/2014 06:52 AM, Miao Xie wrote: On Tue, 19 Aug 2014 10:58:09 -0400, Chris Mason wrote: On 08/19/2014 10:23 AM, David Sterba wrote: On Tue, Aug 19, 2014 at 07:58:20PM +0800, Fengguang Wu wrote: We noticed an xfstests failure on commit 8d875f95da43c6a8f18f77869f2ef26e9594fecc (btrfs:

Re: [PATCH] Btrfs: show real function name in btrfs workqueue tracepoint

2014-08-20 Thread David Sterba
On Fri, Aug 15, 2014 at 11:38:06PM +0800, Liu Bo wrote: Use %pf instead of %p, just same as kernel workqueue tracepoints. Signed-off-by: Liu Bo bo.li@oracle.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of

Re: [PATCH] Btrfs: send, lower mem requirements for processing xattrs

2014-08-20 Thread David Sterba
On Sun, Aug 10, 2014 at 11:52:09PM +, Josef Bacik wrote: Sigh I can only top post from my phone. Can you at least snip the original text? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 8/8 v2] btrfs: rename total_bytes to avoid confusion

2014-08-20 Thread David Sterba
On Wed, Aug 20, 2014 at 10:54:17AM +0800, Anand Jain wrote: we are assigning number_devices to the total_bytes, that's very confusing for a moment Signed-off-by: Anand Jain anand.j...@oracle.com Thanks. Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list: send the

[PATCH] Btrfs: fix filemap_flush call in btrfs_file_release

2014-08-20 Thread Chris Mason
We should only be flushing on close if the file was flagged as needing it during truncate. I broke this with my ordered data vs transaction commit deadlock fix. Thanks to Miao Xie for catching this. Signed-off-by: Chris Mason c...@fb.com Reported-by: Miao Xie mi...@cn.fujitsu.com Reported-by:

[PATCH -rc2] btrfs: remove stale code after removing ordered operations

2014-08-20 Thread David Sterba
The commit btrfs: disable strict file flushes for renames and truncates (8d875f95da43c6a8f18f77869f2ef26e9594fecc) left some unused code and defines. Signed-off-by: David Sterba dste...@suse.cz --- This is a cleanup after a 3.17-rc1 patch. fs/btrfs/btrfs_inode.h | 8 fs/btrfs/ctree.h

Re: [PATCH -rc2] btrfs: remove stale code after removing ordered operations

2014-08-20 Thread Chris Mason
On 08/20/2014 11:03 AM, David Sterba wrote: The commit btrfs: disable strict file flushes for renames and truncates (8d875f95da43c6a8f18f77869f2ef26e9594fecc) left some unused code and defines. See my followup for the perf regression, we still need these. I was never able to trigger the

Re: Questions on using BtrFS for fileserver

2014-08-20 Thread Austin S Hemmelgarn
On 08/19/2014 05:38 PM, Andrej Manduch wrote: Hi, On 08/19/2014 06:21 PM, M G Berberich wrote: · Are there any reports/papers/web-pages about BtrFS-systems this size in use? Praises, complains, performance-reviews, whatever… I don't know about papers or benchmarks but few weeks ago

[PATCH] btrfs: remove stale define after removing ordered operations

2014-08-20 Thread David Sterba
Last user removed in commit btrfs: disable strict file flushes for renames and truncates (8d875f95da43c6a8f18f77869f2ef26e9594fecc). Signed-off-by: David Sterba dste...@suse.cz --- fs/btrfs/ctree.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h

[PATCH 00/15] xfstests: new btrfs stress test cases

2014-08-20 Thread Eryu Guan
This patchset add new stress test cases for btrfs by running two different btrfs operations simultaneously under fsstress to ensure btrfs doesn't hang or oops in such situations. btrfs scrub and btrfs check will be run after each test. The test matrix is the combination of 6 btrfs operations:

[PATCH 09/15] btrfs: new case to run subvolume create/delete and remount with different compress algorithms

2014-08-20 Thread Eryu Guan
Run btrfs subvolume create/mount/umount/delete and remount with different compress algorithms simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/065 | 148 tests/btrfs/065.out |

[PATCH 08/15] btrfs: new case to run btrfs subvolume create/delete and defrag operations simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs subvolume create/mount/umount/delete and btrfs defrag operation simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/064 | 155 tests/btrfs/064.out | 2 +

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

2014-08-20 Thread Eryu Guan
Run btrfs balance and subvolume create/mount/umount/delete simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/057 | 147 tests/btrfs/057.out | 2 + tests/btrfs/group | 1 +

[PATCH 02/15] btrfs: new test to run btrfs balance and scrub simltaneously

2014-08-20 Thread Eryu Guan
Run btrfs balance and scrub operations simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/058 | 141 tests/btrfs/058.out | 2 + tests/btrfs/group | 1 + 3 files changed, 144

[PATCH 06/15] btrfs: new case to run btrfs subvolume create/delete operations and device replace simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs subvolume create/mount/umount/delete and device replace operation simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/062 | 167 tests/btrfs/062.out | 2 +

[PATCH 07/15] btrfs: new case to run btrfs subvolume create/delete operations and scrub simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs subvolume create/mount/umount/delete and btrfs scrub operation simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/063 | 146 tests/btrfs/063.out | 2 +

[PATCH 04/15] btrfs: new case to run btrfs balance and remount with different compress algorithms

2014-08-20 Thread Eryu Guan
Run btrfs balance and remount with different compress algorithms simultaneously, with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/060 | 142 tests/btrfs/060.out | 2 + tests/btrfs/group |

[PATCH 03/15] btrfs: new test to run btrfs balance and defrag operations simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs balance and defrag operations simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/059 | 150 tests/btrfs/059.out | 2 + tests/btrfs/group | 1 + 3 files changed, 153

[PATCH 05/15] btrfs: new case to run btrfs balance and device replace simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs balance and replace operations simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- common/rc | 24 tests/btrfs/061 | 161 tests/btrfs/061.out | 2 +

[PATCH 12/15] btrfs: new case to run device replace and remount with different compress algorithms simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs replace operations and remount with different compress algorithms simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/068 | 163 tests/btrfs/068.out | 2 +

[PATCH 10/15] btrfs: new case to run device replace and scrub operations simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs replace operations and scrub simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/066 | 161 tests/btrfs/066.out | 2 + tests/btrfs/group | 1 + 3 files changed, 164

[PATCH 13/15] btrfs: new case to run btrfs scrub and defrag operations simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs scrub and defrag operations simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/069 | 150 tests/btrfs/069.out | 2 + tests/btrfs/group | 1 + 3 files changed, 153

[PATCH 14/15] btrfs: new case to run btrfs scrub and remount with different compress algorithms simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs scrub and remount with different compress algorithms simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/070 | 142 tests/btrfs/070.out | 2 + tests/btrfs/group | 1

[PATCH 15/15] btrfs: new case to run defrag and remount with different compress algorithms simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs defrag operations and remount with different compress algorithms simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/071 | 152 tests/btrfs/071.out | 2 +

[PATCH 11/15] btrfs: new case to run device replace and defrag operations simultaneously

2014-08-20 Thread Eryu Guan
Run btrfs replace operations and defrag simultaneously with fsstress running in background. Signed-off-by: Eryu Guan eg...@redhat.com --- tests/btrfs/067 | 171 tests/btrfs/067.out | 2 + tests/btrfs/group | 1 + 3 files changed, 174

[PATCH 00/15] xfstests: new btrfs stress test cases

2014-08-20 Thread Eryu Guan
This patchset add new stress test cases for btrfs by running two different btrfs operations simultaneously under fsstress to ensure btrfs doesn't hang or oops in such situations. btrfs scrub and btrfs check will be run after each test. The test matrix is the combination of 6 btrfs operations:

Re: [PATCH 00/15] xfstests: new btrfs stress test cases

2014-08-20 Thread Zach Brown
On Thu, Aug 21, 2014 at 01:33:48AM +0800, Eryu Guan wrote: This patchset add new stress test cases for btrfs by running two different btrfs operations simultaneously under fsstress to ensure btrfs doesn't hang or oops in such situations. btrfs scrub and btrfs check will be run after each test.

Re: btrfs on bcache

2014-08-20 Thread raphead
Hi, has this issue been resolved? I would like to use the bcache + btrfs combo. Thanks -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 0/3] btrfs-progs: remove full /dev scanning

2014-08-20 Thread Eric Sandeen
btrfs fileystem show and btrfs device scan today both have the -d option to scan everything under /dev. But we also have a mechanism to scan everything in /proc/partitions, which should always be sufficient. If anyone knows why we'd find something deep under /dev but not in /proc/partitions,

[PATCH 1/3] btrfs-progs: scan /proc/partitions not all of /dev with -d

2014-08-20 Thread Eric Sandeen
We can scan for btrfs devices in a few ways. By default libblkid is used for device scan and filesystem show; with the -m option only mounted filesystems are scanned, and with -d we physically read every system device. But there's no reason for the complexity of a descent through /dev;

[PATCH 3/3] btrfs-progs: remove BTRFS_SCAN_DEV and btrfs_scan_one_dir

2014-08-20 Thread Eric Sandeen
After the previous 2 patches, nothing uses whole-dev-tree scanning, so remove the code which implemented that functionality. Signed-off-by: Eric Sandeen sand...@redhat.com --- diff --git a/utils.c b/utils.c index 12ed7a2..765a214 100644 --- a/utils.c +++ b/utils.c @@ -1228,117 +1228,6 @@ void

Re: [PATCH] xfstest: add tests/btrfs/059 to test seed operations

2014-08-20 Thread Dave Chinner
On Fri, Aug 15, 2014 at 11:16:21PM +0800, Anand Jain wrote: This test contains a set of 5 sub test cases which will tests the device add and replacement on a seed FS. The kernel messages are checked at the end of the each of the 5 test cases to see if there are any kernel warnings or bugs

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

2014-08-20 Thread Qu Wenruo
Original Message Subject: [PATCH 01/15] btrfs: new test to run btrfs balance and subvolume test simultaneously From: Eryu Guan eg...@redhat.com To: fste...@vger.kernel.org Date: 2014年08月21日 01:33 Run btrfs balance and subvolume create/mount/umount/delete simultaneously, with

[PATCH 1/2] btrfs-progs: cleanup duplicate assignment of variable leaf for btrfs-restore

2014-08-20 Thread Gui Hecheng
The value of variable leaf in while loop don't have to be set for every round. Just move it outside. Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com --- cmds-restore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds-restore.c b/cmds-restore.c index

[PATCH 2/2] btrfs-progs: remove unused flags for btrfs_path

2014-08-20 Thread Gui Hecheng
The three flags of @btrfs_path: btrfs_path { unsigned int keep_locks:1; unsigned int skip_locking:1; unsigned int leave_spinning:1; } have little meaning, because the userspace @btrfs_search_slot() is free of locking and no other

Re: [PATCH 00/15] xfstests: new btrfs stress test cases

2014-08-20 Thread Eryu Guan
On Wed, Aug 20, 2014 at 11:24:37AM -0700, Zach Brown wrote: On Thu, Aug 21, 2014 at 01:33:48AM +0800, Eryu Guan wrote: This patchset add new stress test cases for btrfs by running two different btrfs operations simultaneously under fsstress to ensure btrfs doesn't hang or oops in such

Re: btrfs restore memory corruption (bug: 82701)

2014-08-20 Thread Gui Hecheng
On Mon, 2014-08-18 at 11:25 +0200, Marc Dietrich wrote: Hi, I did a checkout of the latest btrfs progs to repair my damaged filesystem. Running btrfs restore gives me several failed to inflate: -6 and crashes with some memory corruption. I ran it again with valgrind and got: valgrind

[PATCH] btrfs-progs: init uninitialized output buf for btrfs-restore

2014-08-20 Thread Gui Hecheng
A memory problem reported by valgrind as follows: === Syscall param pwrite64(buf) points to uninitialised byte(s) When running: # valgrind --leak-check=yes btrfs restore /dev/sda9 /mnt/backup Because the output buf size is alloced with malloc, but the length of output data is

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

2014-08-20 Thread Eryu Guan
On Thu, Aug 21, 2014 at 10:04:30AM +0800, Qu Wenruo wrote: Original Message Subject: [PATCH 01/15] btrfs: new test to run btrfs balance and subvolume test simultaneously From: Eryu Guan eg...@redhat.com To: fste...@vger.kernel.org Date: 2014年08月21日 01:33 Run btrfs

btrfs restore

2014-08-20 Thread Mihail Zaporozhets
Hello, I'm create btrfs multi-device volume: (2TB * 5disks) 1. one device was converted from ext3, then delete sub-volume 'ext2'; 2. 'btrfs device add /dev/sd* /mnt/sdc1'; and some times again, Every disk adds by one, then move data from other disks. 2 times was running 'btrfs fi defrag -r -v