Re: brtfs BUG and erroneous IO

2017-10-26 Thread Liu Bo
On Thu, Oct 26, 2017 at 09:01:33PM +0200, Guillaume Bouchard wrote: > Hi. > > I have a btrfs filesystem on linux 4.13.9 mounted with this options: > > /dev/sda3 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=5,subvol=/) > /dev/sda3 on /nix/store type btrfs >

Re: What is the purpose of EXTENT_PAGE_MAPPED

2017-10-26 Thread Liu Bo
On Tue, Oct 24, 2017 at 05:47:11AM -0500, Goldwyn Rodrigues wrote: > > EXTENT_PAGE_MAPPED gets set in set_page_extent_mapped(), but I don't see > it being cross checked anytime. What is the purpose of setting it? Please check commit d1310b2e0cd98eb1348553e69b73827b436dca7b, it was used to

Re: [PATCH] btrfs: fix offset in test Btrfs delalloc accounting overflow

2017-10-26 Thread robbieko
include Omar Sandoval. robbieko 於 2017-10-26 14:02 寫到: From: Robbie Ko Found it when test btrfs delalloc accounting overflow, Fix offset error. We will fill in the gaps between the created extents, then outstanding extents will all be merged into 1. Signed-off-by:

[PATCH v3 2/2] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-26 Thread Qu Wenruo
New test case to test if the minimal device size given by "mkfs.btrfs" failure case is valid. Signed-off-by: Qu Wenruo --- tests/mkfs-tests/010-small-image/test.sh | 49 1 file changed, 49 insertions(+) create mode 100755

[PATCH v3 1/2] btrfs-progs: test/common: Introduce run_mustfail_stdout and enhance prepare_test_dev

2017-10-26 Thread Qu Wenruo
Introduce a new function, run_mustfail_stdout(), which is similar to run_mustfail(), with extra output redirection. Also this new run_mustfail_stdout() doesn't set pipefail and use temporary file to catch the output. So it doesn't support command with pipeline. Also enhance prepare_test_dev() to

Re: [PATCH 2/4] btrfs-progs: fsck: Introduce --fix-dev-size option

2017-10-26 Thread Qu Wenruo
On 2017年10月27日 02:58, David Sterba wrote: > On Wed, Oct 11, 2017 at 08:43:24AM +0800, Qu Wenruo wrote: >> On 2017年10月10日 21:16, David Sterba wrote: >>> On Tue, Oct 10, 2017 at 07:51:11AM +, Qu Wenruo wrote: Introduce --fix-dev-size option to fix device related problems. >>> >>> Please

Re: [PATCH v2 3/3] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-26 Thread Qu Wenruo
On 2017年10月27日 01:45, David Sterba wrote: > On Mon, Oct 16, 2017 at 04:22:58PM +0800, Qu Wenruo wrote: >> New test case to test if the minimal device size given by "mkfs.btrfs" >> failure case is valid. >> >> Signed-off-by: Qu Wenruo >> --- >> v2: >> Nothing >> --- >>

Re: Need some assistance/direction in determining a system hang during heavy IO (resolved)

2017-10-26 Thread Cheyenne Wills
On Thu, Oct 26, 2017 at 11:41 AM, Roman Mamedov wrote: > On Thu, 26 Oct 2017 09:40:19 -0600 > Cheyenne Wills wrote: > >> Briefly when I upgraded a system from 4.0.5 kernel to 4.9.5 (and >> later) I'm seeing a blocked task timeout with heavy IO against

RE: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Peter Grandi
>> But it could simply be that you have forgotten to refresh the >> 'initramfs' with 'mkinitrd' after modifying the '/etc/fstab'. > I finally managed it. I'm pretty sure having changed > /boot/grub/menu.lst, but somehow changes got lost/weren't > saved ? So the next thing to check would indeed

brtfs BUG and erroneous IO

2017-10-26 Thread Guillaume Bouchard
Hi. I have a btrfs filesystem on linux 4.13.9 mounted with this options: /dev/sda3 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=5,subvol=/) /dev/sda3 on /nix/store type btrfs (ro,relatime,ssd,space_cache,subvolid=5,subvol=/nix/store) (on nixos-17.09). I had the same issues with linux

Re: [PATCH 2/4] btrfs-progs: fsck: Introduce --fix-dev-size option

2017-10-26 Thread David Sterba
On Wed, Oct 11, 2017 at 08:43:24AM +0800, Qu Wenruo wrote: > On 2017年10月10日 21:16, David Sterba wrote: > > On Tue, Oct 10, 2017 at 07:51:11AM +, Qu Wenruo wrote: > >> Introduce --fix-dev-size option to fix device related problems. > > > > Please don't add it to 'check', this is not the right

