blob: a1e55fb9d5dde43c95565c1aece67d4345232391 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Nathan Scott7b718762005-11-02 14:58:39 +11002 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
3 * All Rights Reserved.
Linus Torvalds1da177e2005-04-16 15:20:36 -07004 *
Nathan Scott7b718762005-11-02 14:58:39 +11005 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
Linus Torvalds1da177e2005-04-16 15:20:36 -07007 * published by the Free Software Foundation.
8 *
Nathan Scott7b718762005-11-02 14:58:39 +11009 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 *
Nathan Scott7b718762005-11-02 14:58:39 +110014 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linus Torvalds1da177e2005-04-16 15:20:36 -070017 */
18#include "xfs.h"
Nathan Scotta844f452005-11-02 14:38:42 +110019#include "xfs_fs.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#include "xfs_types.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070021#include "xfs_log.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070022#include "xfs_trans.h"
23#include "xfs_sb.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070024#include "xfs_dmapi.h"
Christoph Hellwig293688e2007-08-29 11:59:36 +100025#include "xfs_inum.h"
26#include "xfs_ag.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#include "xfs_mount.h"
Christoph Hellwig293688e2007-08-29 11:59:36 +100028#include "xfs_clnt.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070029
Christoph Hellwig293688e2007-08-29 11:59:36 +100030
31static struct xfs_dmops xfs_dmcore_stub = {
Linus Torvalds1da177e2005-04-16 15:20:36 -070032 .xfs_send_data = (xfs_send_data_t)fs_nosys,
33 .xfs_send_mmap = (xfs_send_mmap_t)fs_noerr,
34 .xfs_send_destroy = (xfs_send_destroy_t)fs_nosys,
35 .xfs_send_namesp = (xfs_send_namesp_t)fs_nosys,
Christoph Hellwig293688e2007-08-29 11:59:36 +100036 .xfs_send_mount = (xfs_send_mount_t)fs_nosys,
37 .xfs_send_unmount = (xfs_send_unmount_t)fs_noerr,
Linus Torvalds1da177e2005-04-16 15:20:36 -070038};
Christoph Hellwig293688e2007-08-29 11:59:36 +100039
40int
41xfs_dmops_get(struct xfs_mount *mp, struct xfs_mount_args *args)
42{
43 if (args->flags & XFSMNT_DMAPI) {
Christoph Hellwigc8fcfac2007-10-19 16:57:01 +100044 cmn_err(CE_WARN,
45 "XFS: dmapi support not available in this kernel.");
46 return EINVAL;
Christoph Hellwig293688e2007-08-29 11:59:36 +100047 }
48
Christoph Hellwigc8fcfac2007-10-19 16:57:01 +100049 mp->m_dm_ops = &xfs_dmcore_stub;
Christoph Hellwig293688e2007-08-29 11:59:36 +100050 return 0;
51}
52
53void
54xfs_dmops_put(struct xfs_mount *mp)
55{
Christoph Hellwig293688e2007-08-29 11:59:36 +100056}