linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] xfs_quota: fix false error reporting of project inheritance flag is not set
@ 2019-01-06 10:28 Achilles Gaikwad
  2019-01-06 18:10 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Achilles Gaikwad @ 2019-01-06 10:28 UTC (permalink / raw)
  To: linux-xfs; +Cc: sandeen, sgardner, darrick.wong

After kernel commit:

9336e3a7 "xfs: project id inheritance is a directory only flag"

xfs stopped setting the project inheritance flag on regular files, but
userspace quota code still checks for it and will now issue the error:

"project inheritance flag is not set"

for every regular file during quotacheck.  Fix this by only checking
for the flag on directories.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1663502
Reported-by: Steven Gardner <sgardner@redhat.com>
Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
---
 quota/project.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quota/project.c b/quota/project.c
index e4e7a012..11f3be04 100644
--- a/quota/project.c
+++ b/quota/project.c
@@ -126,7 +126,7 @@ check_project(
 			printf(_("%s - project identifier is not set"
 				 " (inode=%u, tree=%u)\n"),
 				path, fsx.fsx_projid, (unsigned int)prid);
-		if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT))
+		if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && S_ISDIR(stat->st_mode))
 			printf(_("%s - project inheritance flag is not set\n"),
 				path);
 	}
-- 
2.20.1

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

* Re: [PATCH v2] xfs_quota: fix false error reporting of project inheritance flag is not set
  2019-01-06 10:28 [PATCH v2] xfs_quota: fix false error reporting of project inheritance flag is not set Achilles Gaikwad
@ 2019-01-06 18:10 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2019-01-06 18:10 UTC (permalink / raw)
  To: Achilles Gaikwad; +Cc: linux-xfs, sandeen, sgardner

On Sun, Jan 06, 2019 at 03:58:07PM +0530, Achilles Gaikwad wrote:
> After kernel commit:
> 
> 9336e3a7 "xfs: project id inheritance is a directory only flag"
> 
> xfs stopped setting the project inheritance flag on regular files, but
> userspace quota code still checks for it and will now issue the error:
> 
> "project inheritance flag is not set"
> 
> for every regular file during quotacheck.  Fix this by only checking
> for the flag on directories.
> 
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1663502
> Reported-by: Steven Gardner <sgardner@redhat.com>
> Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>

Looks ok to me...
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  quota/project.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/quota/project.c b/quota/project.c
> index e4e7a012..11f3be04 100644
> --- a/quota/project.c
> +++ b/quota/project.c
> @@ -126,7 +126,7 @@ check_project(
>  			printf(_("%s - project identifier is not set"
>  				 " (inode=%u, tree=%u)\n"),
>  				path, fsx.fsx_projid, (unsigned int)prid);
> -		if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT))
> +		if (!(fsx.fsx_xflags & FS_XFLAG_PROJINHERIT) && S_ISDIR(stat->st_mode))
>  			printf(_("%s - project inheritance flag is not set\n"),
>  				path);
>  	}
> -- 
> 2.20.1
> 

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

end of thread, other threads:[~2019-01-06 18:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-06 10:28 [PATCH v2] xfs_quota: fix false error reporting of project inheritance flag is not set Achilles Gaikwad
2019-01-06 18:10 ` Darrick J. Wong

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).