Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 2 | * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 5 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * published by the Free Software Foundation. |
| 8 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 9 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 14 | * 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | */ |
| 18 | #include "xfs.h" |
Nathan Scott | a844f45 | 2005-11-02 14:38:42 +1100 | [diff] [blame] | 19 | #include "xfs_fs.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #include "xfs_types.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | #include "xfs_log.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | #include "xfs_trans.h" |
| 23 | #include "xfs_sb.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #include "xfs_dmapi.h" |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 25 | #include "xfs_inum.h" |
| 26 | #include "xfs_ag.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | #include "xfs_mount.h" |
| 28 | |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 29 | |
| 30 | static struct xfs_dmops xfs_dmcore_stub = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | .xfs_send_data = (xfs_send_data_t)fs_nosys, |
| 32 | .xfs_send_mmap = (xfs_send_mmap_t)fs_noerr, |
| 33 | .xfs_send_destroy = (xfs_send_destroy_t)fs_nosys, |
| 34 | .xfs_send_namesp = (xfs_send_namesp_t)fs_nosys, |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 35 | .xfs_send_mount = (xfs_send_mount_t)fs_nosys, |
| 36 | .xfs_send_unmount = (xfs_send_unmount_t)fs_noerr, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | }; |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 38 | |
| 39 | int |
Christoph Hellwig | 9d565ff | 2008-10-30 17:53:24 +1100 | [diff] [blame] | 40 | xfs_dmops_get(struct xfs_mount *mp) |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 41 | { |
Christoph Hellwig | 9d565ff | 2008-10-30 17:53:24 +1100 | [diff] [blame] | 42 | if (mp->m_flags & XFS_MOUNT_DMAPI) { |
Christoph Hellwig | c8fcfac | 2007-10-19 16:57:01 +1000 | [diff] [blame] | 43 | cmn_err(CE_WARN, |
| 44 | "XFS: dmapi support not available in this kernel."); |
| 45 | return EINVAL; |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 46 | } |
| 47 | |
Christoph Hellwig | c8fcfac | 2007-10-19 16:57:01 +1000 | [diff] [blame] | 48 | mp->m_dm_ops = &xfs_dmcore_stub; |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | void |
| 53 | xfs_dmops_put(struct xfs_mount *mp) |
| 54 | { |
Christoph Hellwig | 293688e | 2007-08-29 11:59:36 +1000 | [diff] [blame] | 55 | } |