* [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
@ 2014-07-15 9:35 Jeff Liu
2014-07-15 10:25 ` Christoph Hellwig
2014-07-16 17:10 ` Eric Sandeen
0 siblings, 2 replies; 6+ messages in thread
From: Jeff Liu @ 2014-07-15 9:35 UTC (permalink / raw)
To: xfs@oss.sgi.com
From: Jie Liu <jeff.liu@oracle.com>
We are intended to check up uflags against FS_PROJ_QUOTA rather than
FS_USER_UQUOTA once more, it looks to me like a typo, but might cause
the project quota metadata space can not be removed.
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
fs/xfs/xfs_quotaops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c
index 4f7aecb..b238027 100644
--- a/fs/xfs/xfs_quotaops.c
+++ b/fs/xfs/xfs_quotaops.c
@@ -123,7 +123,7 @@ xfs_fs_rm_xquota(
flags |= XFS_DQ_USER;
if (uflags & FS_GROUP_QUOTA)
flags |= XFS_DQ_GROUP;
- if (uflags & FS_USER_QUOTA)
+ if (uflags & FS_PROJ_QUOTA)
flags |= XFS_DQ_PROJ;
return xfs_qm_scall_trunc_qfiles(mp, flags);
--
1.8.3.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
2014-07-15 9:35 [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota Jeff Liu
@ 2014-07-15 10:25 ` Christoph Hellwig
2014-07-16 7:11 ` Jeff Liu
2014-07-16 17:10 ` Eric Sandeen
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2014-07-15 10:25 UTC (permalink / raw)
To: Jeff Liu; +Cc: xfs@oss.sgi.com
On Tue, Jul 15, 2014 at 05:35:23PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> We are intended to check up uflags against FS_PROJ_QUOTA rather than
> FS_USER_UQUOTA once more, it looks to me like a typo, but might cause
> the project quota metadata space can not be removed.
This code was introduced by commit
9da93f9b7cdf8ab28da6b364cdc1fafc8670b4dc which attempts to fix the
broken quotarm code. Seems like we need a testcase for this
functionality or just remove it. Physically removing the quota file
never seems that useful to me to start with..
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
2014-07-15 10:25 ` Christoph Hellwig
@ 2014-07-16 7:11 ` Jeff Liu
2014-07-16 7:12 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Liu @ 2014-07-16 7:11 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs@oss.sgi.com
On 07/15/2014 18:25 PM, Christoph Hellwig wrote:
> On Tue, Jul 15, 2014 at 05:35:23PM +0800, Jeff Liu wrote:
>> From: Jie Liu <jeff.liu@oracle.com>
>>
>> We are intended to check up uflags against FS_PROJ_QUOTA rather than
>> FS_USER_UQUOTA once more, it looks to me like a typo, but might cause
>> the project quota metadata space can not be removed.
>
> This code was introduced by commit
> 9da93f9b7cdf8ab28da6b364cdc1fafc8670b4dc which attempts to fix the
> broken quotarm code. Seems like we need a testcase for this
> functionality or just remove it. Physically removing the quota file
> never seems that useful to me to start with..
Is there an approach to verify that a particular quota file inode has
been successfully removed? It seems we have to do this in a test case
but am not yet figure out a way, or any thoughts for the test case?
Cheers,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
2014-07-16 7:11 ` Jeff Liu
@ 2014-07-16 7:12 ` Christoph Hellwig
2014-07-16 8:32 ` Jeff Liu
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2014-07-16 7:12 UTC (permalink / raw)
To: Jeff Liu; +Cc: Christoph Hellwig, xfs@oss.sgi.com
On Wed, Jul 16, 2014 at 03:11:17PM +0800, Jeff Liu wrote:
> > This code was introduced by commit
> > 9da93f9b7cdf8ab28da6b364cdc1fafc8670b4dc which attempts to fix the
> > broken quotarm code. Seems like we need a testcase for this
> > functionality or just remove it. Physically removing the quota file
> > never seems that useful to me to start with..
>
> Is there an approach to verify that a particular quota file inode has
> been successfully removed? It seems we have to do this in a test case
> but am not yet figure out a way, or any thoughts for the test case?
umount the filesystem and check that the field in the superblock
pointing to that kind of quota inode is zeroed out would be my
suggestion.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
2014-07-16 7:12 ` Christoph Hellwig
@ 2014-07-16 8:32 ` Jeff Liu
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Liu @ 2014-07-16 8:32 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs@oss.sgi.com
On 07/16/2014 15:12 PM, Christoph Hellwig wrote:
> On Wed, Jul 16, 2014 at 03:11:17PM +0800, Jeff Liu wrote:
>>> This code was introduced by commit
>>> 9da93f9b7cdf8ab28da6b364cdc1fafc8670b4dc which attempts to fix the
>>> broken quotarm code. Seems like we need a testcase for this
>>> functionality or just remove it. Physically removing the quota file
>>> never seems that useful to me to start with..
>>
>> Is there an approach to verify that a particular quota file inode has
>> been successfully removed? It seems we have to do this in a test case
>> but am not yet figure out a way, or any thoughts for the test case?
>
> umount the filesystem and check that the field in the superblock
> pointing to that kind of quota inode is zeroed out would be my
> suggestion.
Oh yes, after quota remove, the 'u' field of the quota inode will changed from
u.bmx[0] = [startoff,startblock,blockcount,extentflag] 0:[0,16,1,0] to u = (empty)
which can be used for the verification, thanks for your suggestion. :)
Cheers,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota
2014-07-15 9:35 [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota Jeff Liu
2014-07-15 10:25 ` Christoph Hellwig
@ 2014-07-16 17:10 ` Eric Sandeen
1 sibling, 0 replies; 6+ messages in thread
From: Eric Sandeen @ 2014-07-16 17:10 UTC (permalink / raw)
To: Jeff Liu, xfs@oss.sgi.com
On 7/15/14, 4:35 AM, Jeff Liu wrote:
> From: Jie Liu <jeff.liu@oracle.com>
>
> We are intended to check up uflags against FS_PROJ_QUOTA rather than
> FS_USER_UQUOTA once more, it looks to me like a typo, but might cause
> the project quota metadata space can not be removed.
Ugh, mea culpa. Thanks for spotting. :(
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Thankfully I don't think anyone uses this interface ;)
> Signed-off-by: Jie Liu <jeff.liu@oracle.com>
> ---
> fs/xfs/xfs_quotaops.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_quotaops.c b/fs/xfs/xfs_quotaops.c
> index 4f7aecb..b238027 100644
> --- a/fs/xfs/xfs_quotaops.c
> +++ b/fs/xfs/xfs_quotaops.c
> @@ -123,7 +123,7 @@ xfs_fs_rm_xquota(
> flags |= XFS_DQ_USER;
> if (uflags & FS_GROUP_QUOTA)
> flags |= XFS_DQ_GROUP;
> - if (uflags & FS_USER_QUOTA)
> + if (uflags & FS_PROJ_QUOTA)
> flags |= XFS_DQ_PROJ;
>
> return xfs_qm_scall_trunc_qfiles(mp, flags);
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-16 17:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-15 9:35 [PATCH] xfs: fix uflags detection at xfs_fs_rm_xquota Jeff Liu
2014-07-15 10:25 ` Christoph Hellwig
2014-07-16 7:11 ` Jeff Liu
2014-07-16 7:12 ` Christoph Hellwig
2014-07-16 8:32 ` Jeff Liu
2014-07-16 17:10 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox