Re: [PATCH] Fix bashism in fsck.btrfs for debian/ubuntu dash.

2015-05-21 Thread Dimitri John Ledkov
On 15 May 2015 at 21:28, Dimitri John Ledkov dimitri.j.led...@intel.com wrote: Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784911 Signed-off-by: Dimitri John Ledkov dimitri.j.led...@intel.com --- fsck.btrfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: btrfs: kernel BUG at mm/page-writeback.c:2286!

2015-05-21 Thread Govindarajulu Varadarajan
On Tue, 19 May 2015, Josef Bacik wrote: On 05/19/2015 03:55 AM, Govindarajulu Varadarajan wrote: Hi all I am seeing the following crash on my btrfs filesystem with nfs export. If I disable the nfs share and reboot, I do not hit the crash. Look like the crash happens on btrfs with nfs export.

Re: btrfs: kernel BUG at mm/page-writeback.c:2286!

2015-05-21 Thread Govindarajulu Varadarajan
On Tue, 19 May 2015, Piotr Szymaniak wrote: On Tue, May 19, 2015 at 09:43:10AM -0400, Chris Mason wrote: On 05/19/2015 03:55 AM, Govindarajulu Varadarajan wrote: 2286---BUG_ON(!PageLocked(page)); [ 166.769868] BTRFS info (device sdf): no csum found for inode 1154 start 43192320 [

Re: btrfs: kernel BUG at mm/page-writeback.c:2286!

2015-05-21 Thread Govindarajulu Varadarajan
On Tue, 19 May 2015, Chris Mason wrote: On 05/19/2015 09:54 AM, Piotr Szymaniak wrote: On Tue, May 19, 2015 at 09:43:10AM -0400, Chris Mason wrote: On 05/19/2015 03:55 AM, Govindarajulu Varadarajan wrote: 2286---BUG_ON(!PageLocked(page)); [ 166.769868] BTRFS info (device sdf): no csum

Re: [PATCH] btrfs-progs: Fix a bug which makes unfinished fsid change unrecoverable.

2015-05-21 Thread David Sterba
On Thu, May 21, 2015 at 10:24:21AM +0800, Qu Wenruo wrote: I didn't see this patch merged into 4.0.1. As without this patch, canceled fsid change process can't be recovered. There are only some of the fsid patches merged, the preparatory work. When the series looks ok up to some patch I think

Re: [PATCH] btrfs-progs: receive explicit parent support

2015-05-21 Thread lauri
Hi, My argument is that having this option present will mean that people will use it. Getting send/receive right is hard enough as it is without giving someone an option which can completely screw things up in *most* cases. I agree that providing workarounds like this is not nice, however

Re: Proposal for annotating _unstable_ pages

2015-05-21 Thread Kent Overstreet
On Thu, May 21, 2015 at 06:54:53PM +0200, Jan Kara wrote: On Wed 20-05-15 18:04:40, Kent Overstreet wrote: Yeah. I never figured out a sane way to migrate pages and keep everything else happy. Daniel Phillips is having a go at page forking for tux3; let's see if the questions about

[PATCH] fsck.btrfs: Fix bashism and bad getopts processing

2015-05-21 Thread Dimitri John Ledkov
First fix == bashism, as that is not accepted by e.g. Debian/Ubuntu dash. Secondly shift OPTIND, such that last parameter is checked to exist. Signed-off-by: Dimitri John Ledkov dimitri.j.led...@intel.com --- fsck.btrfs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] Fix bashism in fsck.btrfs for debian/ubuntu dash.

2015-05-21 Thread David Sterba
On Thu, May 21, 2015 at 09:19:59AM +0100, Dimitri John Ledkov wrote: On 15 May 2015 at 21:28, Dimitri John Ledkov dimitri.j.led...@intel.com wrote: Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784911 Signed-off-by: Dimitri John Ledkov dimitri.j.led...@intel.com ---

BTRFS RAID5 filesystem corruption during balance

2015-05-21 Thread Jan Voet
Hi, I recently upgraded a quite old home NAS system (Celeron M based) to Ubuntu 14.04 with an upgraded linux kernel (3.19.8) and BTRFS tools v3.17. This system has 5 brand new 6TB drives (HGST) with all drives directly handled by BTRFS, both data and metadata in RAID5. After loading up the

Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption.

2015-05-21 Thread David Sterba
On Thu, May 21, 2015 at 04:52:49PM +0200, David Sterba wrote: The test 001-bad-file-extent-bytenr fails with this patch (and passes otherwise). Can you please have a look? First check expectedly finds problems and fails, then repair is supposed to fix it, but the final check still finds

