linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cannot create subvolume with quota enabled
@ 2012-09-07 19:36 Andreas Philipp
  2012-09-07 22:04 ` Arne Jansen
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Philipp @ 2012-09-07 19:36 UTC (permalink / raw)
  To: linux-btrfs; +Cc: 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-----

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-07 19:36 Cannot create subvolume with quota enabled Andreas Philipp
@ 2012-09-07 22:04 ` Arne Jansen
  2012-09-10 18:13   ` Andreas Philipp
  2012-09-11  5:24   ` Marios Titas
  0 siblings, 2 replies; 9+ messages in thread
From: Arne Jansen @ 2012-09-07 22:04 UTC (permalink / raw)
  To: Andreas Philipp; +Cc: linux-btrfs

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
> majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-07 22:04 ` Arne Jansen
@ 2012-09-10 18:13   ` Andreas Philipp
  2012-09-10 18:30     ` Arne Jansen
  2012-09-11  5:24   ` Marios Titas
  1 sibling, 1 reply; 9+ messages in thread
From: Andreas Philipp @ 2012-09-10 18:13 UTC (permalink / raw)
  To: Arne Jansen; +Cc: linux-btrfs

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
>> majordomo@vger.kernel.org More majordomo info at
>> http://vger.kernel.org/majordomo-info.html
>>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-10 18:13   ` Andreas Philipp
@ 2012-09-10 18:30     ` Arne Jansen
  2012-09-10 21:45       ` Andreas Philipp
  0 siblings, 1 reply; 9+ messages in thread
From: Arne Jansen @ 2012-09-10 18:30 UTC (permalink / raw)
  To: Andreas Philipp; +Cc: linux-btrfs

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
>>> majordomo@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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-10 18:30     ` Arne Jansen
@ 2012-09-10 21:45       ` Andreas Philipp
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Philipp @ 2012-09-10 21:45 UTC (permalink / raw)
  To: Arne Jansen; +Cc: linux-btrfs

2012/9/10 Arne Jansen <sensille@gmx.net>:
> 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
>>>> majordomo@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 majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-07 22:04 ` Arne Jansen
  2012-09-10 18:13   ` Andreas Philipp
@ 2012-09-11  5:24   ` Marios Titas
  2012-09-11  6:19     ` Arne Jansen
  1 sibling, 1 reply; 9+ messages in thread
From: Marios Titas @ 2012-09-11  5:24 UTC (permalink / raw)
  To: Arne Jansen; +Cc: Andreas Philipp, linux-btrfs

On Fri, Sep 7, 2012 at 6:04 PM, Arne Jansen <sensille@gmx.net> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-11  5:24   ` Marios Titas
@ 2012-09-11  6:19     ` Arne Jansen
  2012-09-11  8:35       ` Marios Titas
  0 siblings, 1 reply; 9+ messages in thread
From: Arne Jansen @ 2012-09-11  6:19 UTC (permalink / raw)
  To: Marios Titas; +Cc: Andreas Philipp, linux-btrfs, Dan Carpenter

On 11.09.2012 07:24, Marios Titas wrote:
> On Fri, Sep 7, 2012 at 6:04 PM, Arne Jansen <sensille@gmx.net> 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 <dan.carpenter@oracle.com>
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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-11  6:19     ` Arne Jansen
@ 2012-09-11  8:35       ` Marios Titas
  2012-09-11 10:21         ` Dan Carpenter
  0 siblings, 1 reply; 9+ messages in thread
From: Marios Titas @ 2012-09-11  8:35 UTC (permalink / raw)
  To: Arne Jansen; +Cc: Andreas Philipp, linux-btrfs, Dan Carpenter

On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen <sensille@gmx.net> wrote:
>
> instead of applying my patch, could you please just revert
>
> commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
> Author: Dan Carpenter <dan.carpenter@oracle.com>
> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Cannot create subvolume with quota enabled
  2012-09-11  8:35       ` Marios Titas
@ 2012-09-11 10:21         ` Dan Carpenter
  0 siblings, 0 replies; 9+ messages in thread
From: Dan Carpenter @ 2012-09-11 10:21 UTC (permalink / raw)
  To: Marios Titas; +Cc: Arne Jansen, Andreas Philipp, linux-btrfs

On Tue, Sep 11, 2012 at 04:35:26AM -0400, Marios Titas wrote:
> On Tue, Sep 11, 2012 at 2:19 AM, Arne Jansen <sensille@gmx.net> wrote:
> >
> > instead of applying my patch, could you please just revert
> >
> > commit 5986802c2fcc754040bb7ed95f30bb16c4a843b7
> > Author: Dan Carpenter <dan.carpenter@oracle.com>
> > 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-09-11 10:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07 19:36 Cannot create subvolume with quota enabled Andreas Philipp
2012-09-07 22:04 ` Arne Jansen
2012-09-10 18:13   ` Andreas Philipp
2012-09-10 18:30     ` Arne Jansen
2012-09-10 21:45       ` Andreas Philipp
2012-09-11  5:24   ` Marios Titas
2012-09-11  6:19     ` Arne Jansen
2012-09-11  8:35       ` Marios Titas
2012-09-11 10:21         ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).