quota: Move quotaio_v[12].h from include/linux/ to fs/
Jan Kara
reviewerPATCH 1/1 quota: Move quotaio_v[12].h from include/linux/ to fs/
Since these include files are used only by implementation of quota formats, there's no need to have them in include/linux/.
Signed-off-by Jan Kara <[email protected]>
--- fs/quota_v1.c | 3 +- fs/quota_v2.c | 7 ++-- fs/quotaio_v1.h | 33 ++++++++++++++++++ fs/quotaio_v2.h | 79 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/quotaio_v1.h | 33 ------------------ include/linux/quotaio_v2.h | 79 -------------------------------------------- 6 files changed, 118 insertions(+), 116 deletions(-) create mode 100644 fs/quotaio_v1.h create mode 100644 fs/quotaio_v2.h delete mode 100644 include/linux/quotaio_v1.h delete mode 100644 include/linux/quotaio_v2.h
fs/quota_v1.c +2 -1
@@ -3,13 +3,14 @@#include <linux/quota.h> #include <linux/quotaops.h> #include <linux/dqblk_v1.h> -#include <linux/quotaio_v1.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/module.h> #include <asm/byteorder.h> +#include "quotaio_v1.h" +MODULE_AUTHOR ("Jan Kara" );MODULE_DESCRIPTION ("Old quota format support" );MODULE_LICENSE ("GPL" );
fs/quota_v2.c +4 -3
@@ -6,7 +6,6 @@#include <linux/fs.h> #include <linux/mount.h> #include <linux/dqblk_v2.h> -#include <linux/quotaio_v2.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/module.h>
@@ -15,6 +14,8 @@#include <asm/byteorder.h> +#include "quotaio_v2.h" +MODULE_AUTHOR ("Jan Kara" );MODULE_DESCRIPTION ("Quota format v2 support" );MODULE_LICENSE ("GPL" );
@@ -129,8 +130,8 @@ static void mem2diskdqb(struct v2_disk_dqblk *d, struct mem_dqblk *m, qid_t id) d->dqb_isoftlimit =cpu_to_le32 (m->dqb_isoftlimit); d->dqb_curinodes =cpu_to_le32 (m->dqb_curinodes); d->dqb_itime =cpu_to_le64 (m->dqb_itime); - d->dqb_bhardlimit =cpu_to_le32 (v2_qbtos (m->dqb_bhardlimit)); - d->dqb_bsoftlimit =cpu_to_le32 (v2_qbtos (m->dqb_bsoftlimit)); + d->dqb_bhardlimit =cpu_to_le32 (v2_stoqb (m->dqb_bhardlimit)); + d->dqb_bsoftlimit =cpu_to_le32 (v2_stoqb (m->dqb_bsoftlimit)); d->dqb_curspace =cpu_to_le64 (m->dqb_curspace); d->dqb_btime =cpu_to_le64 (m->dqb_btime); d->dqb_id =cpu_to_le32 (id);
fs/quotaio_v1.h new file +33 -0
@@ -0,0 +1,33 @@ +#ifndef _LINUX_QUOTAIO_V1_H +#define _LINUX_QUOTAIO_V1_H + +#include <linux/types.h> + +/* +* The following constants define the amount of time given a user +* before the soft limits are treated as hard limits (usually resulting +* in an allocation failure). The timer is started when the user crosses +* their soft limit, it is reset when they go below their soft limit. +*/ +#define MAX_IQ_TIME 604800/* (7*24*60*60) 1 week */ +#define MAX_DQ_TIME 604800/* (7*24*60*60) 1 week */ + +/* +* The following structure defines the format of the disk quota file +* (as it appears on disk) - the file is an array of these structures +* indexed by user or group number. +*/ +struct v1_disk_dqblk { +__u32 dqb_bhardlimit;/* absolute limit on disk blks alloc */ +__u32 dqb_bsoftlimit;/* preferred limit on disk blks */ +__u32 dqb_curblocks;/* current block count */ +__u32 dqb_ihardlimit;/* absolute limit on allocated inodes */ +__u32 dqb_isoftlimit;/* preferred inode limit */ +__u32 dqb_curinodes;/* current # allocated inodes */ +time_t dqb_btime;/* time limit for excessive disk use */ +time_t dqb_itime;/* time limit for excessive inode use */ +}; + +#define v1_dqoff (UID ) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk))) + +#endif /* _LINUX_QUOTAIO_V1_H */
fs/quotaio_v2.h new file +79 -0
79 lines not on this page · raw message
include/linux/quotaio_v1.h deleted +0 -33
@@ -1,33 +0,0 @@ -#ifndef _LINUX_QUOTAIO_V1_H -#define _LINUX_QUOTAIO_V1_H - -#include <linux/types.h> - -/* -* The following constants define the amount of time given a user -* before the soft limits are treated as hard limits (usually resulting -* in an allocation failure). The timer is started when the user crosses -* their soft limit, it is reset when they go below their soft limit. -*/ -#define MAX_IQ_TIME 604800/* (7*24*60*60) 1 week */ -#define MAX_DQ_TIME 604800/* (7*24*60*60) 1 week */ - -/* -* The following structure defines the format of the disk quota file -* (as it appears on disk) - the file is an array of these structures -* indexed by user or group number. -*/ -struct v1_disk_dqblk { -__u32 dqb_bhardlimit;/* absolute limit on disk blks alloc */ -__u32 dqb_bsoftlimit;/* preferred limit on disk blks */ -__u32 dqb_curblocks;/* current block count */ -__u32 dqb_ihardlimit;/* absolute limit on allocated inodes */ -__u32 dqb_isoftlimit;/* preferred inode limit */ -__u32 dqb_curinodes;/* current # allocated inodes */ -time_t dqb_btime;/* time limit for excessive disk use */ -time_t dqb_itime;/* time limit for excessive inode use */ -}; - -#define v1_dqoff (UID ) ((loff_t)((UID) * sizeof (struct v1_disk_dqblk))) - -#endif /* _LINUX_QUOTAIO_V1_H */
include/linux/quotaio_v2.h deleted +0 -79
79 lines not on this page · raw message
Signature · 1 line
1.5.2.4