Re: [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks

2016-06-22 Thread Liu Bo
On Wed, Jun 22, 2016 at 07:26:46PM +0200, David Sterba wrote: > From: David Sterba > > Hi, > > the chunk dump is a useful thing, for debugging or balance filters. > > Example output: > > Chunks on device id: 1 > PNumberTypePStartLength PEnd Age >

[PATCH] Btrfs: cleanup BUG_ON in merge_bio

2016-06-22 Thread Liu Bo
One can use btrfs-corrupt-block to hit BUG_ON() in merge_bio(), thus this aims to stop anyone to panic the whole system by using their btrfs. Since the error in merge_bio can only come from __btrfs_map_block() when chunk tree mapping has something insane and __btrfs_map_block() has already had pr

[PATCH] Btrfs: error out if generic_bin_search get invalid arguments

2016-06-22 Thread Liu Bo
With btrfs-corrupt-block, one can set btree node/leaf's field, if we assign a negative value to node/leaf, we can get various hangs, eg. if extent_root's nritems is -2ULL, then we get stuck in btrfs_read_block_groups() because it has a while loop and btrfs_search_slot() on extent_root will always

[PATCH] Btrfs: check inconsistence between chunk and block group

2016-06-22 Thread Liu Bo
With btrfs-corrupt-block, one can drop one chunk item and mounting will end up with a panic in btrfs_full_stripe_len(). This doesn't not remove the BUG_ON, but instead checks it a bit earlier when we find the block group item. Signed-off-by: Liu Bo --- fs/btrfs/extent-tree.c | 17 ++

[PATCH] Btrfs: fix BUG_ON in btrfs_submit_compressed_write

2016-06-22 Thread Liu Bo
This is similar to btrfs_submit_compressed_read(), if we fail after bio is allocated, then we can use bio_endio() and errors are saved in bio->bi_error. But please note that we don't return errors to its caller because the caller assumes it won't call endio to cleanup on error. Signed-off-by: Li

Re: [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks

2016-06-22 Thread Qu Wenruo
At 06/23/2016 01:26 AM, David Sterba wrote: From: David Sterba Hi, the chunk dump is a useful thing, for debugging or balance filters. Yes, quite useful. I don't ever need to manually check btrfs-debug-tree output to figure out the dev-extent layout. But according to the output, it's mo

Re: [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks

2016-06-22 Thread Hans van Kranenburg
On 06/22/2016 07:26 PM, David Sterba wrote: From: David Sterba Hi, the chunk dump is a useful thing, for debugging or balance filters. Example output: Chunks on device id: 1 PNumberTypePStartLength PEnd Age LStart Usage -

Re: btrfs: page allocation failure: order:1, mode:0x2204020

2016-06-22 Thread Hans van Kranenburg
On 06/20/2016 02:49 PM, David Sterba wrote: On Sat, Jun 18, 2016 at 08:47:55PM +0200, Hans van Kranenburg wrote: Last night, one of my btrfs filesystems went read-only after a memory allocation failure (logging attached). According to the logs, the allocation itself happens out of btrfs so we

Re: [RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks

2016-06-22 Thread Hans van Kranenburg
On 06/22/2016 07:26 PM, David Sterba wrote: From: David Sterba Hi, the chunk dump is a useful thing, for debugging or balance filters. Nice! Example output: Chunks on device id: 1 PNumberTypePStartLength PEnd Age LStart Usage

Re: [PATCH v2 2/2] btrfs: wait for bdev put

2016-06-22 Thread Chris Mason
On Wed, Jun 22, 2016 at 6:18 AM, Anand Jain wrote: Thanks for the review Chris. On 06/21/2016 09:00 PM, Chris Mason wrote: On 06/21/2016 06:24 AM, Anand Jain wrote: From: Anand Jain Further to the commit bc178622d40d87e75abc131007342429c9b03351 btrfs: use rcu_barrier() to

Re: Adventures in btrfs raid5 disk recovery

2016-06-22 Thread Zygo Blaxell
On Wed, Jun 22, 2016 at 11:14:30AM -0600, Chris Murphy wrote: > > Before deploying raid5, I tested these by intentionally corrupting > > one disk in an otherwise healthy raid5 array and watching the result. > > It's difficult to reproduce if no one understands how you > intentionally corrupted tha

Re: Confusing output from fi us/df

2016-06-22 Thread Chris Murphy
On Mon, Jun 20, 2016 at 5:30 PM, Marc Grondin wrote: > Metadata,single: Size:3.00GiB, Used:1.53GiB Read this as: 3GiB of space on the device is reserved for metadata block group, and 1.53GiB of that is being used. The reservation means that this space can't be used for other block group types,

[RFC][PATCH] btrfs-progs: inspect: new subcommand to dump chunks

2016-06-22 Thread David Sterba
From: David Sterba Hi, the chunk dump is a useful thing, for debugging or balance filters. Example output: Chunks on device id: 1 PNumberTypePStartLength PEnd Age LStart Usage ---

Re: Adventures in btrfs raid5 disk recovery

2016-06-22 Thread Chris Murphy
On Mon, Jun 20, 2016 at 7:55 PM, Zygo Blaxell wrote: > On Mon, Jun 20, 2016 at 03:27:03PM -0600, Chris Murphy wrote: >> On Mon, Jun 20, 2016 at 2:40 PM, Zygo Blaxell >> wrote: >> > On Mon, Jun 20, 2016 at 01:30:11PM -0600, Chris Murphy wrote: >> >> >> For me the critical question is what does "so

Re: btrfs send/receive error

2016-06-22 Thread Michael Duell
. It's broken atm. Michael On 2016-06-22 14:01, Lubos Kolouch wrote: > Hello, > > I am having strange issue with btrfs send/receive: > > #btrfs send -p /mnt/a/_btrbk_snap/debian.20160621_1 > /mnt/a/_btrbk_snap/debian.20160622 | btrfs receive /mnt/ext/backups/vaclfw

Re: [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-22 Thread Arnd Bergmann
On Sunday, June 19, 2016 5:26:59 PM CEST Deepa Dinamani wrote: > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC > macros. > The macros are not y2038 safe. There is no plan to transition them into being > y2038 safe. > ktime_get_* api's can be used in their place. And, thes

btrfs send/receive error

2016-06-22 Thread Lubos Kolouch
Hello, I am having strange issue with btrfs send/receive: #btrfs send -p /mnt/a/_btrbk_snap/debian.20160621_1 /mnt/a/_btrbk_snap/debian.20160622 | btrfs receive /mnt/ext/backups/vaclfw/ At subvol /mnt/a/_btrbk_snap/debian.20160622 At snapshot debian.20160622 ERROR: unlink var/lib/samba

Re: [PATCH v2 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-22 Thread Anand Jain
On 06/21/2016 09:31 PM, Eryu Guan wrote: On Wed, Jun 15, 2016 at 04:48:47PM +0800, Anand Jain wrote: From: Anand Jain The test does the following: Initialize a RAID1 with some data Re-mount RAID1 degraded with _dev1_ and write up to half of the FS capacity If test devices are big en

Re: [PATCH v2 1/6] fstests: btrfs: add functions to set and reset required number of SCRATCH_DEV_POOL

2016-06-22 Thread Anand Jain
On 06/21/2016 09:20 PM, Eryu Guan wrote: On Wed, Jun 15, 2016 at 04:46:03PM +0800, Anand Jain wrote: From: Anand Jain This patch provides functions _scratch_dev_pool_get() _scratch_dev_pool_put() Which will help to set/reset SCRATCH_DEV_POOL with the required number of devices. SCRATCH_DE

Re: [PATCH v2 2/2] btrfs: wait for bdev put

2016-06-22 Thread Anand Jain
Thanks for the review Chris. On 06/21/2016 09:00 PM, Chris Mason wrote: On 06/21/2016 06:24 AM, Anand Jain wrote: From: Anand Jain Further to the commit bc178622d40d87e75abc131007342429c9b03351 btrfs: use rcu_barrier() to wait for bdev puts at unmount This patch implements a m

Re: btrfs multi device handling

2016-06-22 Thread sri
Hi, any inputs on this would be appreciated. -- 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

Re: [PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-22 Thread Wang Xiaoguang
hello, On 06/22/2016 02:24 PM, Christoph Hellwig wrote: On Wed, Jun 22, 2016 at 09:57:01AM +0800, Wang Xiaoguang wrote: And below test case can reveal this bug: Please wire this up for xfstests, thanks! OK. Regards, Xiaoguang Wang -- To unsubscribe from this list: send the line "unsub

Re: [PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-22 Thread Christoph Hellwig
On Wed, Jun 22, 2016 at 09:57:01AM +0800, Wang Xiaoguang wrote: > And below test case can reveal this bug: Please wire this up for xfstests, 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 a