Re: "No space left on device" and balance doesn't work

2016-06-02 Thread Marc Haber
On Fri, Jun 03, 2016 at 12:45:51AM +0200, Henk Slager wrote: > The setup looks all pretty normal and btrfs should be able to handle > it, but unfortunately your fs is a typical example that one currently > needs to monitor/tune a btrfs fs for its 'health' in order to keep it > running longterm.

[PATCH v2 2/2] btrfs-progs: convert-tests: Add test case for backup superblock migration

2016-06-02 Thread Qu Wenruo
New convert introduced simpler chunk/extent allocation algorithm, at the cost of complex backup superblock migration codes. Use specially built ext2 images to test if btrfs-convert can convert and rollback images without problem. All these special ext2 image have blocks/holes across 2nd btrfs

[PATCH v2 1/2] btrfs-progs: convert-tests: Add support for custom test scripts

2016-06-02 Thread Qu Wenruo
Add support for custom convert test scripts, just like fsck tests. Instead of generic convert tests, we need more specifically created images for new convert tests. This patch provide the needed infrastructure for later convert test cases. Signed-off-by: Qu Wenruo ---

[PATCH] btrfs: chunk_width_limit mount option

2016-06-02 Thread Andrew Armenia
This patch adds mount option 'chunk_width_limit=X', which when set forces the chunk allocator to use only up to X devices when allocating a chunk. This may help reduce the seek penalties seen in filesystems with large numbers of devices. Signed-off-by: Andrew Armenia ---

Re: "No space left on device" and balance doesn't work

