summaryrefslogtreecommitdiff
path: root/quotasys.c
AgeCommit message (Collapse)Author
2020-07-01Fix for multi device bcachefs filesystemsKent Overstreet
2018-07-10Add bcachefs supportKent Overstreet
2018-05-09Aadd HPE XFS supportTinguely, Mark
HPE XFS has a different superblock magic and type name to allow the community XFS and HPE XFS to coexist in the same linux kernel. This patch add HPE XFS support to the quota-tools so our customers can use it. Signed-off-by: Mark Tinguely <mark.tinguely@hpe.com> Signed-off-by: Jan Kara <jack@suse.cz>
2018-01-10Implement manual choice of output unitJan Kara
Add an optional argument to option -s allowing user to manually specify units used for outputting results. Signed-off-by: Jan Kara <jack@suse.cz>
2017-10-16f2fs: support f2fs's quota sysfileJaegeuk Kim
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Jan Kara <jack@suse.cz>
2016-07-12Improve detection of XFS quota interfaceJan Kara
Except for really ancient kernels XFS quota interface is always available when quota is compiled in. In recent kernels it is also usable for other filesystems than XFS. So always add XFS quota format as usable if we have non-ancient kernel. Signed-off-by: Jan Kara <jack@suse.cz>
2016-07-12quotaon: Improve reporting of quota stateJan Kara
quotactl Q_XFS_GETQSTAT is able to report whether only accounting or also quota enforcement is turned on. This works for XFS and GFS2 for ages and since kernel 4.1 also for other filesystems. Use this quotactl when it is supported and report more details in verbose mode. Signed-off-by: Jan Kara <jack@suse.cz>
2016-07-06quota: fix coredump if projid file does not existWang Shilong
if '/etc/projid' dose not exist,@project_file will be NULL pointer, fclose will cause coredump, add check in endprent(). Signed-off-by: Wang Shilong <wshilong@ddn.com> Signed-off-by: Jan Kara <jack@suse.cz>
2016-03-31Add support for project quota into generic codeJan Kara
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>
2014-10-01Fix handling of space and inode valuesJan Kara
Commit 0214512479e0 (Properly handle signed space and inode values) broke parsing of pure numbers in str2number() so that it would always complain about "Integer overflow while interpreting decimal unit". Fix condition checking for overflow. Also number2str() was buggy and wouldn't guess proper units for negative numbers. Signed-off-by: Jan Kara <jack@suse.cz>
2014-05-01Prevent from grace period overflow in RPC transportPetr Písař
The RPC transports grace time as unsigned int, but the value stored there and retrivedd from is treated as singed difference against current time. This leads to overflow after expiring the grace time which is presented as an enourmously large grace time instead of "none" in the quota(1) output. There also possible an overflow when the time difference is still bigger than an int can represent. This first issue is solved by explicit type cast to/from int32_t, the second issue is fixes by limiting the value into int32_t range. <https://sourceforge.net/p/linuxquota/bugs/115/> Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
2014-05-01Properly handle signed space and inode valuesJan Kara
For cluster filesystems, kernel can sometimes return negative values of used space or inodes (because counters are not completely synchronized across the cluster). Make quota tools properly print these. Signed-off-by: Jan Kara <jack@suse.cz>
2013-10-29Silent a set-but-not-used warning about sbflagsPetr Písař
If XFS_ROOTHACK is not defined, sbflags gets set but never used. This patch declares the variable only if needed. Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
2013-10-03Add support for CVS and XML output formats to repquota(8)Jan Kara
JK: Fixup localization and handling of multiple output filesystems / types. Signed-off-by: Jonathan Overholt <jonathan@overholt.org> Signed-off-by: Jan Kara <jack@suse.cz>
2013-01-21Recognize units at inode limits by setquotaPetr Písař
This patch allows to specify suffixes at inode limits on setquota command line and standard input. Decimal Units k, m, g, t are implemented. Numeric value without suffix is equivatent to single inodes as before. This is complementary functionality to `quota -s'. Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
2013-01-21Recognize units at block limits by setquotaPetr Písař
This patch allows to specify suffixes at block limits on setquota command line. Binary units K, M, G, T are implemented. Numeric value without suffix is equivatent to kibibytes as before. This is complementary functionality to `quota -s'. Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
2013-01-21Fix compilation without RPC supportJan Kara
Commit 40e09a3b missed one place in conversion from mnt_type to me_type (as it is used only when RPC support is disabled). Fix that. Signed-off-by: Jan Kara <jack@suse.cz>
2012-05-23Remove fixed limit on number of autofs mount pointsJan Kara
Signed-off-by: Jan Kara <jack@suse.cz>
2011-11-17Add support for quotas on ext4 in system filesJan Kara
Teach quota tools to handle quotas in system files on ext4. For this to work, we slightly rework mount option parsing to allow distinguisting between ext4 with classical quota files and ext4 with quotas in system files. Signed-off-by: Jan Kara <jack@suse.cz>
2011-10-20edquota: Fix localication of time unitsJan Kara
Time units were localized when printing (e.g. individual grace times) to file for editing but were not localized when parsing them back. Fix it. Signed-off-by: Jan Kara <jack@suse.cz>
2010-11-09Remove checking of filesystem type from hasquota()Jan Kara
The checking of filesystem type in verification whether a filesystem has quotas has been sporadically causing us problems with new filesystems or so. The checking isn't actually very useful because in (rather unlikely) worst case if some filesystem has valid quota options but uses quota system which quota-tools do not understand, we try to work with quota files and the header check fails. So it's not a big deal. Signed-off-by: Jan Kara <jack@suse.cz>
2010-06-14Fix kern_quota_on() to work with XFS filesystems (Jan Kara)jkar8572
Fix quotaon to work correctly with XFS filesystems (Jan Kara)
2010-05-10We shouldn't pass NULL to XGETQSTAT quotactl since kernel either fails withjkar8572
EFAULT or reads garbage from NULL address (which makes SELinux spit warnings). (Jan Kara)
2010-05-07Previous GFS2 patch was missing a hunk to properly detect whetherjkar8572
a GFS2 filesystem has quotas enabled. (Christoph Hellwig)
2010-05-05GFS2 implements the XFS interface for setting and reporting the quotajkar8572
information, and only allows state changes via remount. (Christoph Hellwig)
2010-05-04* avoid memory corruption of NULL address (Petr Pisar)jkar8572
2010-01-05* Rewritten configuration script to create config.h (Jan Kara)jkar8572
* Use /proc/mounts for mountpoint scanning (Jan Kara) * Removed use of reserved identifiers (Jan Kara)
2009-12-21Fixed error reporting when rpc format specified on command line (Jan Kara)jkar8572
Added missing files.
2009-12-1464-bit quota support.jkar8572
2009-10-20Improved header of quota and repquota headers in case -s option is used.jkar8572
2009-09-21Fixed mountpoint scanning when NFS mountpoint is specified on command line ↵jkar8572
(Jan Kara)
2008-12-17* fix reference to rpc manpage (anonymous reporter)jkar8572
* add EXT4 (not only EXT4DEV) to the list of supported filesystems (Mingming Cao) * fix setting of more than 31-bit block and inode limits (Gui Xiaohua) * fixed bug in error reporting when quota reading fails (Jan Kara) * added support for quota formats with hidden quota files (Jan Kara)
2008-04-21Format string fixes (Ladislav Michnovic)jkar8572
2007-08-22Cleaned up host access handling in rpc.rquotad (Jan Kara)jkar8572
Added allow_severity and deny_severity variables for older versions of libwrap (Martin Jacobs) Added MPFS to the list of supported filesystems (Dave Boone) Configure script now correctly reports checking of libwrap (Jan Kara)
2007-04-24Recognize ext4 filesystem (Jan Kara)jkar8572
Fix LDAP scripts to use VISUAL instead of EDITOR (Michael Meskes)
2007-02-22* added option -A to quota(1) to report all NFS mountpoints (Jan Kara)jkar8572
2007-02-21* fixed XFS handling to work with loopback mounted devices (Jan Kara)jkar8572
* fixed mountpoints scanning to make XFS -x delete command work (Jan Kara) * fixes of signed vs unsigned int issues (Jan Kara) * fixed a format string bug in reporting of raw grace times in repquota (Jan Kara)
2006-05-13Changed option parsing to use long options (Jan Kara)jkar8572
Added option to always resolve even numeric names (Jan Kara) Corrected a few typos in manpaged (Jan Kara, Justin Pryzby)
2005-11-21Corrected some informal language in error messages (Jan Kara)jkar8572
Quota(1) has now -f option to specify a list of filesystems (Jan Kara)
2005-10-25Changed mountpoint scanning so that we don't even stat NFS mountpoints whenjkar8572
local-only flag was specified. Hence we don't block if NFS is down. (Jan Kara)
2005-09-13Fix handling of UID and GID - they are unsigned. (Matthew Kent)jkar8572
2005-06-24Added label recognition for reiserfs. (Jan Kara)jkar8572
Added support for specification of LABEL= and UUID= on command line. (Jan Kara)
2005-03-18Updated polish translation. (Jakub Bogusz)jkar8572
Fixed some checks to work also with NFSV4. (Jan Kara)
2005-03-17Added sanity check to quota reporting (Jan Kara)jkar8572
Added NFSv4 quota type (Jan Kara) Added forgotten file quotagrpadmins to CVS (Jan Kara)
2005-01-21Added dynamic allocation of mountpoint table (Jan Kara)jkar8572
2004-09-02Added JFS into a set of supported filesystems (David Kleikamp)jkar8572
2004-07-13Fixed exit codes of edquota and setquota (Jan Kara)jkar8572
2004-04-14Added batch mode of setquota(8) (Jan Kara)jkar8572
2004-02-12Fixed detection of usrjquota,grpjquota mount options. (Jan Kara)jkar8572
2004-02-08Quota tools now honour journalled quota options (Jan Kara)jkar8572
quotacheck(8) does not count quota files (Jan Kara)