| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
When time_t is 32-bit, warn if the kernel returns anything that cannot
fit in these time stamps. This also fixes a compilation warning that
shift exceeds data type size. Similarly when converting data to pass to
kernel, just avoid the pointless shift (generating compiler warning)
when time_t is 32-bit.
Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
| |
Add checks and error handling to report when grace times set for XFS
quotas would overflow.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
| |
Add the ability to interpret the larger quota grace period expiration
timestamps that the kernel can export via struct xfs_kern_dqblk.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
xfs_commit_dquot() always set FS_DQ_LIMIT_MASK when calling
Q_XFS_SETQLIM. So far this wasn't a problem since quota tools didn't
support setting of anything else for XFS but now that kernel will start
supporting setting of grace times for XFS, we need to be more careful
and set limits bits only if we really want to update them. Also
FS_DQ_LIMIT_MASK contains real-time limits as well. Quota tools
currently don't support them in any way so avoid telling kernel to set
them.
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
| |
xfs quota code doesn't currently allow increasing an individual
user's grace time, but kernel patches are in development for this.
In order for setquota to be able to send this update via
setquota -T, we need to add the FS_DQ_TIMER_MASK when we are trying
to update the grace times on an individual user's dquot.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Older kernels ignored the type sent to Q_XFS_GETQSTAT, and returned
timer information for the first quota type which was found to be
enabled.
As of 555b2c3da1fc ("quota: honor quota type in Q_XGETQSTAT[V] calls")
the kernel now honors the quota type requested, so send that from the
Q_XFS_GETQSTAT calls in quota tools.
Older kernels ignore the type altogether, so this change should be
backwards compatible with no change in behavior.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Vladimit Meshkov reported that when user -2 exists and user namespaces
are enabled in the kernel, repquota(8) fails to output anything. He also
analyzed this is because in such case repquota(8) tries to query info
for user -1 which is invalid ID, gets error from the kernel, and bails
out.
Fix the problem by stopping iteration over IDs when we reach ID -1.
Reported-by: Vladimir Meshkov <ubob74@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
|
| |
The support for project quota in generic code is simple. We just need
functions to convert project ID to project name and back (we follow what
xfsprogs do in that regard), add detection whether project quota is
enabled for the filesystem, and increase number of quota types. We also
have to update various checks to count with project quotas.
Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
| |
Add support for scanning of all available quota structures using
Q_XGETNEXTQUOTA quotactl.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
| |
Conversion to generic quota scanning introduced a bug for XFS where we
stopped scanning after quotactl reported first error. quotactl for XFS
however reports ENOENT when it has nothing to report for a particular user
/ group and we shouldn't stop scanning after that. We tried to test for this
but the test was wrong. Fix it.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
|
|
| |
Some filesystem do not have quota files accessible from userspace. For these
implementing ->scan_dquots() used by repquota is problematic. What we do is
that we iterate over all users and ask for quota information for each of them.
XFS already does this so make its code generic and use it for all filesystems
using quotaio_meta.c - only OCFS2 these days.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
|
|
|
| |
Although GFS2 maintains quota as metadata, it sometimes might need to
check quota usage (most notably when quota is enabled for the first time).
So add support for GFS2 in quotacheck.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
|
| |
* Use /proc/mounts for mountpoint scanning (Jan Kara)
* Removed use of reserved identifiers (Jan Kara)
|
| |
|
| |
|
|
|
|
|
|
| |
operate
safe on live filesystem.
|
| |
|
| |
|
|
|
|
|
|
| |
Fixed small bug in repquota (User vs Group).
Some XFS updates.
Fixed problems with devfs and relative paths.
|
| |
|
| |
|
|
|