aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_mount.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2007-08-30 03:19:57 -0400
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-10-15 21:43:26 -0400
commitb09cc77109dbf33463480952de10511a2b67bba6 (patch)
tree722ed205af03de0f33b955aeb3a573565242497a /fs/xfs/xfs_mount.h
parent293688ec420f1160ed93ea4c7948ed5baf8bafa7 (diff)
[XFS] remove dependency of the quota module on behaviors
Mount options are now parsed by the main XFS module and rejected if quota support is not available, and there are some new quota operation for the quotactl syscall and calls to quote in the mount, unmount and sync callchains. SGI-PV: 969608 SGI-Modid: xfs-linux-melb:xfs-kern:29503a Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.h')
-rw-r--r--fs/xfs/xfs_mount.h43
1 files changed, 28 insertions, 15 deletions
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index a7cd596ec6d2..594d7856c77e 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -142,6 +142,9 @@ typedef struct xfs_dquot * (*xfs_dqvopchown_t)(
142 struct xfs_dquot **, struct xfs_dquot *); 142 struct xfs_dquot **, struct xfs_dquot *);
143typedef int (*xfs_dqvopchownresv_t)(struct xfs_trans *, struct xfs_inode *, 143typedef int (*xfs_dqvopchownresv_t)(struct xfs_trans *, struct xfs_inode *,
144 struct xfs_dquot *, struct xfs_dquot *, uint); 144 struct xfs_dquot *, struct xfs_dquot *, uint);
145typedef void (*xfs_dqstatvfs_t)(struct xfs_inode *, bhv_statvfs_t *);
146typedef int (*xfs_dqsync_t)(struct xfs_mount *, int flags);
147typedef int (*xfs_quotactl_t)(struct xfs_mount *, int, int, xfs_caddr_t);
145 148
146typedef struct xfs_qmops { 149typedef struct xfs_qmops {
147 xfs_qminit_t xfs_qminit; 150 xfs_qminit_t xfs_qminit;
@@ -157,35 +160,44 @@ typedef struct xfs_qmops {
157 xfs_dqvoprename_t xfs_dqvoprename; 160 xfs_dqvoprename_t xfs_dqvoprename;
158 xfs_dqvopchown_t xfs_dqvopchown; 161 xfs_dqvopchown_t xfs_dqvopchown;
159 xfs_dqvopchownresv_t xfs_dqvopchownresv; 162 xfs_dqvopchownresv_t xfs_dqvopchownresv;
163 xfs_dqstatvfs_t xfs_dqstatvfs;
164 xfs_dqsync_t xfs_dqsync;
165 xfs_quotactl_t xfs_quotactl;
160 struct xfs_dqtrxops *xfs_dqtrxops; 166 struct xfs_dqtrxops *xfs_dqtrxops;
161} xfs_qmops_t; 167} xfs_qmops_t;
162 168
163#define XFS_QM_INIT(mp, mnt, fl) \ 169#define XFS_QM_INIT(mp, mnt, fl) \
164 (*(mp)->m_qm_ops.xfs_qminit)(mp, mnt, fl) 170 (*(mp)->m_qm_ops->xfs_qminit)(mp, mnt, fl)
165#define XFS_QM_MOUNT(mp, mnt, fl, mfsi_flags) \ 171#define XFS_QM_MOUNT(mp, mnt, fl, mfsi_flags) \
166 (*(mp)->m_qm_ops.xfs_qmmount)(mp, mnt, fl, mfsi_flags) 172 (*(mp)->m_qm_ops->xfs_qmmount)(mp, mnt, fl, mfsi_flags)
167#define XFS_QM_UNMOUNT(mp) \ 173#define XFS_QM_UNMOUNT(mp) \
168 (*(mp)->m_qm_ops.xfs_qmunmount)(mp) 174 (*(mp)->m_qm_ops->xfs_qmunmount)(mp)
169#define XFS_QM_DONE(mp) \ 175#define XFS_QM_DONE(mp) \
170 (*(mp)->m_qm_ops.xfs_qmdone)(mp) 176 (*(mp)->m_qm_ops->xfs_qmdone)(mp)
171#define XFS_QM_DQRELE(mp, dq) \ 177#define XFS_QM_DQRELE(mp, dq) \
172 (*(mp)->m_qm_ops.xfs_dqrele)(dq) 178 (*(mp)->m_qm_ops->xfs_dqrele)(dq)
173#define XFS_QM_DQATTACH(mp, ip, fl) \ 179#define XFS_QM_DQATTACH(mp, ip, fl) \
174 (*(mp)->m_qm_ops.xfs_dqattach)(ip, fl) 180 (*(mp)->m_qm_ops->xfs_dqattach)(ip, fl)
175#define XFS_QM_DQDETACH(mp, ip) \ 181#define XFS_QM_DQDETACH(mp, ip) \
176 (*(mp)->m_qm_ops.xfs_dqdetach)(ip) 182 (*(mp)->m_qm_ops->xfs_dqdetach)(ip)
177#define XFS_QM_DQPURGEALL(mp, fl) \ 183#define XFS_QM_DQPURGEALL(mp, fl) \
178 (*(mp)->m_qm_ops.xfs_dqpurgeall)(mp, fl) 184 (*(mp)->m_qm_ops->xfs_dqpurgeall)(mp, fl)
179#define XFS_QM_DQVOPALLOC(mp, ip, uid, gid, prid, fl, dq1, dq2) \ 185#define XFS_QM_DQVOPALLOC(mp, ip, uid, gid, prid, fl, dq1, dq2) \
180 (*(mp)->m_qm_ops.xfs_dqvopalloc)(mp, ip, uid, gid, prid, fl, dq1, dq2) 186 (*(mp)->m_qm_ops->xfs_dqvopalloc)(mp, ip, uid, gid, prid, fl, dq1, dq2)
181#define XFS_QM_DQVOPCREATE(mp, tp, ip, dq1, dq2) \ 187#define XFS_QM_DQVOPCREATE(mp, tp, ip, dq1, dq2) \
182 (*(mp)->m_qm_ops.xfs_dqvopcreate)(tp, ip, dq1, dq2) 188 (*(mp)->m_qm_ops->xfs_dqvopcreate)(tp, ip, dq1, dq2)
183#define XFS_QM_DQVOPRENAME(mp, ip) \ 189#define XFS_QM_DQVOPRENAME(mp, ip) \
184 (*(mp)->m_qm_ops.xfs_dqvoprename)(ip) 190 (*(mp)->m_qm_ops->xfs_dqvoprename)(ip)
185#define XFS_QM_DQVOPCHOWN(mp, tp, ip, dqp, dq) \ 191#define XFS_QM_DQVOPCHOWN(mp, tp, ip, dqp, dq) \
186 (*(mp)->m_qm_ops.xfs_dqvopchown)(tp, ip, dqp, dq) 192 (*(mp)->m_qm_ops->xfs_dqvopchown)(tp, ip, dqp, dq)
187#define XFS_QM_DQVOPCHOWNRESV(mp, tp, ip, dq1, dq2, fl) \ 193#define XFS_QM_DQVOPCHOWNRESV(mp, tp, ip, dq1, dq2, fl) \
188 (*(mp)->m_qm_ops.xfs_dqvopchownresv)(tp, ip, dq1, dq2, fl) 194 (*(mp)->m_qm_ops->xfs_dqvopchownresv)(tp, ip, dq1, dq2, fl)
195#define XFS_QM_DQSTATVFS(ip, statp) \
196 (*(ip)->i_mount->m_qm_ops->xfs_dqstatvfs)(ip, statp)
197#define XFS_QM_DQSYNC(mp, flags) \
198 (*(mp)->m_qm_ops->xfs_dqsync)(mp, flags)
199#define XFS_QM_QUOTACTL(mp, cmd, id, addr) \
200 (*(mp)->m_qm_ops->xfs_quotactl)(mp, cmd, id, addr)
189 201
190 202
191/* 203/*
@@ -413,7 +425,7 @@ typedef struct xfs_mount {
413 struct xfs_chash *m_chash; /* fs private inode per-cluster 425 struct xfs_chash *m_chash; /* fs private inode per-cluster
414 * hash table */ 426 * hash table */
415 struct xfs_dmops *m_dm_ops; /* vector of DMI ops */ 427 struct xfs_dmops *m_dm_ops; /* vector of DMI ops */
416 struct xfs_qmops m_qm_ops; /* vector of XQM ops */ 428 struct xfs_qmops *m_qm_ops; /* vector of XQM ops */
417 struct xfs_ioops m_io_ops; /* vector of I/O ops */ 429 struct xfs_ioops m_io_ops; /* vector of I/O ops */
418 atomic_t m_active_trans; /* number trans frozen */ 430 atomic_t m_active_trans; /* number trans frozen */
419#ifdef HAVE_PERCPU_SB 431#ifdef HAVE_PERCPU_SB
@@ -649,9 +661,10 @@ extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);
649 661
650extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *); 662extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *);
651extern void xfs_dmops_put(struct xfs_mount *); 663extern void xfs_dmops_put(struct xfs_mount *);
664extern int xfs_qmops_get(struct xfs_mount *, struct xfs_mount_args *);
665extern void xfs_qmops_put(struct xfs_mount *);
652 666
653extern struct xfs_dmops xfs_dmcore_xfs; 667extern struct xfs_dmops xfs_dmcore_xfs;
654extern struct xfs_qmops xfs_qmcore_stub;
655extern struct xfs_ioops xfs_iocore_xfs; 668extern struct xfs_ioops xfs_iocore_xfs;
656 669
657extern int xfs_init(void); 670extern int xfs_init(void);