tag name | separate-quota-type_2020-07-29 (e277726a4e98e3f67fb8d9bbd8e434a42050b3e9) |
tag date | 2020-07-29 20:30:36 -0700 |
tagged by | Darrick J. Wong <darrick.wong@oracle.com> |
tagged object | commit 1104cc31b6... |
xfs: separate dquot type from flags
This series tries to clean up some of the messier parts of dquot flags
handling. We begin by cleaning up a bunch of dquot flag misuse, so that
now xfs quota functions only take record type information; remove a
bunch of other helper macros that duplicate the "what type is this?"
predicates, and make all the quota type switching logic the same.
We make a fundamental distinction here -- from now on, xfs quota
function only take XFS_DQTYPE_{USER,GROUP,PROJ} as a type parameter.
This means that anything trying to extract the quota record type from an
incore dquot had better use xfs_dquot_type() to extract the type flags.
Right now there's no difference since there are no other type flags, but
this will become important when y2038 timestamps shows up.
Finally, we create a new xfs_dqtype_t to represent all that is an incore
dquot record type, and rename the ondisk d_flags field to d_type to make
the quota type information more self contained.
TLDR: dquot type information is now a separate field, and quota
functions now only take the XFS_DQTYPE flags that signal user, group, or
project quota.