Cannot create subvolume with quota enabled

2012-09-07 Thread Andreas Philipp
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

The following steps reproduce the error. My kernel is 3.6-rc4 and
btrfs-progs are at commit 89fe5b5f666c247aa3173745fb87c710f3a71a4a from
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
master.

thor ~ # mkfs.btrfs -L test /dev/vg1/test

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label test on /dev/vg1/test
nodesize 4096 leafsize 4096 sectorsize 4096 size 20.00GB
Btrfs Btrfs v0.19
thor ~ # mount /dev/vg1/test /mnt/tmp
thor ~ # btrfs quota enable /mnt/tmp
thor ~ # btrfs subvolume create /mnt/tmp/test
Create subvolume '/mnt/tmp/test'
ERROR: cannot create subvolume - Invalid argument

Please, do not hesitate to contact me for any further information etc.

Thanks,
Andreas
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQSky/AAoJEIW3W1BiBxU7/AIH/0K+FRSFl619SKnSrpiib+wk
5Rf+R9mjMn9yateRbhtblBF5KuWfGELO8w7okf6Mg6L/wCD7fYFuwo8Gwm7RvG/T
lBrOCRPvrdkT78+elX/Jaj1QKWcYkTz7bkpcXf57zdzLruO1VwF0aCQZOFDR/qD2
d3oI5OCc/3Qw9G0ZnqV/z+bT3oqJRPJBV4ihB1SSI+5YpCAtHBW1jFGfwWRuA+ZV
Q+iPPjMKZALG6wQYu+4WG5M1l9pC9y/aRetBfWplQTVgfT4Hh3eZjvq6OnDv9ZiO
rWLSTqG0uBRCW2Sws0uFpPKMod0RFWm0sJNfkzGAM6O3a15CGTPnA9Hq0SgMRL4=
=pr3t
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-07 Thread Arne Jansen
Hi Andreas,

On 09/07/2012 09:36 PM, Andreas Philipp wrote:
> Hi,
> 
> The following steps reproduce the error. My kernel is 3.6-rc4 and 
> btrfs-progs are at commit 89fe5b5f666c247aa3173745fb87c710f3a71a4a
> from 
> git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
>
> 
master.
> 
> thor ~ # mkfs.btrfs -L test /dev/vg1/test
> 
> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see
> http://btrfs.wiki.kernel.org before using
> 
> fs created label test on /dev/vg1/test nodesize 4096 leafsize 4096
> sectorsize 4096 size 20.00GB Btrfs Btrfs v0.19 thor ~ # mount
> /dev/vg1/test /mnt/tmp thor ~ # btrfs quota enable /mnt/tmp thor ~
> # btrfs subvolume create /mnt/tmp/test Create subvolume
> '/mnt/tmp/test' ERROR: cannot create subvolume - Invalid argument

Thanks for giving quota a try. I sent a fix separately with
the subject

[PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error

Could you please see if it fixes the problem?

Thanks,
Arne
> 
> Please, do not hesitate to contact me for any further information
> etc.
> 
> Thanks, Andreas -- To unsubscribe from this list: send the line
> "unsubscribe linux-btrfs" in the body of a message to
> majord...@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-10 Thread Andreas Philipp
Hi Arne,

On 08.09.2012 00:04, Arne Jansen wrote:
> Hi Andreas,
>
> On 09/07/2012 09:36 PM, Andreas Philipp wrote:
>> Hi,
>>
>> The following steps reproduce the error. My kernel is 3.6-rc4 and 
>> btrfs-progs are at commit 89fe5b5f666c247aa3173745fb87c710f3a71a4a
>> from 
>> git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
>>
>>
> master.
>> thor ~ # mkfs.btrfs -L test /dev/vg1/test
>>
>> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see
>> http://btrfs.wiki.kernel.org before using
>>
>> fs created label test on /dev/vg1/test nodesize 4096 leafsize 4096
>> sectorsize 4096 size 20.00GB Btrfs Btrfs v0.19 thor ~ # mount
>> /dev/vg1/test /mnt/tmp thor ~ # btrfs quota enable /mnt/tmp thor ~
>> # btrfs subvolume create /mnt/tmp/test Create subvolume
>> '/mnt/tmp/test' ERROR: cannot create subvolume - Invalid argument
> Thanks for giving quota a try. I sent a fix separately with
> the subject
>
> [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error
>
> Could you please see if it fixes the problem?
With the patch applied (on top of either 3.6-rc4 or 3.6-rc5) I can
create subvolumes as you see below.

root@debian:~# mkfs.btrfs /dev/sdb

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

fs created label (null) on /dev/sdb
nodesize 4096 leafsize 4096 sectorsize 4096 size 3.00GB
Btrfs Btrfs v0.19
root@debian:~# mount /dev/sdb /mnt/test
root@debian:~# btrfs quota enable /mnt/test
root@debian:~# btrfs subvolume create /mnt/test/subvolume
Create subvolume '/mnt/test/subvolume'
root@debian:~# btrfs qgroup show /mnt/test
0/257 4096 4096
root@debian:~# dd if=/dev/urandom of=/mnt/test/subvolume/testfile
bs=1024k count=25
25+0 records in
25+0 records out
26214400 bytes (26 MB) copied, 2.95321 s, 8.9 MB/s
root@debian:~# btrfs qgroup show /mnt/test
0/257 4096 4096
root@debian:~# du -hs /mnt/test/*
25M /mnt/test/subvolume

At least I expected that the output of ' btrfs qgroup show' changes
after some data got written to a subvolume which is assigned to a
qgroup. (Hope, I got it right.)

Thanks,
Andreas

>
> Thanks,
> Arne
>> Please, do not hesitate to contact me for any further information
>> etc.
>>
>> Thanks, Andreas -- To unsubscribe from this list: send the line
>> "unsubscribe linux-btrfs" in the body of a message to
>> majord...@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-10 Thread Arne Jansen
On 09/10/2012 08:13 PM, Andreas Philipp wrote:
> Hi Arne,
> 
> On 08.09.2012 00:04, Arne Jansen wrote:
>> Hi Andreas,
>>
>> On 09/07/2012 09:36 PM, Andreas Philipp wrote:
>>> Hi,
>>>
>>> The following steps reproduce the error. My kernel is 3.6-rc4 and 
>>> btrfs-progs are at commit 89fe5b5f666c247aa3173745fb87c710f3a71a4a
>>> from 
>>> git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
>>>
>>>
>> master.
>>> thor ~ # mkfs.btrfs -L test /dev/vg1/test
>>>
>>> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see
>>> http://btrfs.wiki.kernel.org before using
>>>
>>> fs created label test on /dev/vg1/test nodesize 4096 leafsize 4096
>>> sectorsize 4096 size 20.00GB Btrfs Btrfs v0.19 thor ~ # mount
>>> /dev/vg1/test /mnt/tmp thor ~ # btrfs quota enable /mnt/tmp thor ~
>>> # btrfs subvolume create /mnt/tmp/test Create subvolume
>>> '/mnt/tmp/test' ERROR: cannot create subvolume - Invalid argument
>> Thanks for giving quota a try. I sent a fix separately with
>> the subject
>>
>> [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error
>>
>> Could you please see if it fixes the problem?
> With the patch applied (on top of either 3.6-rc4 or 3.6-rc5) I can
> create subvolumes as you see below.
> 
> root@debian:~# mkfs.btrfs /dev/sdb
> 
> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
> WARNING! - see http://btrfs.wiki.kernel.org before using
> 
> fs created label (null) on /dev/sdb
> nodesize 4096 leafsize 4096 sectorsize 4096 size 3.00GB
> Btrfs Btrfs v0.19
> root@debian:~# mount /dev/sdb /mnt/test
> root@debian:~# btrfs quota enable /mnt/test
> root@debian:~# btrfs subvolume create /mnt/test/subvolume
> Create subvolume '/mnt/test/subvolume'
> root@debian:~# btrfs qgroup show /mnt/test
> 0/257 4096 4096
> root@debian:~# dd if=/dev/urandom of=/mnt/test/subvolume/testfile
> bs=1024k count=25
> 25+0 records in
> 25+0 records out
> 26214400 bytes (26 MB) copied, 2.95321 s, 8.9 MB/s
> root@debian:~# btrfs qgroup show /mnt/test
> 0/257 4096 4096
> root@debian:~# du -hs /mnt/test/*
> 25M /mnt/test/subvolume
> 
> At least I expected that the output of ' btrfs qgroup show' changes
> after some data got written to a subvolume which is assigned to a
> qgroup. (Hope, I got it right.)

due to delayed-*, the accounting also sometimes shows up delayed.
After a sync you should see the changes.

> 
> Thanks,
> Andreas
> 
>>
>> Thanks,
>> Arne
>>> Please, do not hesitate to contact me for any further information
>>> etc.
>>>
>>> Thanks, Andreas -- To unsubscribe from this list: send the line
>>> "unsubscribe linux-btrfs" in the body of a message to
>>> majord...@vger.kernel.org More majordomo info at
>>> http://vger.kernel.org/majordomo-info.html
>>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-10 Thread Andreas Philipp
2012/9/10 Arne Jansen :
> On 09/10/2012 08:13 PM, Andreas Philipp wrote:
>> Hi Arne,
>>
>> On 08.09.2012 00:04, Arne Jansen wrote:
>>> Hi Andreas,
>>>
>>> On 09/07/2012 09:36 PM, Andreas Philipp wrote:
 Hi,

 The following steps reproduce the error. My kernel is 3.6-rc4 and
 btrfs-progs are at commit 89fe5b5f666c247aa3173745fb87c710f3a71a4a
 from
 git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git


>>> master.
 thor ~ # mkfs.btrfs -L test /dev/vg1/test

 WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL WARNING! - see
 http://btrfs.wiki.kernel.org before using

 fs created label test on /dev/vg1/test nodesize 4096 leafsize 4096
 sectorsize 4096 size 20.00GB Btrfs Btrfs v0.19 thor ~ # mount
 /dev/vg1/test /mnt/tmp thor ~ # btrfs quota enable /mnt/tmp thor ~
 # btrfs subvolume create /mnt/tmp/test Create subvolume
 '/mnt/tmp/test' ERROR: cannot create subvolume - Invalid argument
>>> Thanks for giving quota a try. I sent a fix separately with
>>> the subject
>>>
>>> [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error
>>>
>>> Could you please see if it fixes the problem?
>> With the patch applied (on top of either 3.6-rc4 or 3.6-rc5) I can
>> create subvolumes as you see below.
>>
>> root@debian:~# mkfs.btrfs /dev/sdb
>>
>> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
>> WARNING! - see http://btrfs.wiki.kernel.org before using
>>
>> fs created label (null) on /dev/sdb
>> nodesize 4096 leafsize 4096 sectorsize 4096 size 3.00GB
>> Btrfs Btrfs v0.19
>> root@debian:~# mount /dev/sdb /mnt/test
>> root@debian:~# btrfs quota enable /mnt/test
>> root@debian:~# btrfs subvolume create /mnt/test/subvolume
>> Create subvolume '/mnt/test/subvolume'
>> root@debian:~# btrfs qgroup show /mnt/test
>> 0/257 4096 4096
>> root@debian:~# dd if=/dev/urandom of=/mnt/test/subvolume/testfile
>> bs=1024k count=25
>> 25+0 records in
>> 25+0 records out
>> 26214400 bytes (26 MB) copied, 2.95321 s, 8.9 MB/s
>> root@debian:~# btrfs qgroup show /mnt/test
>> 0/257 4096 4096
>> root@debian:~# du -hs /mnt/test/*
>> 25M /mnt/test/subvolume
>>
>> At least I expected that the output of ' btrfs qgroup show' changes
>> after some data got written to a subvolume which is assigned to a
>> qgroup. (Hope, I got it right.)
>
> due to delayed-*, the accounting also sometimes shows up delayed.
> After a sync you should see the changes.

Sorry, I forgot to check with umount & mount or sync. It works.

Thanks,
Andreas

>
>>
>> Thanks,
>> Andreas
>>
>>>
>>> Thanks,
>>> Arne
 Please, do not hesitate to contact me for any further information
 etc.

 Thanks, Andreas -- To unsubscribe from this list: send the line
 "unsubscribe linux-btrfs" in the body of a message to
 majord...@vger.kernel.org More majordomo info at
 http://vger.kernel.org/majordomo-info.html

>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-10 Thread Marios Titas
On Fri, Sep 7, 2012 at 6:04 PM, Arne Jansen  wrote:
> Hi Andreas,
>
>
> Thanks for giving quota a try. I sent a fix separately with
> the subject
>
> [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error
>
> Could you please see if it fixes the problem?

Even with this patch I still have a similar problem: When I try to
create a snapshot of an old subvolume that was created before I
enabled quotas, it fails. For new subvolumes it works just fine.
Here's an example ouput:

virtual ~ # btrfs sub snap /mnt/butter/old /mnt/butter/old-snap
Create a snapshot of '/mnt/butter/old' in '/mnt/butter/old-snap'
ERROR: cannot snapshot '/mnt/butter/old' - Invalid argument
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-10 Thread Arne Jansen
On 11.09.2012 07:24, Marios Titas wrote:
> On Fri, Sep 7, 2012 at 6:04 PM, Arne Jansen  wrote:
>> Hi Andreas,
>>
>>
>> Thanks for giving quota a try. I sent a fix separately with
>> the subject
>>
>> [PATCH] Btrfs: btrfs_qgroup_inherit wrongly returns an error
>>
>> Could you please see if it fixes the problem?
> 
> Even with this patch I still have a similar problem: When I try to
> create a snapshot of an old subvolume that was created before I
> enabled quotas, it fails. For new subvolumes it works just fine.
> Here's an example ouput:
> 
> virtual ~ # btrfs sub snap /mnt/butter/old /mnt/butter/old-snap
> Create a snapshot of '/mnt/butter/old' in '/mnt/butter/old-snap'
> ERROR: cannot snapshot '/mnt/butter/old' - Invalid argument

instead of applying my patch, could you please just revert

commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
Author: Dan Carpenter 
Date:   Mon Jul 30 02:16:10 2012 -0600

Btrfs: fix some error codes in btrfs_qgroup_inherit()

It introduces both faulty return codes.

Thanks,
Arne
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-11 Thread Marios Titas
On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen  wrote:
>
> instead of applying my patch, could you please just revert
>
> commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
> Author: Dan Carpenter 
> Date:   Mon Jul 30 02:16:10 2012 -0600
>
> Btrfs: fix some error codes in btrfs_qgroup_inherit()
>
> It introduces both faulty return codes.

Yes, reverting 5986802 and completely ignoring your earlier patch works.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Cannot create subvolume with quota enabled

2012-09-11 Thread Dan Carpenter
On Tue, Sep 11, 2012 at 04:35:26AM -0400, Marios Titas wrote:
> On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen  wrote:
> >
> > instead of applying my patch, could you please just revert
> >
> > commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
> > Author: Dan Carpenter 
> > Date:   Mon Jul 30 02:16:10 2012 -0600
> >
> > Btrfs: fix some error codes in btrfs_qgroup_inherit()
> >
> > It introduces both faulty return codes.
> 
> Yes, reverting 5986802 and completely ignoring your earlier patch
> works.

Sorry for that.

Arne, you reviewed the patch when I sent it originally right?  You
were in the To: field and your btrfs_qgroup_inherit() code had just
hit linux-next the day before.

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html