Re: [BUG] bogus out of space reported when mounted raid1 degraded

2014-07-24 Thread Duncan
Chris Murphy posted on Wed, 23 Jul 2014 19:13:10 -0600 as excerpted: On Jul 22, 2014, at 11:24 PM, Duncan 1i5t5.dun...@cox.net wrote: ** ON BTRFS RAID1, TWO DEVICES MUST BE PRESENT IN ORDERED TO ALLOCATE NEW CHUNKS. MOUNTING DEGRADED WITH A SINGLE DEVICE MEANS NO NEW CHUNK ALLOCATION,

[PATCH] Btrfs-progs: remove author and copyright info from man page

2014-07-24 Thread Wang Shilong
From: http://man7.org/linux/man-pages/man7/man-pages.7.html ... AUTHORS lists authors of the documentation or program.Use of an AUTHORS section is strongly discouraged. Generally, it is better not to clutter every page with a list of (over time potentially numerous) authors; if you write or

Re: feature request: consider rw subvols ro for send when volume is mounted ro

2014-07-24 Thread David Sterba
On Wed, Jul 23, 2014 at 01:47:36PM -0700, Zach Brown wrote: On Wed, Jul 23, 2014 at 02:10:29PM -0600, Chris Murphy wrote: The use case is when it's possible to mount a Btrfs volume ro, but not rw. Example, a situation where # mount -o degraded /dev/sdb /mnt [ 71.064352] BTRFS info

Re: [PATCH 1/6] Btrfs: fix wrong skipping compression for an inode

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:09AM +0800, Wang Shilong wrote: If a file's compression ratios is bad, we will set NOCOMPRESS flag for it, and it will skip compression for that inode next time. However, if we remount fs to COMPRESS_FORCE, it still should try if we could compress pages for that

Re: [PATCH 2/6] Btrfs: fall into nocompression codes quickly if possible

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:10AM +0800, Wang Shilong wrote: If flag NOCOMPRESS is set which means bad compression ratio, we could avoid call cow_file_range_async() for this case earlier. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz -- To

Re: [PATCH 3/6] Btrfs: fix off-by-one in cow_file_range_inline()

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:11AM +0800, Wang Shilong wrote: Btrfs could still inline file data if its size is same as page size, so don't skip max value here. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz -- To unsubscribe from this list:

Re: [PATCH 4/6] Btrfs: fix wrong max inline data size limit

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:12AM +0800, Wang Shilong wrote: inline data is stored from offset of @disk_bytenr in struct btrfs_file_extent_item. So substracting total size of struct btrfs_file_extent_item is wrong, fix it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by:

Re: [PATCH 5/6] Btrfs: fix wrong write range for filemap_fdatawrite_range()

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:13AM +0800, Wang Shilong wrote: filemap_fdatawrite_range() expect the third arg to be @end not @len, fix it. Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz Good catch. -- To unsubscribe from this list: send the

Re: [PATCH 6/6] Btrfs: fix wrong extent mapping for DirectIO

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 11:44:14AM +0800, Wang Shilong wrote: btrfs_next_leaf() will use current leaf's last key to search and then return a bigger one. So it may still return a file extent item that is smaller than expected value and we will get an overflow here for @em-len. This is easy

[PATCH] Btrfs: btrfs_put_tree_mod_seq: Don't delete an entry whose seq number is min_seq.

2014-07-24 Thread Chandan Rajendra
The current code allows a tree mod log entry whose seq number is equal to min_seq to be deleted. Fix this. Signed-off-by: Chandan Rajendra chan...@linux.vnet.ibm.com --- fs/btrfs/ctree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index

Re: [PATCH] btrfs: Return right extent when fiemap gives unaligned offset and len.

2014-07-24 Thread David Sterba
On Fri, Jul 18, 2014 at 09:55:43AM +0800, Qu Wenruo wrote: When page aligned start and len passed to extent_fiemap(), the result is good, but when start and len is not aligned, e.g. start = 1 and len = 4095 is passed to extent_fiemap(), it returns no extent. The problem is that start and len

Re: [PATCH 1/2] btrfs: Call mount_subtree() even 'subvolid=' mount option is given.

2014-07-24 Thread David Sterba
On Wed, Jul 16, 2014 at 12:07:10PM +0800, Qu Wenruo wrote: btrfs uses differnet routine to handle 'subvolid=' and 'subvol=' mount option. Given 'subvol=' mount option, btrfs will mount btrfs first and then call mount_subtree() to mount a subtree of btrfs, making vfs handle the path searching.