Re: [PATCH v2] btrfs: remove unused inode argument from uncompress_inline()

2015-05-21 Thread David Sterba
On Tue, May 19, 2015 at 11:46:45PM +0900, Byongho Lee wrote: The inode argument is never used from the beginning, so remove it. Change since v1: - Add missing Signed-off-by line. This ^^^ belongs ... Signed-off-by: Byongho Lee bhlee.ker...@gmail.com Reviewed-by: David Sterba

Re: shall I use BTRFS sub-volumes for top-level directories ?

2015-05-21 Thread Toralf Förster
On 05/13/2015 07:46 PM, Calvin Walton wrote: On Wed, 2015-05-13 at 16:13 +0200, Toralf Förster wrote: To support the Gentoo Linux ecosystem I do maintain a server as a tinderbox. I create chroot images based on various Gentoo minmal ISO images. I usually run 4 chroot image jobs in parallel.

Re: [PATCH] fsck.btrfs: Fix bashism and bad getopts processing

2015-05-21 Thread David Sterba
On Thu, May 21, 2015 at 01:50:55PM +0100, Dimitri John Ledkov wrote: First fix == bashism, as that is not accepted by e.g. Debian/Ubuntu dash. Secondly shift OPTIND, such that last parameter is checked to exist. Signed-off-by: Dimitri John Ledkov dimitri.j.led...@intel.com Applied,

Re: [PATCH 00/27 V5] provide framework so that sysfs attributs from the fs_devices can be added

2015-05-21 Thread Anand Jain
some confusion, sorry about that. will get seed-fsid under seeding dir. (However seeding name was already used by an (upcoming) attribute (fs_devices-seeding), but now I am thinking seeding as a kobject dir is better, so will rename the attribute to something else.. like seeding_flag).

Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption.

2015-05-21 Thread David Sterba
On Thu, May 14, 2015 at 11:06:24AM +0800, Qu Wenruo wrote: Add the following tree_block check to avoid memory corruption or hostile image: 1) Check level. Level = BTRFS_MAX_LEVEL won't be read out. 2) Nritems. For nritems == 0 or nr_items max_nritems, the tree_block won't be read out.

Re: [PATCH 00/27 V5] provide framework so that sysfs attributs from the fs_devices can be added

2015-05-21 Thread David Sterba
On Thu, May 21, 2015 at 10:48:52PM +0800, Anand Jain wrote: some confusion, sorry about that. will get seed-fsid under seeding dir. Great, thanks. (However seeding name was already used by an (upcoming) attribute (fs_devices-seeding), but now I am thinking seeding as a kobject dir

Re: BTRFS crash after flac tag writing

2015-05-21 Thread Daniël Sonck
There are no files smaller than 4k that I write to during tagging, I do write out 0 byte files to indicate the folder has been done if that gives any useful information. To specifically say what this script is doing. I had a large collection of tta rip files which I wanted to convert to

Re: BTRFS crash after flac tag writing

2015-05-21 Thread Daniël Sonck
I just ran the script two times, yes I can still produce it. The file my script eventually stops at is not the same file. I did not take note of the last done.txt file though, which could very well be around the same location. I'll look forward to any further instructions. In the mean time, since

Re: BTRFS crash after flac tag writing

2015-05-21 Thread Gareth Pye
Maybe try switching the script to not use the 0 byte file to indicate the directory is finished. That might let you determine if that is the issue. On Fri, May 22, 2015 at 10:06 AM, Daniël Sonck dsonc...@gmail.com wrote: I just ran the script two times, yes I can still produce it. The file my

Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption.

2015-05-21 Thread Qu Wenruo
Original Message Subject: Re: [PATCH] btrfs-progs: Enhance read_tree_block to avoid memory corruption. From: David Sterba dste...@suse.cz To: David Sterba dste...@suse.cz Date: 2015年05月21日 23:04 On Thu, May 21, 2015 at 04:52:49PM +0200, David Sterba wrote: The test

[PATCH v2] btrfs-progs: Enhance read_tree_block to avoid memory corruption

2015-05-21 Thread Qu Wenruo
Add the following tree block check to avoid memory corruption on hostile image: 1) Check level. Level = BTRFS_MAX_LEVEL won't be read out. 2) Nritems. For nr_items max_nritems, the tree_block won't be read out. Max nritems is calculated in a easy method. For node, it's straightforward, just

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

