aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/quota.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-13 13:28:32 -0700
commit0b381a286e5d748b1fd80095d3dd52326819742f (patch)
treed72fca56123520b9c78661137f8a02b6ad26f95b /include/linux/quota.h
parentMerge tag 'disintegrate-spi-20121009' of git://git.infradead.org/users/dhowells/linux-headers (diff)
parentUAPI: (Scripted) Disintegrate include/linux/byteorder (diff)
downloadlinux-dev-0b381a286e5d748b1fd80095d3dd52326819742f.tar.xz
linux-dev-0b381a286e5d748b1fd80095d3dd52326819742f.zip
Merge tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers
Pull UAPI disintegration for include/linux/{,byteorder/}*.h from David Howells: "The patches contained herein do the following: (1) Remove kernel-only stuff in linux/ppp-comp.h from the UAPI. I checked this with Paul Mackerras before I created the patch and he suggested some extra bits to unexport. (2) Remove linux/blk_types.h entirely from the UAPI as none of it is userspace applicable, and remove from the UAPI that part of linux/fs.h that was the reason for linux/blk_types.h being exported in the first place. I discussed this with Jens Axboe before creating the patch. (3) The big patch of the series to disintegrate include/linux/*.h as a unit. This could be split up, though there would be collisions in moving stuff between the two Kbuild files when the parts are merged as that file is sorted alphabetically rather than being grouped by subsystem. Of this set of headers, 17 files have changed in the UAPI exported region since the 4th and only 8 since the 9th so there isn't much change in this area - as one might expect. It should be pretty obvious and straightforward if it does come to fixing up: stuff in __KERNEL__ guards stays where it is and stuff outside moves to the same file in the include/uapi/linux/ directory. If a new file appears then things get a bit more complicated as the "headers +=" line has to move to include/uapi/linux/Kbuild. Only one new file has appeared since the 9th and I judge this type of event relatively unlikely. (4) A patch to disintegrate include/linux/byteorder/*.h as a unit. Signed-off-by: David Howells <dhowells@redhat.com>" * tag 'disintegrate-main-20121013' of git://git.infradead.org/users/dhowells/linux-headers: UAPI: (Scripted) Disintegrate include/linux/byteorder UAPI: (Scripted) Disintegrate include/linux UAPI: Unexport linux/blk_types.h UAPI: Unexport part of linux/ppp-comp.h
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r--include/linux/quota.h139
1 files changed, 1 insertions, 138 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h
index dcd5721e626d..58fdef125252 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -29,146 +29,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-
#ifndef _LINUX_QUOTA_
#define _LINUX_QUOTA_
-#include <linux/errno.h>
-#include <linux/types.h>
-
-#define __DQUOT_VERSION__ "dquot_6.5.2"
-
-#define MAXQUOTAS 2
-#define USRQUOTA 0 /* element used for user quotas */
-#define GRPQUOTA 1 /* element used for group quotas */
-
-/*
- * Definitions for the default names of the quotas files.
- */
-#define INITQFNAMES { \
- "user", /* USRQUOTA */ \
- "group", /* GRPQUOTA */ \
- "undefined", \
-};
-
-/*
- * Command definitions for the 'quotactl' system call.
- * The commands are broken into a main command defined below
- * and a subcommand that is used to convey the type of
- * quota that is being manipulated (see above).
- */
-#define SUBCMDMASK 0x00ff
-#define SUBCMDSHIFT 8
-#define QCMD(cmd, type) (((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK))
-
-#define Q_SYNC 0x800001 /* sync disk copy of a filesystems quotas */
-#define Q_QUOTAON 0x800002 /* turn quotas on */
-#define Q_QUOTAOFF 0x800003 /* turn quotas off */
-#define Q_GETFMT 0x800004 /* get quota format used on given filesystem */
-#define Q_GETINFO 0x800005 /* get information about quota files */
-#define Q_SETINFO 0x800006 /* set information about quota files */
-#define Q_GETQUOTA 0x800007 /* get user quota structure */
-#define Q_SETQUOTA 0x800008 /* set user quota structure */
-
-/* Quota format type IDs */
-#define QFMT_VFS_OLD 1
-#define QFMT_VFS_V0 2
-#define QFMT_OCFS2 3
-#define QFMT_VFS_V1 4
-
-/* Size of block in which space limits are passed through the quota
- * interface */
-#define QIF_DQBLKSIZE_BITS 10
-#define QIF_DQBLKSIZE (1 << QIF_DQBLKSIZE_BITS)
-
-/*
- * Quota structure used for communication with userspace via quotactl
- * Following flags are used to specify which fields are valid
- */
-enum {
- QIF_BLIMITS_B = 0,
- QIF_SPACE_B,
- QIF_ILIMITS_B,
- QIF_INODES_B,
- QIF_BTIME_B,
- QIF_ITIME_B,
-};
-
-#define QIF_BLIMITS (1 << QIF_BLIMITS_B)
-#define QIF_SPACE (1 << QIF_SPACE_B)
-#define QIF_ILIMITS (1 << QIF_ILIMITS_B)
-#define QIF_INODES (1 << QIF_INODES_B)
-#define QIF_BTIME (1 << QIF_BTIME_B)
-#define QIF_ITIME (1 << QIF_ITIME_B)
-#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)
-#define QIF_USAGE (QIF_SPACE | QIF_INODES)
-#define QIF_TIMES (QIF_BTIME | QIF_ITIME)
-#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
-
-struct if_dqblk {
- __u64 dqb_bhardlimit;
- __u64 dqb_bsoftlimit;
- __u64 dqb_curspace;
- __u64 dqb_ihardlimit;
- __u64 dqb_isoftlimit;
- __u64 dqb_curinodes;
- __u64 dqb_btime;
- __u64 dqb_itime;
- __u32 dqb_valid;
-};
-
-/*
- * Structure used for setting quota information about file via quotactl
- * Following flags are used to specify which fields are valid
- */
-#define IIF_BGRACE 1
-#define IIF_IGRACE 2
-#define IIF_FLAGS 4
-#define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)
-
-struct if_dqinfo {
- __u64 dqi_bgrace;
- __u64 dqi_igrace;
- __u32 dqi_flags;
- __u32 dqi_valid;
-};
-
-/*
- * Definitions for quota netlink interface
- */
-#define QUOTA_NL_NOWARN 0
-#define QUOTA_NL_IHARDWARN 1 /* Inode hardlimit reached */
-#define QUOTA_NL_ISOFTLONGWARN 2 /* Inode grace time expired */
-#define QUOTA_NL_ISOFTWARN 3 /* Inode softlimit reached */
-#define QUOTA_NL_BHARDWARN 4 /* Block hardlimit reached */
-#define QUOTA_NL_BSOFTLONGWARN 5 /* Block grace time expired */
-#define QUOTA_NL_BSOFTWARN 6 /* Block softlimit reached */
-#define QUOTA_NL_IHARDBELOW 7 /* Usage got below inode hardlimit */
-#define QUOTA_NL_ISOFTBELOW 8 /* Usage got below inode softlimit */
-#define QUOTA_NL_BHARDBELOW 9 /* Usage got below block hardlimit */
-#define QUOTA_NL_BSOFTBELOW 10 /* Usage got below block softlimit */
-
-enum {
- QUOTA_NL_C_UNSPEC,
- QUOTA_NL_C_WARNING,
- __QUOTA_NL_C_MAX,
-};
-#define QUOTA_NL_C_MAX (__QUOTA_NL_C_MAX - 1)
-
-enum {
- QUOTA_NL_A_UNSPEC,
- QUOTA_NL_A_QTYPE,
- QUOTA_NL_A_EXCESS_ID,
- QUOTA_NL_A_WARNING,
- QUOTA_NL_A_DEV_MAJOR,
- QUOTA_NL_A_DEV_MINOR,
- QUOTA_NL_A_CAUSED_ID,
- __QUOTA_NL_A_MAX,
-};
-#define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)
-
-
-#ifdef __KERNEL__
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/rwsem.h>
@@ -183,6 +46,7 @@ enum {
#include <linux/atomic.h>
#include <linux/uidgid.h>
#include <linux/projid.h>
+#include <uapi/linux/quota.h>
#undef USRQUOTA
#undef GRPQUOTA
@@ -543,5 +407,4 @@ struct quota_module_name {
{QFMT_VFS_V0, "quota_v2"},\
{0, NULL}}
-#endif /* __KERNEL__ */
#endif /* _QUOTA_ */