2016-06-02 Thread Henk Slager
On Thu, Jun 2, 2016 at 3:55 PM, MegaBrutal wrote: > 2016-06-02 0:22 GMT+02:00 Henk Slager : >> What is the kernel version used? >> Is the fs on a mechanical disk or SSD? >> What are the mount options? >> How old is the fs? > > Linux 4.4.0-22-generic (Ubuntu

Re: [BUG] receive not seeing file that exists

2016-06-02 Thread Henk Slager
On Thu, Jun 2, 2016 at 9:26 AM, Benedikt Morbach wrote: > Hi all, > > I've encountered a bug in btrfs-receive. When receiving a certain > incremental send, it will error with: > > ERROR: cannot open >

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread Mark Fasheh
On Thu, Jun 02, 2016 at 02:17:40PM -0700, Mark Fasheh wrote: > On Thu, Jun 02, 2016 at 04:56:06PM -0400, Jeff Mahoney wrote: > > On 6/2/16 3:08 PM, Mark Fasheh wrote: > > > On Thu, Jun 02, 2016 at 07:07:32PM +0200, David Sterba wrote: > > >> On Wed, Jun 01, 2016 at 02:15:22PM -0700, Mark Fasheh

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread Mark Fasheh
On Thu, Jun 02, 2016 at 04:56:06PM -0400, Jeff Mahoney wrote: > On 6/2/16 3:08 PM, Mark Fasheh wrote: > > On Thu, Jun 02, 2016 at 07:07:32PM +0200, David Sterba wrote: > >> On Wed, Jun 01, 2016 at 02:15:22PM -0700, Mark Fasheh wrote: > +/* dynamically allocate and initialize a ref_root */ >

Re: btrfs ENOSPC "not the usual problem"

2016-06-02 Thread Chris Murphy
On Thu, Jun 2, 2016 at 1:45 PM, Omari Stephens wrote: > [Note: not on list; please reply-all] > > I've read everything I can find about running out of space on btrfs, and it > hasn't helped. I'm currently dead in the water. > > Everything I do seems to make the problem

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread Jeff Mahoney
On 6/2/16 3:08 PM, Mark Fasheh wrote: > On Thu, Jun 02, 2016 at 07:07:32PM +0200, David Sterba wrote: >> On Wed, Jun 01, 2016 at 02:15:22PM -0700, Mark Fasheh wrote: +/* dynamically allocate and initialize a ref_root */ +static struct ref_root *ref_root_alloc(void) +{ + struct

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread Mark Fasheh
On Thu, Jun 02, 2016 at 01:46:27PM +0800, Lu Fengqi wrote: > > At 06/02/2016 05:15 AM, Mark Fasheh wrote: > >Thanks for trying to fix this problem, comments below. > > > >On Wed, Jun 01, 2016 at 01:48:05PM +0800, Lu Fengqi wrote: > >>Only in the case of different root_id or different object_id,

btrfs ENOSPC "not the usual problem"

2016-06-02 Thread Omari Stephens
[Note: not on list; please reply-all] I've read everything I can find about running out of space on btrfs, and it hasn't helped. I'm currently dead in the water. Everything I do seems to make the problem monotonically worse — I tried adding a loopback device to the fs, and now I can't

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread Mark Fasheh
On Thu, Jun 02, 2016 at 07:07:32PM +0200, David Sterba wrote: > On Wed, Jun 01, 2016 at 02:15:22PM -0700, Mark Fasheh wrote: > > > +/* dynamically allocate and initialize a ref_root */ > > > +static struct ref_root *ref_root_alloc(void) > > > +{ > > > + struct ref_root *ref_tree; > > > + > > > +

Re: [PATCH 1/2] btrfs-progs: convert: Fix a bug which fails to insert hole file extent

2016-06-02 Thread David Sterba
On Thu, Jun 02, 2016 at 03:22:49PM +0800, Qu Wenruo wrote: > When copying inode, if there is a file referring part of a hole range, > convert will fail. > > The problem is, when calculating real extent bytenr, it doesn't check if > the original extent is a hole. > > In case the orinal extent is

Re: [PATCH 2/2] btrfs-progs: convert-test: Add specially built test cases for new convert

2016-06-02 Thread David Sterba
On Thu, Jun 02, 2016 at 03:22:50PM +0800, Qu Wenruo wrote: > New convert introduced simpler chunk/extent allocation algorithm, at the > cost of complex backup superblock migration codes. > > Use specially built ext2 images to test if btrfs-convert can convert and > rollback images without

Re: [PATCH v2] btrfs: fix check_shared for fiemap ioctl

2016-06-02 Thread David Sterba
On Wed, Jun 01, 2016 at 02:15:22PM -0700, Mark Fasheh wrote: > > +/* dynamically allocate and initialize a ref_root */ > > +static struct ref_root *ref_root_alloc(void) > > +{ > > + struct ref_root *ref_tree; > > + > > + ref_tree = kmalloc(sizeof(*ref_tree), GFP_KERNEL); > > I'm pretty sure

Re: [BUG] receive not seeing file that exists

2016-06-02 Thread Benedikt Morbach
On Thu, Jun 2, 2016 at 6:35 PM, Chris Murphy wrote: > kernel and btrfs-profs versions? kernel: send:4.5.5 receive: 4.5.4 btrfs-progs (both): 4.5.3 -- Benedikt -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message

Re: [PATCH v3 05/22] btrfs-progs: Introduce function to setup temporary superblock

2016-06-02 Thread David Sterba
On Sun, May 29, 2016 at 06:52:41PM +0800, Qu Wenruo wrote: > >> + btrfs_set_super_leafsize(super, cfg->nodesize); > >> + btrfs_set_super_nodesize(super, cfg->nodesize); > >> + btrfs_set_super_stripesize(super, cfg->stripesize); > >> + btrfs_set_super_csum_type(super, BTRFS_CSUM_TYPE_CRC32); >

Re: [BUG] receive not seeing file that exists

2016-06-02 Thread Chris Murphy
On Thu, Jun 2, 2016 at 1:26 AM, Benedikt Morbach wrote: > > Let me know if you need anything else or if I misunderstood the tree > thing. (I _think_ I can also provide the with-data send, but I'd like > to take a look at that first ;) ) kernel and btrfs-profs

Re: How to map extents to files

2016-06-02 Thread Nikolaus Rath
On Jun 02 2016, Qu Wenruo wrote: > At 06/02/2016 11:06 AM, Nikolaus Rath wrote: >> Hello, >> >> For one of my btrfs volumes, btrfsck reports a lot of the following >> warnings: >> >> [...] >> checking extents >> bad extent [138477568, 138510336), type mismatch with chunk

Re: "No space left on device" and balance doesn't work

2016-06-02 Thread MegaBrutal
2016-06-02 0:22 GMT+02:00 Henk Slager : > What is the kernel version used? > Is the fs on a mechanical disk or SSD? > What are the mount options? > How old is the fs? Linux 4.4.0-22-generic (Ubuntu 16.04). Mechanical disks in LVM. Mount: /dev/mapper/centrevg-rootlv on / type

Re: "No space left on device" and balance doesn't work

2016-06-02 Thread Austin S. Hemmelgarn
On 2016-06-01 14:30, MegaBrutal wrote: Hi all, I have a 20 GB file system and df says I have about 2,6 GB free space, yet I can't do anything on the file system because I get "No space left on device" errors. I read that balance may help to remedy the situation, but it actually doesn't. Some

Re: [PATCH] btrfs: don't force mounts to wait for cleaner_kthread to delete one or more subvolumes

2016-06-02 Thread Filipe Manana
On Wed, Jun 1, 2016 at 5:39 AM, Zygo Blaxell wrote: > On Thu, May 05, 2016 at 12:23:49AM -0400, Zygo Blaxell wrote: >> During a mount, we start the cleaner kthread first because the transaction >> kthread wants to wake up the cleaner kthread. We start the

Re: Device replace issues and disabling it until they are solved

2016-06-02 Thread Filipe Manana
On Thu, Jun 2, 2016 at 11:03 AM, Yauhen Kharuzhy wrote: > On Fri, May 27, 2016 at 10:43:47AM +0100, Filipe Manana wrote: >> > Hi Filipe, >> >> Hi Scott, >> >> > >> > Does your recent patch set (from May 20) address all of these issues? >> >> Yes. > > Tested, RAID5/6

Re: raid5/6 production use status?

2016-06-02 Thread Gerald Hopf
Hey. I've lost a bit track recently and the wiki changelog doesn't seem to contain much about how things went on at the RAID5/6 front... so how're things going? Is it already more or less "productively" usable? What's still missing? Well, you still can't even check for free space. You

Re: Device replace issues and disabling it until they are solved

2016-06-02 Thread Yauhen Kharuzhy
On Fri, May 27, 2016 at 10:43:47AM +0100, Filipe Manana wrote: > > Hi Filipe, > > Hi Scott, > > > > > Does your recent patch set (from May 20) address all of these issues? > > Yes. Tested, RAID5/6 still produces a plenty of 'failed to rebuild valid logical NN" messages after two

Re: raid5/6 production use status?

2016-06-02 Thread Hugo Mills
On Thu, Jun 02, 2016 at 11:24:45AM +0200, Gerald Hopf wrote: > > >Hey. > > > >I've lost a bit track recently and the wiki changelog doesn't seem to > >contain much about how things went on at the RAID5/6 front... so how're > >things going? > > > >Is it already more or less "productively" usable?

Re: raid5/6 production use status?

2016-06-02 Thread Gerald Hopf
Hey. I've lost a bit track recently and the wiki changelog doesn't seem to contain much about how things went on at the RAID5/6 front... so how're things going? Is it already more or less "productively" usable? What's still missing? Well, you still can't even check for free space. ~ # btrfs

[PATCH 5/5] btrfs-progs: btrfs-crc: make argc check more strict

2016-06-02 Thread Satoru Takeuchi
Signed-off-by: Satoru Takeuchi --- btrfs-crc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btrfs-crc.c b/btrfs-crc.c index c2b5f00..d433ff3 100644 --- a/btrfs-crc.c +++ b/btrfs-crc.c @@ -69,12 +69,14 @@ int main(int argc, char **argv)

[PATCH 4/5] btrfs-progs: btrfs-crc: improve usage message

2016-06-02 Thread Satoru Takeuchi
- If -c is set, filename argument is ignored. - Describe about -h option Signed-off-by: Satoru Takeuchi --- btrfs-crc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/btrfs-crc.c b/btrfs-crc.c index 55a4c61..c2b5f00 100644 ---

[PATCH 3/5] btrfs-progs: btrfs-crc: print usage on receiving invalid arguments

2016-06-02 Thread Satoru Takeuchi
Usage is only printed if -h option is set. However it's nice to do it when wrong option is set or the number of argument is wrong. Signed-off-by: Satoru Takeuchi --- btrfs-crc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 2/5] btrfs-progs: btrfs-crc should be ignored by git

2016-06-02 Thread Satoru Takeuchi
It's a binary built from btrfs-crc.c Signed-off-by: Satoru Takeuchi --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a27cb0d..aaf9702 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ btrfs-zero-log

[PATCH 1/5] btrfs-progs: btrfs-crc: fix build error

2016-06-02 Thread Satoru Takeuchi
Remove the following build error. $ make btrfs-crc [CC] btrfs-crc.o [LD] btrfs-crc btrfs-crc.o: In function `usage': /home/sat/src/btrfs-progs/btrfs-crc.c:26: multiple definition of `usage'

[BUG] receive not seeing file that exists

2016-06-02 Thread Benedikt Morbach
Hi all, I've encountered a bug in btrfs-receive. When receiving a certain incremental send, it will error with: ERROR: cannot open backup/detritus/root/root.20160524T1800/var/log/journal/9cbb44cf160f4c1089f77e32ed376a0b/user-1000.journal: No such file or directory even though that path

[PATCH 1/2] btrfs-progs: convert: Fix a bug which fails to insert hole file extent

2016-06-02 Thread Qu Wenruo
When copying inode, if there is a file referring part of a hole range, convert will fail. The problem is, when calculating real extent bytenr, it doesn't check if the original extent is a hole. In case the orinal extent is a hole, we still calculate bytenr using file_pos - found_extent_file_pos,

[PATCH 2/2] btrfs-progs: convert-test: Add specially built test cases for new convert

2016-06-02 Thread Qu Wenruo
New convert introduced simpler chunk/extent allocation algorithm, at the cost of complex backup superblock migration codes. Use specially built ext2 images to test if btrfs-convert can convert and rollback images without problem. All these special ext2 image have blocks across 2nd btrfs backup