Re: Kernel Oops / btrfs problems

2017-10-26 Thread Liu Bo
On Wed, Oct 25, 2017 at 02:05:48PM +0200, andreas.bt...@diezwickers.de wrote: > Hi, > > I've had problems with a btrfs filesystem on a usb disk. I made a > successfull backup of all data and created the filesystem from scratch. > I'm not able to restore all backuped data because of a kernel oops.

Re: [PATCH 0/2] btrfs-progs: fi: enable fi usage for filesystem top of seed device

2017-10-26 Thread David Sterba
On Mon, Oct 23, 2017 at 01:43:23PM +0900, Misono, Tomohiro wrote: > Currently "fi usage" (and "dev usage") cannot run for the filesystem using > seed device. > > This is because FS_INFO ioctl returns the number of devices excluding > seeds, but load_device_info() tries to access valid device from

Re: [PATCH v2 6/6] btrfs-progs: rescue: Fix zero-log mounted branch

2017-10-26 Thread David Sterba
On Tue, Oct 17, 2017 at 05:13:12PM +0800, Qu Wenruo wrote: > Seems to be a typo that, in (ret > 0) branch of check_mounted(), > zero-log set the return value but doesn't return. > > Fix it by adding back the missing return. > > Signed-off-by: Qu Wenruo Applied, thanks. -- To

Re: [PATCH] btrfs-progs: qgroup: fix qgroup show sort by multi items

2017-10-26 Thread David Sterba
On Thu, Oct 26, 2017 at 04:32:51PM +0800, Lu Fengqi wrote: > We should not free the string until we don't call strtok any longer. > > If the string is freed in advance, in fact, the second and subsequent > sort items will be ignored. > > Fixes: 9fcdf8f8945b ("btrfs-progs: don't write to optarg

Re: Need some assistance/direction in determining a system hang during heavy IO

2017-10-26 Thread Cheyenne Wills
On Thu, Oct 26, 2017 at 11:41 AM, Roman Mamedov wrote: > On Thu, 26 Oct 2017 09:40:19 -0600 > Cheyenne Wills wrote: > >> Briefly when I upgraded a system from 4.0.5 kernel to 4.9.5 (and >> later) I'm seeing a blocked task timeout with heavy IO against

RE: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Lentes, Bernd
> -Original Message- > From: Andrei Borzenkov [mailto:arvidj...@gmail.com] > Sent: Thursday, October 26, 2017 6:51 PM > To: Lentes, Bernd ; Btrfs ML > > Subject: Re: SLES 11 SP4: can't mount btrfs > > root device

Re: [PATCH v2 1/3] btrfs-progs: Refactor test_minimum_size to use calculated minimal device size

2017-10-26 Thread David Sterba
On Mon, Oct 16, 2017 at 04:31:12PM +0800, Lu Fengqi wrote: > On Mon, Oct 16, 2017 at 04:22:56PM +0800, Qu Wenruo wrote: > >test_minimum_size() function is only called to check if provided device > >is large enough. > > > >However the minimal device size only needs to be calculated once, and > >can

Re: [PATCH v2 3/3] btrfs-progs: test/mkfs: Test if the minimal device size is valid

2017-10-26 Thread David Sterba
On Mon, Oct 16, 2017 at 04:22:58PM +0800, Qu Wenruo wrote: > New test case to test if the minimal device size given by "mkfs.btrfs" > failure case is valid. > > Signed-off-by: Qu Wenruo > --- > v2: > Nothing > --- > tests/common | 57 >

Re: Need some assistance/direction in determining a system hang during heavy IO

2017-10-26 Thread Roman Mamedov
On Thu, 26 Oct 2017 09:40:19 -0600 Cheyenne Wills wrote: > Briefly when I upgraded a system from 4.0.5 kernel to 4.9.5 (and > later) I'm seeing a blocked task timeout with heavy IO against a > multi-lun btrfs filesystem. I've tried a 4.12.12 kernel and am still >

Re: [PATCH] btrfs-progs: convert: Open the fs readonly for rollback

2017-10-26 Thread David Sterba
On Thu, Oct 26, 2017 at 08:35:29AM +, Gu, Jinxiang wrote: > > Cc: dste...@suse.cz > > Subject: [PATCH] btrfs-progs: convert: Open the fs readonly for rollback > > > > For rollback, we only needs to open the fs to check if it meets the > > condition to rollback. > > And this RW read makes us

