aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.c14
-rw-r--r--fs/xfs/linux-2.6/xfs_vfs.h7
-rw-r--r--fs/xfs/xfs_dmapi.h3
-rw-r--r--fs/xfs/xfs_dmops.c43
-rw-r--r--fs/xfs/xfs_mount.h24
-rw-r--r--fs/xfs/xfs_vfsops.c31
6 files changed, 82 insertions, 40 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
index 6ed7f137a031..1ce15706458a 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.c
+++ b/fs/xfs/linux-2.6/xfs_vfs.c
@@ -156,19 +156,6 @@ vfs_vget(
156} 156}
157 157
158int 158int
159vfs_dmapiops(
160 struct bhv_desc *bdp,
161 caddr_t addr)
162{
163 struct bhv_desc *next = bdp;
164
165 ASSERT(next);
166 while (! (bhvtovfsops(next))->vfs_dmapiops)
167 next = BHV_NEXT(next);
168 return ((*bhvtovfsops(next)->vfs_dmapiops)(next, addr));
169}
170
171int
172vfs_quotactl( 159vfs_quotactl(
173 struct bhv_desc *bdp, 160 struct bhv_desc *bdp,
174 int cmd, 161 int cmd,
@@ -306,7 +293,6 @@ bhv_remove_all_vfsops(
306 struct xfs_mount *mp; 293 struct xfs_mount *mp;
307 294
308 bhv_remove_vfsops(vfsp, VFS_POSITION_QM); 295 bhv_remove_vfsops(vfsp, VFS_POSITION_QM);
309 bhv_remove_vfsops(vfsp, VFS_POSITION_DM);
310 if (!freebase) 296 if (!freebase)
311 return; 297 return;
312 mp = XFS_VFSTOM(vfsp); 298 mp = XFS_VFSTOM(vfsp);
diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h
index 768ffa96e62b..e63dbdbfd8a0 100644
--- a/fs/xfs/linux-2.6/xfs_vfs.h
+++ b/fs/xfs/linux-2.6/xfs_vfs.h
@@ -66,14 +66,12 @@ typedef struct bhv_vfs {
66typedef enum { 66typedef enum {
67 VFS_BHV_UNKNOWN, /* not specified */ 67 VFS_BHV_UNKNOWN, /* not specified */
68 VFS_BHV_XFS, /* xfs */ 68 VFS_BHV_XFS, /* xfs */
69 VFS_BHV_DM, /* data migration */
70 VFS_BHV_QM, /* quota manager */ 69 VFS_BHV_QM, /* quota manager */
71 VFS_BHV_IO, /* IO path */ 70 VFS_BHV_IO, /* IO path */
72 VFS_BHV_END /* housekeeping end-of-range */ 71 VFS_BHV_END /* housekeeping end-of-range */
73} bhv_vfs_type_t; 72} bhv_vfs_type_t;
74 73
75#define VFS_POSITION_XFS (BHV_POSITION_BASE) 74#define VFS_POSITION_XFS (BHV_POSITION_BASE)
76#define VFS_POSITION_DM (VFS_POSITION_BASE+10)
77#define VFS_POSITION_QM (VFS_POSITION_BASE+20) 75#define VFS_POSITION_QM (VFS_POSITION_BASE+20)
78#define VFS_POSITION_IO (VFS_POSITION_BASE+30) 76#define VFS_POSITION_IO (VFS_POSITION_BASE+30)
79 77
@@ -129,7 +127,6 @@ typedef int (*vfs_statvfs_t)(bhv_desc_t *, bhv_statvfs_t *,
129 struct inode *); 127 struct inode *);
130typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *); 128typedef int (*vfs_sync_t)(bhv_desc_t *, int, struct cred *);
131typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *); 129typedef int (*vfs_vget_t)(bhv_desc_t *, struct inode **, struct fid *);
132typedef int (*vfs_dmapiops_t)(bhv_desc_t *, caddr_t);
133typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t); 130typedef int (*vfs_quotactl_t)(bhv_desc_t *, int, int, caddr_t);
134typedef void (*vfs_init_vnode_t)(bhv_desc_t *, 131typedef void (*vfs_init_vnode_t)(bhv_desc_t *,
135 struct inode *, struct xfs_inode *, int); 132 struct inode *, struct xfs_inode *, int);
@@ -147,7 +144,6 @@ typedef struct bhv_vfsops {
147 vfs_statvfs_t vfs_statvfs; /* file system statistics */ 144 vfs_statvfs_t vfs_statvfs; /* file system statistics */
148 vfs_sync_t vfs_sync; /* flush files */ 145 vfs_sync_t vfs_sync; /* flush files */
149 vfs_vget_t vfs_vget; /* get vnode from fid */ 146 vfs_vget_t vfs_vget; /* get vnode from fid */
150 vfs_dmapiops_t vfs_dmapiops; /* data migration */
151 vfs_quotactl_t vfs_quotactl; /* disk quota */ 147 vfs_quotactl_t vfs_quotactl; /* disk quota */
152 vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */ 148 vfs_init_vnode_t vfs_init_vnode; /* initialize a new vnode */
153 vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */ 149 vfs_force_shutdown_t vfs_force_shutdown; /* crash and burn */
@@ -167,7 +163,6 @@ typedef struct bhv_vfsops {
167#define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp) 163#define bhv_vfs_statvfs(v, sp,vp) vfs_statvfs(VFSHEAD(v), sp,vp)
168#define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr) 164#define bhv_vfs_sync(v, flag,cr) vfs_sync(VFSHEAD(v), flag,cr)
169#define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp) 165#define bhv_vfs_vget(v, vpp,fidp) vfs_vget(VFSHEAD(v), vpp,fidp)
170#define bhv_vfs_dmapiops(v, p) vfs_dmapiops(VFSHEAD(v), p)
171#define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p) 166#define bhv_vfs_quotactl(v, c,id,p) vfs_quotactl(VFSHEAD(v), c,id,p)
172#define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul) 167#define bhv_vfs_init_vnode(v, vp,b,ul) vfs_init_vnode(VFSHEAD(v), vp,b,ul)
173#define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l) 168#define bhv_vfs_force_shutdown(v,u,f,l) vfs_force_shutdown(VFSHEAD(v), u,f,l)
@@ -185,7 +180,6 @@ typedef struct bhv_vfsops {
185#define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp) 180#define bhv_next_vfs_statvfs(b, sp,vp) vfs_statvfs(b, sp,vp)
186#define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr) 181#define bhv_next_vfs_sync(b, flag,cr) vfs_sync(b, flag,cr)
187#define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp) 182#define bhv_next_vfs_vget(b, vpp,fidp) vfs_vget(b, vpp,fidp)
188#define bhv_next_vfs_dmapiops(b, p) vfs_dmapiops(b, p)
189#define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p) 183#define bhv_next_vfs_quotactl(b, c,id,p) vfs_quotactl(b, c,id,p)
190#define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul) 184#define bhv_next_vfs_init_vnode(b, vp,b2,ul) vfs_init_vnode(b, vp,b2,ul)
191#define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l) 185#define bhv_next_force_shutdown(b, fl,f,l) vfs_force_shutdown(b, fl,f,l)
@@ -200,7 +194,6 @@ extern int vfs_root(bhv_desc_t *, struct inode **);
200extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *); 194extern int vfs_statvfs(bhv_desc_t *, bhv_statvfs_t *, struct inode *);
201extern int vfs_sync(bhv_desc_t *, int, struct cred *); 195extern int vfs_sync(bhv_desc_t *, int, struct cred *);
202extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *); 196extern int vfs_vget(bhv_desc_t *, struct inode **, struct fid *);
203extern int vfs_dmapiops(bhv_desc_t *, caddr_t);
204extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t); 197extern int vfs_quotactl(bhv_desc_t *, int, int, caddr_t);
205extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int); 198extern void vfs_init_vnode(bhv_desc_t *, struct inode *, struct xfs_inode *, int);
206extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int); 199extern void vfs_force_shutdown(bhv_desc_t *, int, char *, int);
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h
index 98b4d6325a20..029f96d7d3a0 100644
--- a/fs/xfs/xfs_dmapi.h
+++ b/fs/xfs/xfs_dmapi.h
@@ -168,7 +168,4 @@ typedef enum {
168 DM_FLAGS_NDELAY : 0) 168 DM_FLAGS_NDELAY : 0)
169#define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0) 169#define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0)
170 170
171
172extern struct bhv_module_vfsops xfs_dmops;
173
174#endif /* __XFS_DMAPI_H__ */ 171#endif /* __XFS_DMAPI_H__ */
diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c
index 1e4a35ddf7f9..6cd5704258a2 100644
--- a/fs/xfs/xfs_dmops.c
+++ b/fs/xfs/xfs_dmops.c
@@ -19,18 +19,51 @@
19#include "xfs_fs.h" 19#include "xfs_fs.h"
20#include "xfs_types.h" 20#include "xfs_types.h"
21#include "xfs_log.h" 21#include "xfs_log.h"
22#include "xfs_inum.h"
23#include "xfs_trans.h" 22#include "xfs_trans.h"
24#include "xfs_sb.h" 23#include "xfs_sb.h"
25#include "xfs_ag.h"
26#include "xfs_dir2.h"
27#include "xfs_dmapi.h" 24#include "xfs_dmapi.h"
25#include "xfs_inum.h"
26#include "xfs_ag.h"
28#include "xfs_mount.h" 27#include "xfs_mount.h"
28#include "xfs_clnt.h"
29
29 30
30xfs_dmops_t xfs_dmcore_stub = { 31static struct xfs_dmops xfs_dmcore_stub = {
31 .xfs_send_data = (xfs_send_data_t)fs_nosys, 32 .xfs_send_data = (xfs_send_data_t)fs_nosys,
32 .xfs_send_mmap = (xfs_send_mmap_t)fs_noerr, 33 .xfs_send_mmap = (xfs_send_mmap_t)fs_noerr,
33 .xfs_send_destroy = (xfs_send_destroy_t)fs_nosys, 34 .xfs_send_destroy = (xfs_send_destroy_t)fs_nosys,
34 .xfs_send_namesp = (xfs_send_namesp_t)fs_nosys, 35 .xfs_send_namesp = (xfs_send_namesp_t)fs_nosys,
35 .xfs_send_unmount = (xfs_send_unmount_t)fs_noval, 36 .xfs_send_mount = (xfs_send_mount_t)fs_nosys,
37 .xfs_send_unmount = (xfs_send_unmount_t)fs_noerr,
36}; 38};
39
40int
41xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
42{
43 if (args->flags & XFSMNT_DMAPI) {
44 struct xfs_dmops *ops;
45
46 ops = symbol_get(xfs_dmcore_xfs);
47 if (!ops) {
48 request_module("xfs_dmapi");
49 ops = symbol_get(xfs_dmcore_xfs);
50 }
51
52 if (!ops) {
53 cmn_err(CE_WARN, "XFS: no dmapi support available.");
54 return EINVAL;
55 }
56 mp->m_dm_ops = ops;
57 } else {
58 mp->m_dm_ops = &xfs_dmcore_stub;
59 }
60
61 return 0;
62}
63
64void
65xfs_dmops_put(struct xfs_mount *mp)
66{
67 if (mp->m_dm_ops != &xfs_dmcore_stub)
68 symbol_put(xfs_dmcore_xfs);
69}
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 02b9a6ee9403..a7cd596ec6d2 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -85,6 +85,8 @@ typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *,
85 bhv_vnode_t *, 85 bhv_vnode_t *,
86 dm_right_t, bhv_vnode_t *, dm_right_t, 86 dm_right_t, bhv_vnode_t *, dm_right_t,
87 char *, char *, mode_t, int, int); 87 char *, char *, mode_t, int, int);
88typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
89 char *, char *);
88typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *, 90typedef void (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *,
89 dm_right_t, mode_t, int, int); 91 dm_right_t, mode_t, int, int);
90 92
@@ -93,21 +95,24 @@ typedef struct xfs_dmops {
93 xfs_send_mmap_t xfs_send_mmap; 95 xfs_send_mmap_t xfs_send_mmap;
94 xfs_send_destroy_t xfs_send_destroy; 96 xfs_send_destroy_t xfs_send_destroy;
95 xfs_send_namesp_t xfs_send_namesp; 97 xfs_send_namesp_t xfs_send_namesp;
98 xfs_send_mount_t xfs_send_mount;
96 xfs_send_unmount_t xfs_send_unmount; 99 xfs_send_unmount_t xfs_send_unmount;
97} xfs_dmops_t; 100} xfs_dmops_t;
98 101
99#define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \ 102#define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \
100 (*(mp)->m_dm_ops.xfs_send_data)(ev,vp,off,len,fl,lock) 103 (*(mp)->m_dm_ops->xfs_send_data)(ev,vp,off,len,fl,lock)
101#define XFS_SEND_MMAP(mp, vma,fl) \ 104#define XFS_SEND_MMAP(mp, vma,fl) \
102 (*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl) 105 (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl)
103#define XFS_SEND_DESTROY(mp, vp,right) \ 106#define XFS_SEND_DESTROY(mp, vp,right) \
104 (*(mp)->m_dm_ops.xfs_send_destroy)(vp,right) 107 (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right)
105#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ 108#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
106 (*(mp)->m_dm_ops.xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) 109 (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
107#define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ 110#define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
108 (*(mp)->m_dm_ops.xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) 111 (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl)
112#define XFS_SEND_MOUNT(mp,right,path,name) \
113 (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
109#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \ 114#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \
110 (*(mp)->m_dm_ops.xfs_send_unmount)(vfsp,vp,right,mode,rval,fl) 115 (*(mp)->m_dm_ops->xfs_send_unmount)(vfsp,vp,right,mode,rval,fl)
111 116
112 117
113/* 118/*
@@ -407,7 +412,7 @@ typedef struct xfs_mount {
407 uint m_chsize; /* size of next field */ 412 uint m_chsize; /* size of next field */
408 struct xfs_chash *m_chash; /* fs private inode per-cluster 413 struct xfs_chash *m_chash; /* fs private inode per-cluster
409 * hash table */ 414 * hash table */
410 struct xfs_dmops m_dm_ops; /* vector of DMI ops */ 415 struct xfs_dmops *m_dm_ops; /* vector of DMI ops */
411 struct xfs_qmops m_qm_ops; /* vector of XQM ops */ 416 struct xfs_qmops m_qm_ops; /* vector of XQM ops */
412 struct xfs_ioops m_io_ops; /* vector of I/O ops */ 417 struct xfs_ioops m_io_ops; /* vector of I/O ops */
413 atomic_t m_active_trans; /* number trans frozen */ 418 atomic_t m_active_trans; /* number trans frozen */
@@ -642,7 +647,10 @@ extern void xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
642extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t); 647extern void xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
643extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t); 648extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);
644 649
645extern struct xfs_dmops xfs_dmcore_stub; 650extern int xfs_dmops_get(struct xfs_mount *, struct xfs_mount_args *);
651extern void xfs_dmops_put(struct xfs_mount *);
652
653extern struct xfs_dmops xfs_dmcore_xfs;
646extern struct xfs_qmops xfs_qmcore_stub; 654extern struct xfs_qmops xfs_qmcore_stub;
647extern struct xfs_ioops xfs_iocore_xfs; 655extern struct xfs_ioops xfs_iocore_xfs;
648 656
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 8c0e02279249..1cf8f54d8aa9 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -326,6 +326,8 @@ xfs_start_flags(
326 if (ap->flags2 & XFSMNT2_FILESTREAMS) 326 if (ap->flags2 & XFSMNT2_FILESTREAMS)
327 mp->m_flags |= XFS_MOUNT_FILESTREAMS; 327 mp->m_flags |= XFS_MOUNT_FILESTREAMS;
328 328
329 if (ap->flags & XFSMNT_DMAPI)
330 vfs->vfs_flag |= VFS_DMI;
329 return 0; 331 return 0;
330} 332}
331 333
@@ -430,11 +432,13 @@ xfs_mount(
430 ddev = vfsp->vfs_super->s_bdev; 432 ddev = vfsp->vfs_super->s_bdev;
431 logdev = rtdev = NULL; 433 logdev = rtdev = NULL;
432 434
435 error = xfs_dmops_get(mp, args);
436 if (error)
437 return error;
438
433 /* 439 /*
434 * Setup xfs_mount function vectors from available behaviors 440 * Setup xfs_mount function vectors from available behaviors
435 */ 441 */
436 p = vfs_bhv_lookup(vfsp, VFS_POSITION_DM);
437 mp->m_dm_ops = p ? *(xfs_dmops_t *) vfs_bhv_custom(p) : xfs_dmcore_stub;
438 p = vfs_bhv_lookup(vfsp, VFS_POSITION_QM); 442 p = vfs_bhv_lookup(vfsp, VFS_POSITION_QM);
439 mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_stub; 443 mp->m_qm_ops = p ? *(xfs_qmops_t *) vfs_bhv_custom(p) : xfs_qmcore_stub;
440 p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO); 444 p = vfs_bhv_lookup(vfsp, VFS_POSITION_IO);
@@ -537,6 +541,8 @@ xfs_mount(
537 if (error) 541 if (error)
538 goto error2; 542 goto error2;
539 543
544 XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, args->mtpt, args->fsname);
545
540 return 0; 546 return 0;
541 547
542error2: 548error2:
@@ -550,6 +556,7 @@ error1:
550 xfs_binval(mp->m_rtdev_targp); 556 xfs_binval(mp->m_rtdev_targp);
551error0: 557error0:
552 xfs_unmountfs_close(mp, credp); 558 xfs_unmountfs_close(mp, credp);
559 xfs_dmops_put(mp);
553 return error; 560 return error;
554} 561}
555 562
@@ -640,6 +647,7 @@ out:
640 * and free the super block buffer & mount structures. 647 * and free the super block buffer & mount structures.
641 */ 648 */
642 xfs_unmountfs(mp, credp); 649 xfs_unmountfs(mp, credp);
650 xfs_dmops_put(mp);
643 kmem_free(mp, sizeof(xfs_mount_t)); 651 kmem_free(mp, sizeof(xfs_mount_t));
644 } 652 }
645 653
@@ -1688,6 +1696,9 @@ xfs_vget(
1688#define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */ 1696#define MNTOPT_ATTR2 "attr2" /* do use attr2 attribute format */
1689#define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */ 1697#define MNTOPT_NOATTR2 "noattr2" /* do not use attr2 attribute format */
1690#define MNTOPT_FILESTREAM "filestreams" /* use filestreams allocator */ 1698#define MNTOPT_FILESTREAM "filestreams" /* use filestreams allocator */
1699#define MNTOPT_DMAPI "dmapi" /* DMI enabled (DMAPI / XDSM) */
1700#define MNTOPT_XDSM "xdsm" /* DMI enabled (DMAPI / XDSM) */
1701#define MNTOPT_DMI "dmi" /* DMI enabled (DMAPI / XDSM) */
1691 1702
1692STATIC unsigned long 1703STATIC unsigned long
1693suffix_strtoul(char *s, char **endp, unsigned int base) 1704suffix_strtoul(char *s, char **endp, unsigned int base)
@@ -1878,6 +1889,12 @@ xfs_parseargs(
1878 args->flags &= ~XFSMNT_ATTR2; 1889 args->flags &= ~XFSMNT_ATTR2;
1879 } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) { 1890 } else if (!strcmp(this_char, MNTOPT_FILESTREAM)) {
1880 args->flags2 |= XFSMNT2_FILESTREAMS; 1891 args->flags2 |= XFSMNT2_FILESTREAMS;
1892 } else if (!strcmp(this_char, MNTOPT_DMAPI)) {
1893 args->flags |= XFSMNT_DMAPI;
1894 } else if (!strcmp(this_char, MNTOPT_XDSM)) {
1895 args->flags |= XFSMNT_DMAPI;
1896 } else if (!strcmp(this_char, MNTOPT_DMI)) {
1897 args->flags |= XFSMNT_DMAPI;
1881 } else if (!strcmp(this_char, "ihashsize")) { 1898 } else if (!strcmp(this_char, "ihashsize")) {
1882 cmn_err(CE_WARN, 1899 cmn_err(CE_WARN,
1883 "XFS: ihashsize no longer used, option is deprecated."); 1900 "XFS: ihashsize no longer used, option is deprecated.");
@@ -1909,6 +1926,12 @@ xfs_parseargs(
1909 return EINVAL; 1926 return EINVAL;
1910 } 1927 }
1911 1928
1929 if ((args->flags & XFSMNT_DMAPI) && *args->mtpt == '\0') {
1930 printk("XFS: %s option needs the mount point option as well\n",
1931 MNTOPT_DMAPI);
1932 return EINVAL;
1933 }
1934
1912 if ((dsunit && !dswidth) || (!dsunit && dswidth)) { 1935 if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
1913 cmn_err(CE_WARN, 1936 cmn_err(CE_WARN,
1914 "XFS: sunit and swidth must be specified together"); 1937 "XFS: sunit and swidth must be specified together");
@@ -2002,6 +2025,9 @@ xfs_showargs(
2002 if (vfsp->vfs_flag & VFS_GRPID) 2025 if (vfsp->vfs_flag & VFS_GRPID)
2003 seq_printf(m, "," MNTOPT_GRPID); 2026 seq_printf(m, "," MNTOPT_GRPID);
2004 2027
2028 if (vfsp->vfs_flag & VFS_DMI)
2029 seq_puts(m, "," MNTOPT_DMAPI);
2030
2005 return 0; 2031 return 0;
2006} 2032}
2007 2033
@@ -2032,7 +2058,6 @@ bhv_vfsops_t xfs_vfsops = {
2032 .vfs_statvfs = xfs_statvfs, 2058 .vfs_statvfs = xfs_statvfs,
2033 .vfs_sync = xfs_sync, 2059 .vfs_sync = xfs_sync,
2034 .vfs_vget = xfs_vget, 2060 .vfs_vget = xfs_vget,
2035 .vfs_dmapiops = (vfs_dmapiops_t)fs_nosys,
2036 .vfs_quotactl = (vfs_quotactl_t)fs_nosys, 2061 .vfs_quotactl = (vfs_quotactl_t)fs_nosys,
2037 .vfs_init_vnode = xfs_initialize_vnode, 2062 .vfs_init_vnode = xfs_initialize_vnode,
2038 .vfs_force_shutdown = xfs_do_force_shutdown, 2063 .vfs_force_shutdown = xfs_do_force_shutdown,