[PATCH] btrfs-progs: qgroup: Fix a bug that fails to skip rescan running case

2016-06-15 Thread Qu Wenruo
Commit 6bdf962fe35a8648d(btrfs-progs: Read qgroup status for qgroup verify) will read qgroup status, and then use it to skip qgroup reporting. However since the rescan_running/inconsistent flags are only 1 bit long, while qgroup flags & BTRFS_QGROUP_FLAGS returns value longer than 1bit, it

Re: Process is blocked for more than 120 seconds

2016-06-15 Thread Dmitry Katsubo
On 2015-11-11 12:38, Dmitry Katsubo wrote: > On 2015-11-09 14:25, Austin S Hemmelgarn wrote: >> On 2015-11-07 07:22, Dmitry Katsubo wrote: >>> Hi everyone, >>> >>> I have noticed the following in the log. The system continues to run, >>> but I am not sure for how long it will be stable. Should I

Re: [PATCH] Btrfs: track transid for delayed ref flushing

2016-06-15 Thread Liu Bo
On Wed, Apr 27, 2016 at 09:59:38AM -0400, Chris Mason wrote: > On Mon, Apr 11, 2016 at 05:37:40PM -0400, Josef Bacik wrote: > > Using the offwakecputime bpf script I noticed most of our time was spent > > waiting > > on the delayed ref throttling. This is what is supposed to happen, but > >

Re: Replacing drives with larger ones in a 4 drive raid1