Re: [PATCH v2 0/6] Rootdir refactor and small bug fixes

2017-10-26 Thread David Sterba
On Thu, Oct 19, 2017 at 01:41:32PM +0800, Qu Wenruo wrote: > Sorry for the v2 patchset, just added a new 3-line patch. > But since it can screw up bisect, I re-send the whole patchset, to make > the new patch just before mkfs return value fix, so bisect will work as > it used to do. > > > First

Re: [PATCH v2 5/6] btrfs-progs: mkfs: Move image creation of rootdir to its own files

2017-10-26 Thread David Sterba
On Thu, Oct 19, 2017 at 01:41:37PM +0800, Qu Wenruo wrote: > index d0657aaea0f5..12747547766f 100644 > --- a/Makefile > +++ b/Makefile > @@ -113,7 +113,7 @@ cmds_objects = cmds-subvolume.o cmds-filesystem.o > cmds-device.o cmds-scrub.o \ > cmds-restore.o cmds-rescue.o chunk-recover.o

Re: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Andrei Borzenkov
26.10.2017 15:18, Lentes, Bernd пишет: > >> -Original Message- >> From: linux-btrfs-ow...@vger.kernel.org >> [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Lentes, Bernd >> Sent: Tuesday, October 24, 2017 6:44 PM >> To: Btrfs ML >> Subject: RE: SLES

RE: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Lentes, Bernd
> -Original Message- > From: linux-btrfs-ow...@vger.kernel.org [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Peter Grandi > Sent: Thursday, October 26, 2017 2:55 PM > To: Linux fs Btrfs > Subject: RE: SLES 11 SP4: can't mount btrfs > > > I

Re: btrfs-subv-backup v0.1b

2017-10-26 Thread Austin S. Hemmelgarn
On 2017-10-26 11:25, Marat Khalili wrote: Hello Austin, Looks very useful. Two questions: 1. Can you release it under some standard license recognized by github, in case someone wants to include it in other projects? AGPL-3.0 would be nice. The intent is for it to be under what Github calls

Need some assistance/direction in determining a system hang during heavy IO

2017-10-26 Thread Cheyenne Wills
A while back I opened an issue in the IO/Storage Block layer in kernel bugzilla -- though it may be going to the wrong queue. Was wondering if someone could take a quick look at https://bugzilla.kernel.org/show_bug.cgi?id=193331 and see if the problem rings a bell, or if it's in the wrong

Re: btrfs-subv-backup v0.1b

2017-10-26 Thread Marat Khalili
Hello Austin, Looks very useful. Two questions: 1. Can you release it under some standard license recognized by github, in case someone wants to include it in other projects? AGPL-3.0 would be nice. 2. I don't understand mentioned restore performance issues. It shouldn't apply if data is

Re: [PATCH v2 4/6] btrfs: qgroup: Fix wrong qgroup reservation update for relationship modification

2017-10-26 Thread Qu Wenruo
On 2017年10月26日 22:00, Nikolay Borisov wrote: > > > On 25.10.2017 05:54, Qu Wenruo wrote: >> When modifying qgroup relationship, for qgroup which only owns exclusive >> extents, we will go through quick update path. >> >> In quick update path, we will adding/substracting exclusive and reference

Re: [PATCH v2 4/6] btrfs: qgroup: Fix wrong qgroup reservation update for relationship modification

2017-10-26 Thread Nikolay Borisov
On 25.10.2017 05:54, Qu Wenruo wrote: > When modifying qgroup relationship, for qgroup which only owns exclusive > extents, we will go through quick update path. > > In quick update path, we will adding/substracting exclusive and reference > number for parent qgroup, since the source (child)

btrfs-subv-backup v0.1b

2017-10-26 Thread Austin S. Hemmelgarn
As previously mentioned on the list, I've written up a script to back up BTRFS subvolume structures in regular file-based backups. As of right now, it's still a bit rough around the edges, but it's cleaned up enough that I consider it of at least beta quality, and therefore fit for more

RE: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Peter Grandi
> I formatted the / partition with Btrfs again and could restore > the files from a backup. Everything seems to be there, I can > mount the Btrfs manually. [ ... ] But SLES finds from where I > don't know a UUID (see screenshot). This UUID is commented out > in fstab and replaced by

RE: SLES 11 SP4: can't mount btrfs

2017-10-26 Thread Lentes, Bernd
> -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Lentes, Bernd > Sent: Tuesday, October 24, 2017 6:44 PM > To: Btrfs ML > Subject: RE: SLES 11 SP4: can't mount btrfs > > > > > > A

[PATCH] btrfs-progs: qgroup: allow show qgroup in order of subvol path

2017-10-26 Thread Lu Fengqi
You may want to sort qgroup with the subvol path, now you can use --sort=path. Signed-off-by: Lu Fengqi --- Documentation/btrfs-qgroup.asciidoc | 2 +- cmds-qgroup.c | 2 +- qgroup.c| 22 +-

[PATCH v2] btrfs-progs: qgroup: show subvol path when qgroup show

2017-10-26 Thread Lu Fengqi
Show the absolute subvol path for the associated level-0 qgroup. Signed-off-by: Lu Fengqi --- V2: default show subvol path The cleanup associated with add_qgroup will be submitted later. qgroup.c | 126 ++-

RE: [PATCH] btrfs-progs: convert: Open the fs readonly for rollback

2017-10-26 Thread Gu, Jinxiang
> -Original Message- > From: linux-btrfs-ow...@vger.kernel.org > [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Qu Wenruo > Sent: Thursday, October 26, 2017 3:29 PM > To: linux-btrfs@vger.kernel.org > Cc: dste...@suse.cz > Subject: [PATCH] btrfs-progs: convert: Open the fs

[PATCH] btrfs-progs: qgroup: fix qgroup show sort by multi items

2017-10-26 Thread Lu Fengqi
We should not free the string until we don't call strtok any longer. If the string is freed in advance, in fact, the second and subsequent sort items will be ignored. Fixes: 9fcdf8f8945b ("btrfs-progs: don't write to optarg in btrfs_qgroup_parse_sort_string") Signed-off-by: Lu Fengqi

Re: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

2017-10-26 Thread Eryu Guan
On Thu, Oct 26, 2017 at 07:16:02AM +, Gu, Jinxiang wrote: > Hi, > > > -Original Message- > > From: Eryu Guan [mailto:eg...@redhat.com] > > Sent: Thursday, October 26, 2017 2:52 PM > > To: Gu, Jinxiang/顾 金香 > > Cc: fste...@vger.kernel.org;

Re: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

2017-10-26 Thread Qu Wenruo
On 2017年10月26日 15:13, Qu Wenruo wrote: > > > On 2017年10月26日 14:52, Eryu Guan wrote: >> On Thu, Oct 26, 2017 at 01:57:46PM +0800, Gu Jinxiang wrote: >>> From: Gu JinXiang >>> >>> btrfs-progs now support FST in read-only mode, so when space_cache=v2 >>> enabled, this test

[PATCH] btrfs-progs: convert: Open the fs readonly for rollback

2017-10-26 Thread Qu Wenruo
For rollback, we only needs to open the fs to check if it meets the condition to rollback. And this RW read makes us failed to rollback btrfs with v2 space cache. In fact, we don't even start a transaction during rollback. So open the fs RO for rollback, to avoid v2 space cache problem.

RE: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

2017-10-26 Thread Gu, Jinxiang
Hi, > -Original Message- > From: Eryu Guan [mailto:eg...@redhat.com] > Sent: Thursday, October 26, 2017 2:52 PM > To: Gu, Jinxiang/顾 金香 > Cc: fste...@vger.kernel.org; linux-btrfs@vger.kernel.org > Subject: Re: [PATCH] xfstests: Add message indicating btrfs-progs

Re: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

2017-10-26 Thread Qu Wenruo
On 2017年10月26日 14:52, Eryu Guan wrote: > On Thu, Oct 26, 2017 at 01:57:46PM +0800, Gu Jinxiang wrote: >> From: Gu JinXiang >> >> btrfs-progs now support FST in read-only mode, so when space_cache=v2 >> enabled, this test case will fail. >> Add message to help user to

Re: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

2017-10-26 Thread Eryu Guan
On Thu, Oct 26, 2017 at 01:57:46PM +0800, Gu Jinxiang wrote: > From: Gu JinXiang > > btrfs-progs now support FST in read-only mode, so when space_cache=v2 > enabled, this test case will fail. > Add message to help user to understand this status. Sorry, I don't quite

[PATCH] btrfs: fix offset in test Btrfs delalloc accounting overflow

2017-10-26 Thread robbieko
From: Robbie Ko Found it when test btrfs delalloc accounting overflow, Fix offset error. We will fill in the gaps between the created extents, then outstanding extents will all be merged into 1. Signed-off-by: Robbie Ko --- tests/btrfs/010 | 2 +-