Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-12 Thread Luis Henriques
Jeff Layton writes: > On Thu, 2020-11-12 at 10:40 +, Luis Henriques wrote: >> Jeff Layton writes: >> >> > On Wed, 2020-11-11 at 18:28 +, Luis Henriques wrote: >> > > Jeff Layton writes: >> > > >> > > > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: >> > > > > When doing a re

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-12 Thread Jeff Layton
On Thu, 2020-11-12 at 10:40 +, Luis Henriques wrote: > Jeff Layton writes: > > > On Wed, 2020-11-11 at 18:28 +, Luis Henriques wrote: > > > Jeff Layton writes: > > > > > > > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: > > > > > When doing a rename across quota realms, there

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-12 Thread Luis Henriques
Jeff Layton writes: > On Wed, 2020-11-11 at 18:28 +, Luis Henriques wrote: >> Jeff Layton writes: >> >> > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: >> > > When doing a rename across quota realms, there's a corner case that isn't >> > > handled correctly. Here's a testcase: >

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-11 Thread Jeff Layton
On Wed, 2020-11-11 at 18:28 +, Luis Henriques wrote: > Jeff Layton writes: > > > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: > > > When doing a rename across quota realms, there's a corner case that isn't > > > handled correctly. Here's a testcase: > > > > > >   mkdir files lim

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-11 Thread Jeff Layton
On Wed, 2020-11-11 at 18:28 +, Luis Henriques wrote: > Jeff Layton writes: > > > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: > > > When doing a rename across quota realms, there's a corner case that isn't > > > handled correctly. Here's a testcase: > > > > > >   mkdir files lim

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-11 Thread Luis Henriques
Jeff Layton writes: > On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: >> When doing a rename across quota realms, there's a corner case that isn't >> handled correctly. Here's a testcase: >> >>   mkdir files limit >>   truncate files/file -s 10G >>   setfattr limit -n ceph.quota.max_by

Re: [RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-11 Thread Jeff Layton
On Wed, 2020-11-11 at 15:39 +, Luis Henriques wrote: > When doing a rename across quota realms, there's a corner case that isn't > handled correctly. Here's a testcase: > >   mkdir files limit >   truncate files/file -s 10G >   setfattr limit -n ceph.quota.max_bytes -v 100 >   mv files li

[RFC PATCH] ceph: fix cross quota realms renames with new truncated files

2020-11-11 Thread Luis Henriques
When doing a rename across quota realms, there's a corner case that isn't handled correctly. Here's a testcase: mkdir files limit truncate files/file -s 10G setfattr limit -n ceph.quota.max_bytes -v 100 mv files limit/ The above will succeed because ftruncate(2) won't result in an im