Re: [PATCH] btrfs: Add show_path function for btrfs_super_ops.

2014-07-24 Thread David Sterba
On Mon, Jul 21, 2014 at 05:02:29PM +0800, Qu Wenruo wrote: show_path() function in struct super_operations is used to output subtree mount info for mountinfo. Without the implement of show_path() function, user can not found where each subvolume is mounted if using 'subvolid=' mount option.

Re: [PATCH 01/10] Btrfs: Fix the problem that the replace destroys the seed filesystem

2014-07-24 Thread David Sterba
On Thu, Jul 24, 2014 at 11:37:06AM +0800, Miao Xie wrote: The seed filesystem was destroyed by the device replace, the reproduce method is: # mkfs.btrfs -f dev0 # btrfstune -S 1 dev0 # mount dev0 mnt # btrfs device add dev1 mnt # umount mnt # mount dev1 mnt # btrfs replace start -f

Re: [PATCH 03/10] Btrfs: fix wrong fsid check of scrub

2014-07-24 Thread David Sterba
On Thu, Jul 24, 2014 at 11:37:08AM +0800, Miao Xie wrote: All the metadata in the seed devices has the same fsid as the fsid of the seed filesystem which is on the seed device, so we should check them by the current filesystem. Fix it. Signed-off-by: Miao Xie mi...@cn.fujitsu.com

Re: [PATCH 04/10] Btrfs: fix wrong generation check of super block on a seed device

2014-07-24 Thread David Sterba
On Thu, Jul 24, 2014 at 11:37:09AM +0800, Miao Xie wrote: The super block generation of the seed devices is not the same as the filesystem which sprouted from them because we don't update the super block on the seed devices when we change that new filesystem. So we should not use the

Re: [PATCH 02/10] Btrfs: don't write any data into a readonly device when scrub

2014-07-24 Thread David Sterba
On Thu, Jul 24, 2014 at 11:37:07AM +0800, Miao Xie wrote: We should not write data into a readonly device especially seed device when doing scrub, skip those devices. Signed-off-by: Miao Xie mi...@cn.fujitsu.com Reviewed-by: David Sterba dste...@suse.cz One minor comment below. @@ -2904,6

Re: [PATCH 06/10] Btrfs: Fix the problem that the dirty flag of dev stats is cleared

2014-07-24 Thread David Sterba
On Thu, Jul 24, 2014 at 11:37:11AM +0800, Miao Xie wrote: The io error might happen during writing out the device stats, and the device stats information and dirty flag would be update at that time, but the current code didn't consider this case, just clear the dirty flag, it would cause that

[PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Liu Bo
When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these 'clean' pages will simply skip 'submit' part and go to endio directly, at last we got data corruption as we

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Chris Mason
On 07/24/2014 10:48 AM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these 'clean' pages will simply skip 'submit' part and go to endio

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Chris Mason
On 07/23/2014 06:47 PM, Martin Steigerwald wrote: Am Dienstag, 15. Juli 2014, 17:08:27 schrieb Martin Steigerwald: Am Dienstag, 15. Juli 2014, 09:21:40 schrieb Chris Mason: On 07/14/2014 05:58 PM, Martin Steigerwald wrote: Am Montag, 14. Juli 2014, 16:12:22 schrieb Chris Mason: On 07/14/2014

[PATCH] btrfs-progs: add zero-log to rescue subcommand

2014-07-24 Thread David Sterba
Copy the functionality of standalone btrfs-zero-log to the main tool. The standalone utility will be removed later. Signed-off-by: David Sterba dste...@suse.cz --- cmds-rescue.c | 49 - 1 file changed, 48 insertions(+), 1 deletion(-) diff --git

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Martin Steigerwald
Am Donnerstag, 24. Juli 2014, 10:58:51 schrieb Chris Mason: On 07/23/2014 06:47 PM, Martin Steigerwald wrote: Am Dienstag, 15. Juli 2014, 17:08:27 schrieb Martin Steigerwald: Am Dienstag, 15. Juli 2014, 09:21:40 schrieb Chris Mason: On 07/14/2014 05:58 PM, Martin Steigerwald wrote: Am

Re: 1 week to rebuid 4x 3TB raid10 is a long time!

2014-07-24 Thread Chris Murphy
On Jul 22, 2014, at 11:13 AM, Chris Murphy li...@colorremedies.com wrote: It's been a while since I did a rebuild on HDDs, So I did this yesterday and day before with an SSD and HDD in raid1, and made the HDD do the rebuild. Baseline for this hard drive: hdparm -t 35.68 MB/sec dd

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Martin Steigerwald
Am Donnerstag, 24. Juli 2014, 10:58:51 schrieb Chris Mason: On 07/23/2014 06:47 PM, Martin Steigerwald wrote: Am Dienstag, 15. Juli 2014, 17:08:27 schrieb Martin Steigerwald: Am Dienstag, 15. Juli 2014, 09:21:40 schrieb Chris Mason: On 07/14/2014 05:58 PM, Martin Steigerwald wrote: Am

Re: [PATCH 2/4 v3] fiemap: add EXTENT_DATA_COMPRESSED flag

2014-07-24 Thread David Sterba
On Thu, Jul 17, 2014 at 12:07:57AM -0600, Andreas Dilger wrote: any progress on this patch series? I'm sorry I got distracted at the end of year and did not finish the series. I never saw an updated version of this patch series after the last round of reviews, but it would be great to move it

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Chris Mason
On 07/24/2014 02:49 PM, Martin Steigerwald wrote: Am Donnerstag, 24. Juli 2014, 10:58:51 schrieb Chris Mason: On 07/23/2014 06:47 PM, Martin Steigerwald wrote: Am Dienstag, 15. Juli 2014, 17:08:27 schrieb Martin Steigerwald: Am Dienstag, 15. Juli 2014, 09:21:40 schrieb Chris Mason: On

Re: [PATCH, RFC] btrfs: refactor open_ctree()

2014-07-24 Thread Chris Mason
On 06/25/2014 07:55 PM, Eric Sandeen wrote: First off: total RFC, don't merge this; it builds, but is totally untested. open_ctree() is almost 1000 lines long. I've started trying to refactor it, primarily into helper functions, and also simplifying (?) things a bit at the beginning by

Re: [PATCH RFC] btrfs: Use backup superblocks if and only if the first superblock is valid but corrupted.

2014-07-24 Thread Chris Mason
On 06/26/2014 11:53 PM, Qu Wenruo wrote: Current btrfs will only use the first superblock, making the backup superblocks only useful for 'btrfs rescue super' command. The old problem is that if we use backup superblocks when the first superblock is not valid, we will be able to mount a

Re: [PATCH 2/4 v3] fiemap: add EXTENT_DATA_COMPRESSED flag

2014-07-24 Thread Andreas Dilger
On Jul 24, 2014, at 1:22 PM, David Sterba dste...@suse.cz wrote: On Thu, Jul 17, 2014 at 12:07:57AM -0600, Andreas Dilger wrote: any progress on this patch series? I'm sorry I got distracted at the end of year and did not finish the series. I never saw an updated version of this patch

Re: [PATCH, RFC] btrfs: refactor open_ctree()

2014-07-24 Thread Eric Sandeen
On 7/24/14, 4:25 PM, Chris Mason wrote: On 06/25/2014 07:55 PM, Eric Sandeen wrote: First off: total RFC, don't merge this; it builds, but is totally untested. open_ctree() is almost 1000 lines long. I've started trying to refactor it, primarily into helper functions, and also simplifying

Re: [PATCH] btrfs: Add show_path function for btrfs_super_ops.

2014-07-24 Thread Qu Wenruo
Thanks for the comment. Original Message Subject: Re: [PATCH] btrfs: Add show_path function for btrfs_super_ops. From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2014年07月24日 21:09 On Mon, Jul 21, 2014 at 05:02:29PM +0800, Qu Wenruo wrote:

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Liu Bo
On Thu, Jul 24, 2014 at 10:55:47AM -0400, Chris Mason wrote: On 07/24/2014 10:48 AM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these

Re: [PATCH 1/2] btrfs: Call mount_subtree() even 'subvolid=' mount option is given.

2014-07-24 Thread Qu Wenruo
Thanks for your comment. I'm very sorry that this patch takes your time to review, but later patch(show_path one) should replace this patch. As mentioned in that thread, this patch is not completly working. And in fact, show_path() patch is the v2 version of this patch, but due to change of

Re: btrfs_qgroup_create unused parameter

2014-07-24 Thread Wang Shilong
Hi Kevin, On 07/25/2014 07:23 AM, Kevin Brandstatter wrote: I submitted a patch for this a week or two ago (https://patchwork.kernel.org/patch/4486121/), but latest for-linus doesn't have it merged, is it just being put of as minor, or is there a problem with it? I believe your patch will be

Re: [PATCH] btrfs: Return right extent when fiemap gives unaligned offset and len.

2014-07-24 Thread Qu Wenruo
Original Message Subject: Re: [PATCH] btrfs: Return right extent when fiemap gives unaligned offset and len. From: David Sterba dste...@suse.cz To: Qu Wenruo quwen...@cn.fujitsu.com Date: 2014年07月24日 20:17 On Fri, Jul 18, 2014 at 09:55:43AM +0800, Qu Wenruo wrote: When page

integration tree updated

2014-07-24 Thread Chris Mason
Hi everyone, I've pushed out my current integration branch. It does have a few of Miao Xie's patches missing because there were some rejects. I think this was just because some things got pulled in out of order, and I'll get it fixed up. Also missing is Mark's quota snapshot deletion fixes.

[PATCH v2] btrfs: Return right extent when fiemap gives unaligned offset and len.

2014-07-24 Thread Qu Wenruo
When page aligned start and len passed to extent_fiemap(), the result is good, but when start and len is not aligned, e.g. start = 1 and len = 4095 is passed to extent_fiemap(), it returns no extent. The problem is that start and len is all rounded up which causes the problem. This patch will

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Wang Shilong
On 07/24/2014 10:48 PM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to this compressed extent, and these 'clean' pages will simply skip 'submit' part and go to endio

Re: [PATCH] Btrfs: fix compressed write corruption on enospc

2014-07-24 Thread Wang Shilong
On 07/25/2014 10:08 AM, Liu Bo wrote: On Fri, Jul 25, 2014 at 09:53:43AM +0800, Wang Shilong wrote: On 07/24/2014 10:48 PM, Liu Bo wrote: When failing to allocate space for the whole compressed extent, we'll fallback to uncompressed IO, but we've forgotten to redirty the pages which belong to

Re: integration tree updated

2014-07-24 Thread Qu Wenruo
Hi chris, It seems that two of my wrong patches got merged in integration branch: 6068d17c8ab5bce946e9678ed2064e9f966cbe62 btrfs: Merge default subvolume mount codes into btrfs_mount_subvol(). 8a2166332e332541f13b34b7248c0f14f575731e btrfs: Call mount_subtree() even 'subvolid=' mount option is

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Duncan
Martin Steigerwald posted on Thu, 24 Jul 2014 20:49:37 +0200 as excerpted: It may take some time tough cause during compiling the kernel BTRFS hung again, which caused loss of KDE Baloo desktop search file index and parts of a mail I wrote in KMail. Heh. While I do run a kde(-lite) desktop,

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Nick Krause
On Thu, Jul 24, 2014 at 10:32 PM, Duncan 1i5t5.dun...@cox.net wrote: Martin Steigerwald posted on Thu, 24 Jul 2014 20:49:37 +0200 as excerpted: It may take some time tough cause during compiling the kernel BTRFS hung again, which caused loss of KDE Baloo desktop search file index and parts of

color box, display box, corrugated box, color card, blister card, color sleeve, hang tag, label

2014-07-24 Thread Jinghao Printing - CHINA
Hi, this is David Wu from Shanghai, China. We are a printing company, we can print color box, corrugated box, label, hang tag etc. Please let me know if you need these. I will send you the website then. Best regards, David Wu -- To unsubscribe from this list: send the line unsubscribe

[PATCH] mkfs.btrfs: round all device sizes to sectorsize

2014-07-24 Thread Eric Sandeen
make_btrfs() rounds down the first device size to a multiple of sectorsize: num_bytes = (num_bytes / sectorsize) * sectorsize; but subsequent device adds don't. This seems a bit odd inconsistent, and it makes xfstest btrfs/011 _notrun(), because it explicitly checks that devices are

Re: BTRFS hang with 3.16-rc5 (and also with 3.16-rc4)

2014-07-24 Thread Torbjørn
On 07/24/2014 04:58 PM, Chris Mason wrote: snip Liu Bo has a promising patch: https://patchwork.kernel.org/patch/4618421/ Please give it a shot. There's a second deadlock reading the free space cache, I'm still working on that one too. -chris I (as expected, my hang was with free space