2015-05-21 Thread Qu Wenruo
Original Message Subject: Re: [PATCH 1/2] btrfs-progs: Fix a bug in __btrfs_map_block() always maps wrong stripe for DUP/RAID1 From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2015年05月22日 00:06 On Mon, May 11, 2015 at 08:45:47AM +0800, Qu

Re: BTRFS RAID5 filesystem corruption during balance

2015-05-21 Thread Duncan
Jan Voet posted on Thu, 21 May 2015 21:43:36 + as excerpted: I recently upgraded a quite old home NAS system (Celeron M based) to Ubuntu 14.04 with an upgraded linux kernel (3.19.8) and BTRFS tools v3.17. This system has 5 brand new 6TB drives (HGST) with all drives directly handled by

[PATCH 1/2] btrfs: Use ref_cnt for set_block_group_ro()

2015-05-21 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com More than one code call set_block_group_ro() and restore rw in fail. Old code use bool bit to save blockgroup's ro state, it can not support parallel case(it is confirmd exist in my debug log). This patch use ref count to store ro state, and rename

[PATCH 2/2] btrfs: Fix xfstests btrfs/070

2015-05-21 Thread Zhaolei
From: Zhao Lei zhao...@cn.fujitsu.com xfstests btrfs/070 sometimes failed. In my test machine, its fail rate is about 30%. In another vm(vmware), its fail rate is about 50%. Reason: btrfs/070 do replace and defrag with fsstress simultaneously, after above operation, checksum error is found by

[WIP][PATCH] tux3: preliminatry nospace handling

2015-05-21 Thread Daniel Phillips
Hi Josef, This is a rollup patch for preliminary nospace handling in Tux3, in line with my post here: http://lkml.iu.edu/hypermail/linux/kernel/1505.1/03167.html You still have ENOSPC issues. Maybe it would be helpful to look at what we have done. I saw a reproducible case with 1,000 tasks

Re: Proposal for annotating _unstable_ pages

2015-05-21 Thread Jan Kara
On Thu 21-05-15 11:09:55, Kent Overstreet wrote: On Thu, May 21, 2015 at 06:54:53PM +0200, Jan Kara wrote: On Wed 20-05-15 18:04:40, Kent Overstreet wrote: Yeah. I never figured out a sane way to migrate pages and keep everything else happy. Daniel Phillips is having a go at page

[PATCH 1/1 linux-next] btrfs: remove -ENOENT from test values in btrfs_get_acl()

2015-05-21 Thread Fabian Frederick
btrfs_get_acl() calls __btrfs_getxattr() and checks for returned value to assign acl. Like FIXME presumed, -ENOENT is not part of those possible values. btrfs_search_slot() explicitly returns 1 when the key isn't found (see function comment). This patch also simplifies code by giving NULL value

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

2015-05-21 Thread David Sterba
On Mon, May 11, 2015 at 08:45:47AM +0800, Qu Wenruo wrote: 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

[PATCH] btrfs-progs: use openat for process_clone in receive

2015-05-21 Thread jekarlson
From: Emil Karlson jekarl...@gmail.com This will fix breakage, when doing chrooted receive with cloned paths outside main subvolume. --- cmds-receive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-receive.c b/cmds-receive.c index b7cf3f9..b0a312c 100644 ---

Re: [PATCH] btrfs-progs: use openat for process_clone in receive

2015-05-21 Thread Emil Karlson
Greetigns I actually also tested this... btrfs on PATH is from btrfs-progs-4.0 and the other is the upstream master with the patch schur log # lzop -dc /home/sftponly/eira-receive/log/snapshot-2015-05-21T09.52.59N3f.far.lzo | /home/jkarlson/.local/repo/btrfs-progs/btrfs receive $PWD At

Re: Proposal for annotating _unstable_ pages

2015-05-21 Thread Jan Kara
On Wed 20-05-15 18:04:40, Kent Overstreet wrote: Yeah. I never figured out a sane way to migrate pages and keep everything else happy. Daniel Phillips is having a go at page forking for tux3; let's see if the questions about that get resolved. That would be great, we need something.

Re: [PATCH 0/8] Introduce offline fsid/chunk tree uuid change for btrfstune.

2015-05-21 Thread David Sterba
On Fri, May 15, 2015 at 11:42:57PM +0800, Anand Jain wrote: On 05/13/2015 09:43 PM, David Sterba wrote: On Tue, May 12, 2015 at 12:00:28PM +0800, Anand Jain wrote: I strongly recommend this feature to be part of btrfstune as of now, as originally planned by Qu. When its time to