2016-06-15 Thread boli
>> So I was back to a 4-drive raid1, with 3x 6 TB drives and 1x 8 TB drive >> (though that 8 TB drive had very little data on it). Then I tried to >> "remove" (without "-r" this time) the 6 TB drive with the least amount >> of data on it (one had 4.0 TiB, where the other two had 5.45 TiB each). >>

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-15 Thread Liu Bo
On Wed, Jun 15, 2016 at 03:50:17PM +0530, Chandan Rajendra wrote: > On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > > Hello Liu Bo, > > > > We have to fix the following check in check_super() as well, > > > >if (btrfs_super_stripesize(sb) != 4096) { > >

[PATCH 2/2] btrfs-progs: btrfsck: verify qgroups above level 0

2016-06-15 Thread Mark Fasheh
At the moment we only check subvolume quota groups (level 0). With this patch we can check groups above 0, thus verifying the entire qgroup hierarchy on a file system. The accounting portion of this patch is modeled after the kernel - we are essentially reimplementing the 'quota rescan' case

[PATCH 0/2] btrfs-progs: qgroup verification update

2016-06-15 Thread Mark Fasheh
Hi David, The following two patches update the qgroup verification code in btrfsck to understand entire qgroup hierarchies. The first patch is a simple bugfix for some leaked objects and can be taken separately if you like. The 2nd patch implements the actual verification update. If you prefer

Re: [PATCH] Btrfs: add missing check for writeback errors on fsync

2016-06-15 Thread Liu Bo
On Tue, Jun 14, 2016 at 08:50:22PM +0100, fdman...@kernel.org wrote: > From: Filipe Manana > > When we start an fsync we start ordered extents for all delalloc ranges. > However before attempting to log the inode, we only wait for those ordered > extents if we are not doing a

Re: BUG: unable to mount btrfs on ppc64 starting from v4.7-rc3 kernel

2016-06-15 Thread David Sterba
On Tue, Jun 14, 2016 at 11:24:04AM -0700, Liu Bo wrote: > > [ 1910.048650] BTRFS: device fsid 06813ff6-d585-4c54-b4df-b7d6920d27ba > > devid 1 transid 3 /dev/vda3 > > [ 1913.152085] BTRFS error (device vda3): invalid stripesize 4096 > > [ 1913.154349] BTRFS error (device vda3): superblock

Re: Balance fails with unallocated diskspace

2016-06-15 Thread Duncan
Nisse Karlsson posted on Wed, 15 Jun 2016 11:58:36 +0200 as excerpted: > Since I have about 1.5TB unallocated space it's my understanding that > this shouldn't be a problem, or am I completely wrong? Quick partial answer... It's not just unallocated space in total that matters, but also the

Re: Balance fails with unallocated diskspace

2016-06-15 Thread Nisse Karlsson
I've now tried mounting with nospace_cache as suggested in another thread, no difference. I also tried remounting with enospc_debug, but that didn't give me more info than before BTRFS info (device sdb): 523 enospc errors during balance //Nisse -- To unsubscribe from this list: send the line

Re: Cannot balance FS (No space left on device)

2016-06-15 Thread E V
In my experience phantom ENOSPC messages are frequently due to the free space cache being corrupt. Mounting with nospace_cache or space_cache=v2 may help. On Wed, Jun 15, 2016 at 6:59 AM, ojab // wrote: > On Fri, Jun 10, 2016 at 2:58 PM, ojab // wrote: >> [Please CC

Re: Cannot balance FS (No space left on device)

2016-06-15 Thread ojab //
On Fri, Jun 10, 2016 at 2:58 PM, ojab // wrote: > [Please CC me since I'm not subscribed to the list] So I'm still playing w/ btrfs and again I have 'No space left on device' during balance: >$ sudo /usr/bin/btrfs balance start --full-balance /mnt/xxx/ >ERROR: error during

[PATCH] Btrfs: add missing check for writeback errors on fsync

2016-06-15 Thread fdmanana
From: Filipe Manana When we start an fsync we start ordered extents for all delalloc ranges. However before attempting to log the inode, we only wait for those ordered extents if we are not doing a full sync (bit BTRFS_INODE_NEEDS_FULL_SYNC is set in the inode's flags). This

Re: [PATCH] Btrfs: let super_stripesize match with sectorsize

2016-06-15 Thread Chandan Rajendra
On Wednesday, June 15, 2016 09:12:28 AM Chandan Rajendra wrote: > Hello Liu Bo, > > We have to fix the following check in check_super() as well, > >if (btrfs_super_stripesize(sb) != 4096) { > error("invalid stripesize %u", btrfs_super_stripesize(sb)); >

Re: [PATCH] btrfs: avoid blocking open_ctree from cleaner_kthread

2016-06-15 Thread David Sterba
On Sun, Jun 12, 2016 at 11:39:58PM -0400, Zygo Blaxell wrote: > This fixes a problem introduced in commit > 2f3165ecf103599f82bf0ea254039db335fb5005 > "btrfs: don't force mounts to wait for cleaner_kthread to delete one or more > subvolumes". > > open_ctree eventually calls btrfs_replay_log

Re: [PATCH 6/6] fstests: btrfs: test RAID5 device reappear and balance

2016-06-15 Thread Anand Jain
On 06/12/2016 01:08 PM, Eryu Guan wrote: On Tue, May 17, 2016 at 10:32:10PM +0800, Anand Jain wrote: The test does the following: Initialize a RAID5 with some data Re-mount RAID5 degraded with _dev3_ missing and write data. Save md5sum checkpoint1 Re-mount healthy RAID5 Let balance fix

[PATCH v2 6/6] fstests: btrfs: test RAID5 device reappear and balance

2016-06-15 Thread Anand Jain
From: Anand Jain The test does the following: Initialize a RAID5 with some data Re-mount RAID5 degraded with _dev3_ missing and write data. Save md5sum checkpoint1 Re-mount healthy RAID5 Let balance fix degraded blocks. Save md5sum checkpoint2 Re-mount RAID1 degraded

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

2016-06-15 Thread Anand Jain
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 Save md5sum checkpoint1 Re-mount healthy RAID1 Let balance re-silver. Save md5sum checkpoint2

[PATCH v2 4/6] fstests: btrfs: add helper function to check if btrfs is module

2016-06-15 Thread Anand Jain
From: Anand Jain We need btrfs to be a module so that it can unloaded and reloaded, so that we can clean up the btrfs internal in memory device list. This patch adds _require_btrfs_unloadable() and _reload_btrfs_ko() to help with the same. Signed-off-by: Anand Jain

[PATCH v2 2/6] fstests: btrfs: add functions to get and put a device for replace target

2016-06-15 Thread Anand Jain
From: Anand Jain For the replace tests we need a device as a spare device, here functions _spare_dev_get() and _spare_dev_put() will get it from the SCRATCH_DEV_POOL_SAVED, which is set when _scratch_dev_pool_get() is called, and is based on how many has already been

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

2016-06-15 Thread Anand Jain
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_DEV_POOL_SAVED will hold all the devices. Usage: _scratch_dev_pool_get() :: do

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

2016-06-15 Thread Anand Jain
On 06/12/2016 01:06 PM, Eryu Guan wrote: On Tue, May 17, 2016 at 10:32:09PM +0800, Anand Jain wrote: 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 Save md5sum checkpoint1 Re-mount healthy

Re: [PATCH 2/6] fstests: btrfs: add functions to get and put a device for replace target

2016-06-15 Thread Anand Jain
On 06/12/2016 12:42 PM, Eryu Guan wrote: On Tue, May 17, 2016 at 10:32:06PM +0800, Anand Jain wrote: For the replace tests we need a device as a spare device, here functions _spare_dev_get() and _spare_dev_put() will get it from the SCRATCH_DEV_POOL_SAVED, which is set when

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

2016-06-15 Thread Anand Jain
Thanks for reviewing. On 06/12/2016 12:40 PM, Eryu Guan wrote: On Tue, May 17, 2016 at 10:32:05PM +0800, Anand Jain wrote: 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.

Re: [PATCH 4/6] fstests: btrfs: add helper function to check if btrfs is module

2016-06-15 Thread Anand Jain
On 06/12/2016 12:53 PM, Eryu Guan wrote: On Tue, May 17, 2016 at 10:32:08PM +0800, Anand Jain wrote: We need btrfs to be a module so that it can unloaded and reloaded, so that we can clean up the btrfs internal in memory device list. It looks like a bug to me if btrfs needs to reload module

Re: [PATCH] btrfs-progs: doc: correct the destination of btrfs-receive

2016-06-15 Thread David Sterba
On Wed, Jun 15, 2016 at 10:55:45AM +0900, Satoru Takeuchi wrote: > >> ie. all the context lines start with two spaces instead of one. I'll > >> apply this patch manually but please have a look. > > > >Looking at this, I suspect it's a consequence of sending it as > > "Content-Type:

Re: Fwd: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-15 Thread Duncan
Paul Verreth posted on Wed, 15 Jun 2016 08:29:49 +0200 as excerpted: > When I download a video using Firefox DownloadHelper addon, the > filesystem suddenly turns read only. Not a coincedence, I tried it > several times, and it happened every time again > > Info: > Linux wolfgang

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-15 Thread Paul Verreth
Hello Fajar. Thanks. But since I can't boot anymore from the filesystem I tried to repair the situation using a Xenial Live USB-stick with kernel 4.4.0-22-generic. Without any success. The balance seems active, but there is no noticable progress in DMESG, kern.log or using balance status. Kind

Re: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-15 Thread Fajar A. Nugraha
On Wed, Jun 15, 2016 at 1:29 PM, Paul Verreth wrote: > Dear all. > > When I download a video using Firefox DownloadHelper addon, the > filesystem suddenly turns read only. Not a coincedence, I tried it > several times, and it happened every time again > > Info: > Linux wolfgang

Fwd: BTRFS, remarkable problem: filesystem turns to read-only caused by firefox download

2016-06-15 Thread Paul Verreth
Dear all. When I download a video using Firefox DownloadHelper addon, the filesystem suddenly turns read only. Not a coincedence, I tried it several times, and it happened every time again Info: Linux wolfgang 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15 22:15:45 UTC 2016 x86_64 x86_64 x86_64