Bug 233849 - [PATCH] r339008 broke repquota on UFS
Summary: [PATCH] r339008 broke repquota on UFS
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-fs mailing list
URL:
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2018-12-07 14:07 UTC by Andre Albsmeier
Modified: 2019-02-07 22:11 UTC (History)
1 user (show)

See Also:


Attachments
Patch (598 bytes, patch)
2018-12-07 14:07 UTC, Andre Albsmeier
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Albsmeier 2018-12-07 14:07:38 UTC
Created attachment 199932 [details]
Patch

https://svnweb.freebsd.org/base?view=revision&revision=339008
broke repquote on UFS. To fix it, I use attached patch.
Apparently it wants qf->qfname to be filled in by hasquota(). No idea
if calling hasquota() hurts for non-UFS...
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2018-12-07 14:41:59 UTC
Notify committer of r339008.
Comment 2 Sean Eric Fagan freebsd_committer 2018-12-07 18:18:52 UTC
I saw the original email about the issue, but have not looked any deeply into it yet.
Comment 3 Sean Eric Fagan freebsd_committer 2018-12-07 19:21:37 UTC
ok.  repquota is going through and reading the quoata file.  Which it can only do on UFS.

There is, as far as I can tell, no problem with checking hasquota() first, although if it returns no error, then there's no reason to call quotactl() afterwards, I think.

This means the code should be moved around and refactored a bit to get the tests done in the right way -- namely, only call quotactl() if hasquota() fails, but fail if quotactl() fails, but also if hasquota() succeeds but it's not UFS. (For now, anyway.)
Comment 4 commit-hook freebsd_committer 2019-02-07 21:52:03 UTC
A commit references this bug:

Author: sef
Date: Thu Feb  7 21:51:39 UTC 2019
New revision: 343881
URL: https://svnweb.freebsd.org/changeset/base/343881

Log:
  r339008 broke repquota for UFS.  This rectifies that.

  Refactor the function calls and tests so that, on UFS, the proper fields
  are filled out.

  PR:		233849
  Reported by:	Andre Albsmeier
  Reviewed by:	mav, delphij
  MFC after:	1 month
  Sponsored by:	iXsystems Inc
  Differential Revision:	https://reviews.freebsd.org/D18785

Changes:
  head/lib/libutil/quotafile.c
Comment 5 commit-hook freebsd_committer 2019-02-07 22:11:22 UTC
A commit references this bug:

Author: sef
Date: Thu Feb  7 22:10:21 UTC 2019
New revision: 343882
URL: https://svnweb.freebsd.org/changeset/base/343882

Log:
  r343881 had an uninitialized error.  This fixes that.

  PR:             233849
  Reported by:    Andre Albsmeier
  MFC after:      1 month
  Sponsored by:   iXsystems Inc
  Differential Revision:  https://reviews.freebsd.org/D18785

Changes:
  head/lib/libutil/quotafile.c