xfs: drop dmapi hooks
authorChristoph Hellwig <hch@infradead.org>
Wed, 23 Jun 2010 08:11:15 +0000 (18:11 +1000)
committerAlex Elder <aelder@sgi.com>
Mon, 26 Jul 2010 18:16:33 +0000 (13:16 -0500)
Dmapi support was never merged upstream, but we still have a lot of hooks
bloating XFS for it, all over the fast pathes of the filesystem.

This patch drops over 700 lines of dmapi overhead.  If we'll ever get HSM
support in mainline at least the namespace events can be done much saner
in the VFS instead of the individual filesystem, so it's not like this
is much help for future work.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
70 files changed:
fs/xfs/Makefile
fs/xfs/linux-2.6/xfs_aops.c
fs/xfs/linux-2.6/xfs_buf.c
fs/xfs/linux-2.6/xfs_dmapi_priv.h [deleted file]
fs/xfs/linux-2.6/xfs_export.c
fs/xfs/linux-2.6/xfs_file.c
fs/xfs/linux-2.6/xfs_fs_subr.c
fs/xfs/linux-2.6/xfs_fs_subr.h [deleted file]
fs/xfs/linux-2.6/xfs_ioctl.c
fs/xfs/linux-2.6/xfs_ioctl32.c
fs/xfs/linux-2.6/xfs_iops.c
fs/xfs/linux-2.6/xfs_linux.h
fs/xfs/linux-2.6/xfs_quotaops.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_super.h
fs/xfs/linux-2.6/xfs_sync.c
fs/xfs/linux-2.6/xfs_trace.c
fs/xfs/quota/xfs_dquot.c
fs/xfs/quota/xfs_dquot_item.c
fs/xfs/quota/xfs_qm.c
fs/xfs/quota/xfs_qm_bhv.c
fs/xfs/quota/xfs_qm_stats.c
fs/xfs/quota/xfs_qm_syscalls.c
fs/xfs/quota/xfs_trans_dquot.c
fs/xfs/support/debug.c
fs/xfs/xfs_alloc.c
fs/xfs/xfs_alloc_btree.c
fs/xfs/xfs_attr.c
fs/xfs/xfs_attr_leaf.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap_btree.c
fs/xfs/xfs_btree.c
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_da_btree.c
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_dir2.c
fs/xfs/xfs_dir2_block.c
fs/xfs/xfs_dir2_data.c
fs/xfs/xfs_dir2_leaf.c
fs/xfs/xfs_dir2_node.c
fs/xfs/xfs_dir2_sf.c
fs/xfs/xfs_dmapi.h [deleted file]
fs/xfs/xfs_dmops.c [deleted file]
fs/xfs/xfs_error.c
fs/xfs/xfs_extfree_item.c
fs/xfs/xfs_filestream.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_ialloc.c
fs/xfs/xfs_ialloc_btree.c
fs/xfs/xfs_iget.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_log.c
fs/xfs/xfs_log_cil.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_rename.c
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_rw.c
fs/xfs/xfs_trans.c
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_buf.c
fs/xfs/xfs_trans_extfree.c
fs/xfs/xfs_trans_inode.c
fs/xfs/xfs_trans_item.c
fs/xfs/xfs_utils.c
fs/xfs/xfs_vnodeops.c

index c8fb13f83b3f1f95dc642df019a0d14072ed6d15..a5239b1713be8b642f5914cd7d0ffffb55245a23 100644 (file)
@@ -90,8 +90,7 @@ xfs-y                         += xfs_alloc.o \
                                   xfs_trans_item.o \
                                   xfs_utils.o \
                                   xfs_vnodeops.o \
-                                  xfs_rw.o \
-                                  xfs_dmops.o
+                                  xfs_rw.o
 
 xfs-$(CONFIG_XFS_TRACE)                += xfs_btree_trace.o
 
index 34640d6dbdcb8e6d5879c50a3acafed0cc819708..4cd5e00f0c5c27bf439ef0a8685f338695d2dcb2 100644 (file)
@@ -23,7 +23,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_trans.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 2ee3f7a60163e899e971700aba008a243049726a..4b2177f5b22329a6218c7429d7b37cc1b2323df2 100644 (file)
@@ -39,7 +39,6 @@
 #include "xfs_inum.h"
 #include "xfs_log.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trace.h"
 
diff --git a/fs/xfs/linux-2.6/xfs_dmapi_priv.h b/fs/xfs/linux-2.6/xfs_dmapi_priv.h
deleted file mode 100644 (file)
index a8b0b16..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2000-2006 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef __XFS_DMAPI_PRIV_H__
-#define __XFS_DMAPI_PRIV_H__
-
-/*
- *     Based on IO_ISDIRECT, decide which i_ flag is set.
- */
-#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \
-                             DM_FLAGS_IMUX : 0)
-#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_IMUX)
-
-#endif /*__XFS_DMAPI_PRIV_H__*/
index e7839ee49e43656d0d1edfa7011ce8d9eb0e97b2..09c91325f72743fd342c519f0c3e95720e088442 100644 (file)
@@ -23,7 +23,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_export.h"
 #include "xfs_vnodeops.h"
index 257a56b127cf060013569a211de51efd7f2b1306..dca06131551aafb33e35d55781ec789e38a44608 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_trans.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
@@ -275,20 +274,6 @@ xfs_file_aio_read(
                mutex_lock(&inode->i_mutex);
        xfs_ilock(ip, XFS_IOLOCK_SHARED);
 
-       if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) {
-               int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags);
-               int iolock = XFS_IOLOCK_SHARED;
-
-               ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, ip, iocb->ki_pos, size,
-                                       dmflags, &iolock);
-               if (ret) {
-                       xfs_iunlock(ip, XFS_IOLOCK_SHARED);
-                       if (unlikely(ioflags & IO_ISDIRECT))
-                               mutex_unlock(&inode->i_mutex);
-                       return ret;
-               }
-       }
-
        if (unlikely(ioflags & IO_ISDIRECT)) {
                if (inode->i_mapping->nrpages) {
                        ret = -xfs_flushinval_pages(ip,
@@ -321,7 +306,6 @@ xfs_file_splice_read(
        unsigned int            flags)
 {
        struct xfs_inode        *ip = XFS_I(infilp->f_mapping->host);
-       struct xfs_mount        *mp = ip->i_mount;
        int                     ioflags = 0;
        ssize_t                 ret;
 
@@ -335,18 +319,6 @@ xfs_file_splice_read(
 
        xfs_ilock(ip, XFS_IOLOCK_SHARED);
 
-       if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) {
-               int iolock = XFS_IOLOCK_SHARED;
-               int error;
-
-               error = XFS_SEND_DATA(mp, DM_EVENT_READ, ip, *ppos, count,
-                                       FILP_DELAY_FLAG(infilp), &iolock);
-               if (error) {
-                       xfs_iunlock(ip, XFS_IOLOCK_SHARED);
-                       return -error;
-               }
-       }
-
        trace_xfs_file_splice_read(ip, count, *ppos, ioflags);
 
        ret = generic_file_splice_read(infilp, ppos, pipe, count, flags);
@@ -367,7 +339,6 @@ xfs_file_splice_write(
 {
        struct inode            *inode = outfilp->f_mapping->host;
        struct xfs_inode        *ip = XFS_I(inode);
-       struct xfs_mount        *mp = ip->i_mount;
        xfs_fsize_t             isize, new_size;
        int                     ioflags = 0;
        ssize_t                 ret;
@@ -382,18 +353,6 @@ xfs_file_splice_write(
 
        xfs_ilock(ip, XFS_IOLOCK_EXCL);
 
-       if (DM_EVENT_ENABLED(ip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS)) {
-               int iolock = XFS_IOLOCK_EXCL;
-               int error;
-
-               error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip, *ppos, count,
-                                       FILP_DELAY_FLAG(outfilp), &iolock);
-               if (error) {
-                       xfs_iunlock(ip, XFS_IOLOCK_EXCL);
-                       return -error;
-               }
-       }
-
        new_size = *ppos + count;
 
        xfs_ilock(ip, XFS_ILOCK_EXCL);
@@ -627,7 +586,6 @@ xfs_file_aio_write(
        int                     ioflags = 0;
        xfs_fsize_t             isize, new_size;
        int                     iolock;
-       int                     eventsent = 0;
        size_t                  ocount = 0, count;
        int                     need_i_mutex;
 
@@ -673,33 +631,6 @@ start:
                goto out_unlock_mutex;
        }
 
-       if ((DM_EVENT_ENABLED(ip, DM_EVENT_WRITE) &&
-           !(ioflags & IO_INVIS) && !eventsent)) {
-               int             dmflags = FILP_DELAY_FLAG(file);
-
-               if (need_i_mutex)
-                       dmflags |= DM_FLAGS_IMUX;
-
-               xfs_iunlock(ip, XFS_ILOCK_EXCL);
-               error = XFS_SEND_DATA(ip->i_mount, DM_EVENT_WRITE, ip,
-                                     pos, count, dmflags, &iolock);
-               if (error) {
-                       goto out_unlock_internal;
-               }
-               xfs_ilock(ip, XFS_ILOCK_EXCL);
-               eventsent = 1;
-
-               /*
-                * The iolock was dropped and reacquired in XFS_SEND_DATA
-                * so we have to recheck the size when appending.
-                * We will only "goto start;" once, since having sent the
-                * event prevents another call to XFS_SEND_DATA, which is
-                * what allows the size to change in the first place.
-                */
-               if ((file->f_flags & O_APPEND) && pos != ip->i_size)
-                       goto start;
-       }
-
        if (ioflags & IO_ISDIRECT) {
                xfs_buftarg_t   *target =
                        XFS_IS_REALTIME_INODE(ip) ?
@@ -830,22 +761,6 @@ write_retry:
                xfs_iunlock(ip, XFS_ILOCK_EXCL);
        }
 
-       if (ret == -ENOSPC &&
-           DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) {
-               xfs_iunlock(ip, iolock);
-               if (need_i_mutex)
-                       mutex_unlock(&inode->i_mutex);
-               error = XFS_SEND_NAMESP(ip->i_mount, DM_EVENT_NOSPACE, ip,
-                               DM_RIGHT_NULL, ip, DM_RIGHT_NULL, NULL, NULL,
-                               0, 0, 0); /* Delay flag intentionally  unused */
-               if (need_i_mutex)
-                       mutex_lock(&inode->i_mutex);
-               xfs_ilock(ip, iolock);
-               if (error)
-                       goto out_unlock_internal;
-               goto start;
-       }
-
        error = -ret;
        if (ret <= 0)
                goto out_unlock_internal;
index b6918d76bc7bbdf9740a07955c0e1694a6bf9825..1f279b012f94be7fd4ef2f5fbf084b89921804c1 100644 (file)
 #include "xfs_inode.h"
 #include "xfs_trace.h"
 
-int  fs_noerr(void) { return 0; }
-int  fs_nosys(void) { return ENOSYS; }
-void fs_noval(void) { return; }
-
 /*
  * note: all filemap functions return negative error codes. These
  * need to be inverted before returning to the xfs core functions.
diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.h b/fs/xfs/linux-2.6/xfs_fs_subr.h
deleted file mode 100644 (file)
index 82bb19b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef        __XFS_FS_SUBR_H__
-#define __XFS_FS_SUBR_H__
-
-extern int  fs_noerr(void);
-extern int  fs_nosys(void);
-extern void fs_noval(void);
-
-#endif /* __XFS_FS_SUBR_H__ */
index e59a8106283069b24bb9fb4b5f0ea5bec92d8ede..addd37051aa9d7fb9ec056c3475ece3f3f5e96cb 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
@@ -1116,16 +1115,7 @@ xfs_ioctl_setattr(
        xfs_qm_dqrele(udqp);
        xfs_qm_dqrele(gdqp);
 
-       if (code)
-               return code;
-
-       if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE)) {
-               XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, ip, DM_RIGHT_NULL,
-                               NULL, DM_RIGHT_NULL, NULL, NULL, 0, 0,
-                               (mask & FSX_NONBLOCK) ? DM_FLAGS_NDELAY : 0);
-       }
-
-       return 0;
+       return code;
 
  error_return:
        xfs_qm_dqrele(udqp);
index 52ed49e6465cff0eee12844c13b169583cc1411c..e67be3ae3540629184e3be6625797bdeeeccfbf4 100644 (file)
@@ -29,7 +29,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_attr_sf.h"
index 44f0b2de153eb6c4cf77b36c54278f36166d59ba..ce3118477d9e1825f0373608b0731afdbae84f66 100644 (file)
@@ -26,7 +26,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index facfb323a706a914de84de68b504762c82f05d6c..998a9d7fb9c8964d2174f62f935f6fd46b4f2042 100644 (file)
@@ -87,7 +87,6 @@
 #include <xfs_aops.h>
 #include <xfs_super.h>
 #include <xfs_globals.h>
-#include <xfs_fs_subr.h>
 #include <xfs_buf.h>
 
 /*
index 067cafbfc6357fee83a5adbf265e74ab93eeb999..bfd5ac9d1f6f774c49a58588ecc3d6f881bb04aa 100644 (file)
@@ -16,7 +16,6 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 #include "xfs.h"
-#include "xfs_dmapi.h"
 #include "xfs_sb.h"
 #include "xfs_inum.h"
 #include "xfs_log.h"
index 80938c736c2769861327ea10368cd0c20d4ceb51..4c7b8f9f4deb4bdff563d94ebb9184ee12ae666e 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
@@ -116,9 +115,6 @@ mempool_t *xfs_ioend_pool;
 #define MNTOPT_GQUOTANOENF "gqnoenforce"/* group quota limit enforcement */
 #define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */
 #define MNTOPT_QUOTANOENF  "qnoenforce"        /* same as uqnoenforce */
-#define MNTOPT_DMAPI   "dmapi"         /* DMI enabled (DMAPI / XDSM) */
-#define MNTOPT_XDSM    "xdsm"          /* DMI enabled (DMAPI / XDSM) */
-#define MNTOPT_DMI     "dmi"           /* DMI enabled (DMAPI / XDSM) */
 #define MNTOPT_DELAYLOG   "delaylog"   /* Delayed loging enabled */
 #define MNTOPT_NODELAYLOG "nodelaylog" /* Delayed loging disabled */
 
@@ -172,15 +168,13 @@ suffix_strtoul(char *s, char **endp, unsigned int base)
 STATIC int
 xfs_parseargs(
        struct xfs_mount        *mp,
-       char                    *options,
-       char                    **mtpt)
+       char                    *options)
 {
        struct super_block      *sb = mp->m_super;
        char                    *this_char, *value, *eov;
        int                     dsunit = 0;
        int                     dswidth = 0;
        int                     iosize = 0;
-       int                     dmapi_implies_ikeep = 1;
        __uint8_t               iosizelog = 0;
 
        /*
@@ -243,15 +237,10 @@ xfs_parseargs(
                        if (!mp->m_logname)
                                return ENOMEM;
                } else if (!strcmp(this_char, MNTOPT_MTPT)) {
-                       if (!value || !*value) {
-                               cmn_err(CE_WARN,
-                                       "XFS: %s option requires an argument",
-                                       this_char);
-                               return EINVAL;
-                       }
-                       *mtpt = kstrndup(value, MAXNAMELEN, GFP_KERNEL);
-                       if (!*mtpt)
-                               return ENOMEM;
+                       cmn_err(CE_WARN,
+                               "XFS: %s option not allowed on this system",
+                               this_char);
+                       return EINVAL;
                } else if (!strcmp(this_char, MNTOPT_RTDEV)) {
                        if (!value || !*value) {
                                cmn_err(CE_WARN,
@@ -329,7 +318,6 @@ xfs_parseargs(
                } else if (!strcmp(this_char, MNTOPT_IKEEP)) {
                        mp->m_flags |= XFS_MOUNT_IKEEP;
                } else if (!strcmp(this_char, MNTOPT_NOIKEEP)) {
-                       dmapi_implies_ikeep = 0;
                        mp->m_flags &= ~XFS_MOUNT_IKEEP;
                } else if (!strcmp(this_char, MNTOPT_LARGEIO)) {
                        mp->m_flags &= ~XFS_MOUNT_COMPAT_IOSIZE;
@@ -370,12 +358,6 @@ xfs_parseargs(
                } else if (!strcmp(this_char, MNTOPT_GQUOTANOENF)) {
                        mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
                        mp->m_qflags &= ~XFS_OQUOTA_ENFD;
-               } else if (!strcmp(this_char, MNTOPT_DMAPI)) {
-                       mp->m_flags |= XFS_MOUNT_DMAPI;
-               } else if (!strcmp(this_char, MNTOPT_XDSM)) {
-                       mp->m_flags |= XFS_MOUNT_DMAPI;
-               } else if (!strcmp(this_char, MNTOPT_DMI)) {
-                       mp->m_flags |= XFS_MOUNT_DMAPI;
                } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) {
                        mp->m_flags |= XFS_MOUNT_DELAYLOG;
                        cmn_err(CE_WARN,
@@ -430,12 +412,6 @@ xfs_parseargs(
                return EINVAL;
        }
 
-       if ((mp->m_flags & XFS_MOUNT_DMAPI) && (!*mtpt || *mtpt[0] == '\0')) {
-               printk("XFS: %s option needs the mount point option as well\n",
-                       MNTOPT_DMAPI);
-               return EINVAL;
-       }
-
        if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
                cmn_err(CE_WARN,
                        "XFS: sunit and swidth must be specified together");
@@ -449,18 +425,6 @@ xfs_parseargs(
                return EINVAL;
        }
 
-       /*
-        * Applications using DMI filesystems often expect the
-        * inode generation number to be monotonically increasing.
-        * If we delete inode chunks we break this assumption, so
-        * keep unused inode chunks on disk for DMI filesystems
-        * until we come up with a better solution.
-        * Note that if "ikeep" or "noikeep" mount options are
-        * supplied, then they are honored.
-        */
-       if ((mp->m_flags & XFS_MOUNT_DMAPI) && dmapi_implies_ikeep)
-               mp->m_flags |= XFS_MOUNT_IKEEP;
-
 done:
        if (!(mp->m_flags & XFS_MOUNT_NOALIGN)) {
                /*
@@ -542,7 +506,6 @@ xfs_showargs(
                { XFS_MOUNT_OSYNCISOSYNC,       "," MNTOPT_OSYNCISOSYNC },
                { XFS_MOUNT_ATTR2,              "," MNTOPT_ATTR2 },
                { XFS_MOUNT_FILESTREAMS,        "," MNTOPT_FILESTREAM },
-               { XFS_MOUNT_DMAPI,              "," MNTOPT_DMAPI },
                { XFS_MOUNT_GRPID,              "," MNTOPT_GRPID },
                { XFS_MOUNT_DELAYLOG,           "," MNTOPT_DELAYLOG },
                { 0, NULL }
@@ -1207,8 +1170,6 @@ xfs_fs_put_super(
                xfs_sync_attr(mp, 0);
        }
 
-       XFS_SEND_PREUNMOUNT(mp);
-
        /*
         * Blow away any referenced inode in the filestreams cache.
         * This can and will cause log traffic as inodes go inactive
@@ -1218,14 +1179,11 @@ xfs_fs_put_super(
 
        XFS_bflush(mp->m_ddev_targp);
 
-       XFS_SEND_UNMOUNT(mp);
-
        xfs_unmountfs(mp);
        xfs_freesb(mp);
        xfs_inode_shrinker_unregister(mp);
        xfs_icsb_destroy_counters(mp);
        xfs_close_devices(mp);
-       xfs_dmops_put(mp);
        xfs_free_fsname(mp);
        kfree(mp);
 }
@@ -1543,7 +1501,6 @@ xfs_fs_fill_super(
        struct inode            *root;
        struct xfs_mount        *mp = NULL;
        int                     flags = 0, error = ENOMEM;
-       char                    *mtpt = NULL;
 
        mp = kzalloc(sizeof(struct xfs_mount), GFP_KERNEL);
        if (!mp)
@@ -1559,7 +1516,7 @@ xfs_fs_fill_super(
        mp->m_super = sb;
        sb->s_fs_info = mp;
 
-       error = xfs_parseargs(mp, (char *)data, &mtpt);
+       error = xfs_parseargs(mp, (char *)data);
        if (error)
                goto out_free_fsname;
 
@@ -1571,16 +1528,12 @@ xfs_fs_fill_super(
 #endif
        sb->s_op = &xfs_super_operations;
 
-       error = xfs_dmops_get(mp);
-       if (error)
-               goto out_free_fsname;
-
        if (silent)
                flags |= XFS_MFSI_QUIET;
 
        error = xfs_open_devices(mp);
        if (error)
-               goto out_put_dmops;
+               goto out_free_fsname;
 
        if (xfs_icsb_init_counters(mp))
                mp->m_flags |= XFS_MOUNT_NO_PERCPU_SB;
@@ -1608,8 +1561,6 @@ xfs_fs_fill_super(
        if (error)
                goto out_filestream_unmount;
 
-       XFS_SEND_MOUNT(mp, DM_RIGHT_NULL, mtpt, mp->m_fsname);
-
        sb->s_magic = XFS_SB_MAGIC;
        sb->s_blocksize = mp->m_sb.sb_blocksize;
        sb->s_blocksize_bits = ffs(sb->s_blocksize) - 1;
@@ -1638,7 +1589,6 @@ xfs_fs_fill_super(
 
        xfs_inode_shrinker_register(mp);
 
-       kfree(mtpt);
        return 0;
 
  out_filestream_unmount:
@@ -1648,11 +1598,8 @@ xfs_fs_fill_super(
  out_destroy_counters:
        xfs_icsb_destroy_counters(mp);
        xfs_close_devices(mp);
- out_put_dmops:
-       xfs_dmops_put(mp);
  out_free_fsname:
        xfs_free_fsname(mp);
-       kfree(mtpt);
        kfree(mp);
  out:
        return -error;
index 519618e9279eda5c4d81ca398679d835ff77df28..1ef4a4d2d99796caf7ea1be05fc1becb56846f16 100644 (file)
@@ -56,12 +56,6 @@ extern void xfs_qm_exit(void);
 # define XFS_BIGFS_STRING
 #endif
 
-#ifdef CONFIG_XFS_DMAPI
-# define XFS_DMAPI_STRING      "dmapi support, "
-#else
-# define XFS_DMAPI_STRING
-#endif
-
 #ifdef DEBUG
 # define XFS_DBG_STRING                "debug"
 #else
@@ -72,7 +66,6 @@ extern void xfs_qm_exit(void);
                                XFS_SECURITY_STRING \
                                XFS_REALTIME_STRING \
                                XFS_BIGFS_STRING \
-                               XFS_DMAPI_STRING \
                                XFS_DBG_STRING /* DBG must be last */
 
 struct xfs_inode;
index a51a07c3a70cfa8b5514add3dae137402bbc56b6..ce323377a708364d10e801f29a8e796f6a41029f 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index d12be8470cbac741dcdc42ba402cb2e228dd93a2..03e2dca36d4b7a65999dd4c66add211b26605855 100644 (file)
@@ -34,7 +34,6 @@
 #include "xfs_dinode.h"
 #include "xfs_inode.h"
 #include "xfs_btree.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_ialloc.h"
 #include "xfs_itable.h"
index 585e7633dfc75b176df3989186628385b857bf8e..3c111ea410332eafc168f2357287ad657de3ae4c 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 8d89a24ae3244d1cd2ce75bcf22d37429d5f2ced..15c211bd18d6731783aee8095b7ba55c2f120198 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 67c018392d62a8ecef3c93f35c2b942b0b52137d..0e01edb00cd9710417241a187f1c05ecd67de241 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 97b410c12794d5ddf52579625d4a256ed384d872..7283bccb37a6bcdd018179b140fa264a0f8188a4 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 3d1fc79532e2ab3a2c736c5e799bdd3b39da71dc..446ae61af9a22f97372ed3929e287aacbbf27011 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index b4487764e923b7c493aac813e9161764a0f0ccfb..b286e0a3111b7122b8bc393f28cb1f00ca53ae32 100644 (file)
@@ -28,7 +28,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 061d827da33cd6ea9411c99665ab74d309ebfde9..04155c43b1b4571ef05619174b27efa9c72c147c 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 3f3610a7ee059210eea3beadbffe13f87609dce9..975aa10e1a47a3536499b035947ed0c5ac5098a5 100644 (file)
@@ -22,7 +22,6 @@
 #include "xfs_sb.h"
 #include "xfs_inum.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_error.h"
 
index a7fbe8a99b12bf2c360ea19372a380ae5d27c855..42b4b52644eb999a28009655f5ffb8ccb53212cc 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 83f4942187594ac4b998712dc66b2385b083963e..7d638a5d1f0d7e039e8f2df04ab026a00c08b9bd 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index b9c196a53c42e219a6cca9113d95be704ecc8f9e..426748955e3e2993c1ff8e652ddade95447a78a1 100644 (file)
@@ -26,7 +26,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index a90ce74fc256904837381f61e49c0e569818e89f..ca4d11d3a7a72c65e1e77d047d1312d1477ade04 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index 99587ded043f84b580f0d3331df408a0aa0960fe..9db1418a64bf35dd25bc79a3b7e124dfb8325e9e 100644 (file)
@@ -34,7 +34,6 @@
 #include "xfs_dinode.h"
 #include "xfs_inode.h"
 #include "xfs_btree.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_ialloc.h"
 #include "xfs_itable.h"
@@ -5605,28 +5604,6 @@ xfs_getbmap(
                prealloced = 0;
                fixlen = 1LL << 32;
        } else {
-               /*
-                * If the BMV_IF_NO_DMAPI_READ interface bit specified, do
-                * not generate a DMAPI read event.  Otherwise, if the
-                * DM_EVENT_READ bit is set for the file, generate a read
-                * event in order that the DMAPI application may do its thing
-                * before we return the extents.  Usually this means restoring
-                * user file data to regions of the file that look like holes.
-                *
-                * The "old behavior" (from XFS_IOC_GETBMAP) is to not specify
-                * BMV_IF_NO_DMAPI_READ so that read events are generated.
-                * If this were not true, callers of ioctl(XFS_IOC_GETBMAP)
-                * could misinterpret holes in a DMAPI file as true holes,
-                * when in fact they may represent offline user data.
-                */
-               if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) &&
-                   !(iflags & BMV_IF_NO_DMAPI_READ)) {
-                       error = XFS_SEND_DATA(mp, DM_EVENT_READ, ip,
-                                             0, 0, 0, NULL);
-                       if (error)
-                               return XFS_ERROR(error);
-               }
-
                if (ip->i_d.di_format != XFS_DINODE_FMT_EXTENTS &&
                    ip->i_d.di_format != XFS_DINODE_FMT_BTREE &&
                    ip->i_d.di_format != XFS_DINODE_FMT_LOCAL)
index 416e47e54b83fc79f2472f59de81d8a34769e940..998acf185c482acce42dccbf032d97e56aae9d68 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 96be4b0f249613fef3b0cc8ab0ae443dafc3d2f4..beed23ec9259091e4a08dd3a630bb7712611cf0f 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 02a80984aa05f13189f4c99f186f1f098fa02e3d..91ad92e83bc658556abe5a56d54640b446038b2f 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_buf_item.h"
 #include "xfs_trans_priv.h"
index 0ca556b4bf313bf8526769ff051f188df5a3066e..a4a8965a92f52cc89bc9a96958567af2d7b0646c 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index 7f159d2a429a97e8a71e0fd57298ec499519c064..86330da07f29d68d7a62a46bcd9a913ca61e4717 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 42520f041265fea2d7df1d02bc8a4e3e82215337..429f234c1b1661649658560edb9ab43768a6c450 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index 779a267b0a84c55a83764d25d469493b24ca0a7f..ce3bac65d05666abe96db1fcd147c5b347574e8c 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index 498f8d694330dba475aad5c1c1d1147f73bfab9c..ece400b833dff0d282fc06da016543b9790d59b7 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index e2d89854ec9ec4649f2016d3c2592832bb5ee403..99c8fe0cf2238000bf0dcbf42d82e66854f395e1 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index 78fc4d9ae7562d02ea2068132ac44a81e9dfa776..d1b40ea0cd694b9871c69a17c89b1d85a7efc326 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
index c1a5945d463a3d4ff3abd6aca0beb42f535f6988..d4e63e68fd703d9f10b65dae619ea62eaaeacefc 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h
deleted file mode 100644 (file)
index 2813cdd..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#ifndef __XFS_DMAPI_H__
-#define __XFS_DMAPI_H__
-
-/*     Values used to define the on-disk version of dm_attrname_t. All
- *     on-disk attribute names start with the 8-byte string "SGI_DMI_".
- *
- *      In the on-disk inode, DMAPI attribute names consist of the user-provided
- *      name with the DMATTR_PREFIXSTRING pre-pended.  This string must NEVER be
- *      changed.
- */
-
-#define DMATTR_PREFIXLEN       8
-#define DMATTR_PREFIXSTRING    "SGI_DMI_"
-
-typedef enum {
-       DM_EVENT_INVALID        = -1,
-       DM_EVENT_CANCEL         = 0,            /* not supported */
-       DM_EVENT_MOUNT          = 1,
-       DM_EVENT_PREUNMOUNT     = 2,
-       DM_EVENT_UNMOUNT        = 3,
-       DM_EVENT_DEBUT          = 4,            /* not supported */
-       DM_EVENT_CREATE         = 5,
-       DM_EVENT_CLOSE          = 6,            /* not supported */
-       DM_EVENT_POSTCREATE     = 7,
-       DM_EVENT_REMOVE         = 8,
-       DM_EVENT_POSTREMOVE     = 9,
-       DM_EVENT_RENAME         = 10,
-       DM_EVENT_POSTRENAME     = 11,
-       DM_EVENT_LINK           = 12,
-       DM_EVENT_POSTLINK       = 13,
-       DM_EVENT_SYMLINK        = 14,
-       DM_EVENT_POSTSYMLINK    = 15,
-       DM_EVENT_READ           = 16,
-       DM_EVENT_WRITE          = 17,
-       DM_EVENT_TRUNCATE       = 18,
-       DM_EVENT_ATTRIBUTE      = 19,
-       DM_EVENT_DESTROY        = 20,
-       DM_EVENT_NOSPACE        = 21,
-       DM_EVENT_USER           = 22,
-       DM_EVENT_MAX            = 23
-} dm_eventtype_t;
-#define HAVE_DM_EVENTTYPE_T
-
-typedef enum {
-       DM_RIGHT_NULL,
-       DM_RIGHT_SHARED,
-       DM_RIGHT_EXCL
-} dm_right_t;
-#define HAVE_DM_RIGHT_T
-
-/* Defines for determining if an event message should be sent. */
-#ifdef HAVE_DMAPI
-#define        DM_EVENT_ENABLED(ip, event) ( \
-       unlikely ((ip)->i_mount->m_flags & XFS_MOUNT_DMAPI) && \
-               ( ((ip)->i_d.di_dmevmask & (1 << event)) || \
-                 ((ip)->i_mount->m_dmevmask & (1 << event)) ) \
-       )
-#else
-#define DM_EVENT_ENABLED(ip, event)    (0)
-#endif
-
-#define DM_XFS_VALID_FS_EVENTS         ( \
-       (1 << DM_EVENT_PREUNMOUNT)      | \
-       (1 << DM_EVENT_UNMOUNT)         | \
-       (1 << DM_EVENT_NOSPACE)         | \
-       (1 << DM_EVENT_DEBUT)           | \
-       (1 << DM_EVENT_CREATE)          | \
-       (1 << DM_EVENT_POSTCREATE)      | \
-       (1 << DM_EVENT_REMOVE)          | \
-       (1 << DM_EVENT_POSTREMOVE)      | \
-       (1 << DM_EVENT_RENAME)          | \
-       (1 << DM_EVENT_POSTRENAME)      | \
-       (1 << DM_EVENT_LINK)            | \
-       (1 << DM_EVENT_POSTLINK)        | \
-       (1 << DM_EVENT_SYMLINK)         | \
-       (1 << DM_EVENT_POSTSYMLINK)     | \
-       (1 << DM_EVENT_ATTRIBUTE)       | \
-       (1 << DM_EVENT_DESTROY)         )
-
-/* Events valid in dm_set_eventlist() when called with a file handle for
-   a regular file or a symlink.  These events are persistent.
-*/
-
-#define        DM_XFS_VALID_FILE_EVENTS        ( \
-       (1 << DM_EVENT_ATTRIBUTE)       | \
-       (1 << DM_EVENT_DESTROY)         )
-
-/* Events valid in dm_set_eventlist() when called with a file handle for
-   a directory.  These events are persistent.
-*/
-
-#define        DM_XFS_VALID_DIRECTORY_EVENTS   ( \
-       (1 << DM_EVENT_CREATE)          | \
-       (1 << DM_EVENT_POSTCREATE)      | \
-       (1 << DM_EVENT_REMOVE)          | \
-       (1 << DM_EVENT_POSTREMOVE)      | \
-       (1 << DM_EVENT_RENAME)          | \
-       (1 << DM_EVENT_POSTRENAME)      | \
-       (1 << DM_EVENT_LINK)            | \
-       (1 << DM_EVENT_POSTLINK)        | \
-       (1 << DM_EVENT_SYMLINK)         | \
-       (1 << DM_EVENT_POSTSYMLINK)     | \
-       (1 << DM_EVENT_ATTRIBUTE)       | \
-       (1 << DM_EVENT_DESTROY)         )
-
-/* Events supported by the XFS filesystem. */
-#define        DM_XFS_SUPPORTED_EVENTS         ( \
-       (1 << DM_EVENT_MOUNT)           | \
-       (1 << DM_EVENT_PREUNMOUNT)      | \
-       (1 << DM_EVENT_UNMOUNT)         | \
-       (1 << DM_EVENT_NOSPACE)         | \
-       (1 << DM_EVENT_CREATE)          | \
-       (1 << DM_EVENT_POSTCREATE)      | \
-       (1 << DM_EVENT_REMOVE)          | \
-       (1 << DM_EVENT_POSTREMOVE)      | \
-       (1 << DM_EVENT_RENAME)          | \
-       (1 << DM_EVENT_POSTRENAME)      | \
-       (1 << DM_EVENT_LINK)            | \
-       (1 << DM_EVENT_POSTLINK)        | \
-       (1 << DM_EVENT_SYMLINK)         | \
-       (1 << DM_EVENT_POSTSYMLINK)     | \
-       (1 << DM_EVENT_READ)            | \
-       (1 << DM_EVENT_WRITE)           | \
-       (1 << DM_EVENT_TRUNCATE)        | \
-       (1 << DM_EVENT_ATTRIBUTE)       | \
-       (1 << DM_EVENT_DESTROY)         )
-
-
-/*
- *     Definitions used for the flags field on dm_send_*_event().
- */
-
-#define DM_FLAGS_NDELAY                0x001   /* return EAGAIN after dm_pending() */
-#define DM_FLAGS_UNWANTED      0x002   /* event not in fsys dm_eventset_t */
-#define DM_FLAGS_IMUX          0x004   /* thread holds i_mutex */
-#define DM_FLAGS_IALLOCSEM_RD  0x010   /* thread holds i_alloc_sem rd */
-#define DM_FLAGS_IALLOCSEM_WR  0x020   /* thread holds i_alloc_sem wr */
-
-/*
- *     Pull in platform specific event flags defines
- */
-#include "xfs_dmapi_priv.h"
-
-/*
- *     Macros to turn caller specified delay/block flags into
- *     dm_send_xxxx_event flag DM_FLAGS_NDELAY.
- */
-
-#define FILP_DELAY_FLAG(filp) ((filp->f_flags&(O_NDELAY|O_NONBLOCK)) ? \
-                       DM_FLAGS_NDELAY : 0)
-#define AT_DELAY_FLAG(f) ((f & XFS_ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0)
-
-#endif  /* __XFS_DMAPI_H__ */
diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c
deleted file mode 100644 (file)
index e71e258..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#include "xfs.h"
-#include "xfs_fs.h"
-#include "xfs_types.h"
-#include "xfs_log.h"
-#include "xfs_trans.h"
-#include "xfs_sb.h"
-#include "xfs_dmapi.h"
-#include "xfs_inum.h"
-#include "xfs_ag.h"
-#include "xfs_mount.h"
-
-
-static struct xfs_dmops xfs_dmcore_stub = {
-       .xfs_send_data          = (xfs_send_data_t)fs_nosys,
-       .xfs_send_mmap          = (xfs_send_mmap_t)fs_noerr,
-       .xfs_send_destroy       = (xfs_send_destroy_t)fs_nosys,
-       .xfs_send_namesp        = (xfs_send_namesp_t)fs_nosys,
-       .xfs_send_mount         = (xfs_send_mount_t)fs_nosys,
-       .xfs_send_unmount       = (xfs_send_unmount_t)fs_noerr,
-};
-
-int
-xfs_dmops_get(struct xfs_mount *mp)
-{
-       if (mp->m_flags & XFS_MOUNT_DMAPI) {
-               cmn_err(CE_WARN,
-                       "XFS: dmapi support not available in this kernel.");
-               return EINVAL;
-       }
-
-       mp->m_dm_ops = &xfs_dmcore_stub;
-       return 0;
-}
-
-void
-xfs_dmops_put(struct xfs_mount *mp)
-{
-}
index 047b8a8e5c294856f861251a4cbfa7a7ec0d00fc..3d8456cb71ffa6af75a2c345fb407012c2580620 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_dir2_sf.h"
index 409fe81585fdbb38ea66546c01c4dc74922464b3..1023b1fadfe8492bf8b51eb587de90c43ffdc54c 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_buf_item.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
 #include "xfs_extfree_item.h"
index 390850ee6603922651e9ceebfc0f160ce7ff9495..ad118dac425dbac909c0594243ac5ca959e9f336 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_dinode.h"
 #include "xfs_inode.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_log.h"
 #include "xfs_trans.h"
 #include "xfs_sb.h"
index 37a6f62c57b6f89cd93ca38ed6099c5952367401..84c002eab0d64b3fa6ad6aafa86d1b137af021ee 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index c7142a064c48d7b052d9ac0225f33562d0552386..ab76d73d54e9a837f532b6fc7a22781e8998c8f1 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index c282a9af5393da36022e471332dc45d37705bcbb..0e6563c05e05fb20df8ed4a8f769aed2d38ce853 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 8f8b91be2c996dce5b75901038c507bb4b9ef1da..0eb2f965503c693f8f13b6b01cf7e6bf2eab7466 100644 (file)
@@ -26,7 +26,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index b76a829d7e200d4ead1b9e4406faf93f1e4093e0..767c43a8d164789a1c570c91643a45a4f33e6ca1 100644 (file)
@@ -28,7 +28,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index cf8249a600047b6d7dac03c7c11a4986020ce227..8c561b970c564dc455d3750ad841c1bae5270ffe 100644 (file)
@@ -26,7 +26,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
 #include "xfs_bmap_btree.h"
index ef14943829dabc38aa0f4f7d667ce0de6f9f2d05..a2653aa0f2566a2071f4f544a05296ba11e291b5 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
 #include "xfs_alloc.h"
-#include "xfs_dmapi.h"
 #include "xfs_quota.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
index 2b86f86105125c3869a641b68bc73b984ce69e79..69abb344f2c05a96c09f827ad9b2fe43d59cf448 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 5215abc8023aadf15014c8f475ed529508695e30..03a1ab60c4806c43ddbc7e2d6f6498b87fc01f06 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_error.h"
 #include "xfs_log_priv.h"
index bb17cc044bf37c994dbf877292ecaf36aa3842fb..c7585ab160d5b947fe0cba322c4747df0eba11fe 100644 (file)
@@ -27,7 +27,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_error.h"
 #include "xfs_alloc.h"
index 9ac5cfab27b96da77ac033559229090a3c52490a..f91871397db7c940eebd97023c7cfe5eb5cef01a 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_error.h"
 #include "xfs_bmap_btree.h"
index 69f62d8b2816c52389f4947c9d86b3958ccf57a6..4bf79511f1c83e696cb501aeedc5e91eaec688a5 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 5761087ee8ea31be3e4c571630ceca807485e5e3..e70dc39394ae06855a1922540c43c4ae747e4117 100644 (file)
@@ -66,65 +66,6 @@ struct xfs_nameops;
 struct xfs_ail;
 struct xfs_quotainfo;
 
-
-/*
- * Prototypes and functions for the Data Migration subsystem.
- */
-
-typedef int    (*xfs_send_data_t)(int, struct xfs_inode *,
-                       xfs_off_t, size_t, int, int *);
-typedef int    (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
-typedef int    (*xfs_send_destroy_t)(struct xfs_inode *, dm_right_t);
-typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *,
-                       struct xfs_inode *, dm_right_t,
-                       struct xfs_inode *, dm_right_t,
-                       const unsigned char *, const unsigned char *,
-                       mode_t, int, int);
-typedef int    (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
-                       char *, char *);
-typedef void   (*xfs_send_unmount_t)(struct xfs_mount *, struct xfs_inode *,
-                       dm_right_t, mode_t, int, int);
-
-typedef struct xfs_dmops {
-       xfs_send_data_t         xfs_send_data;
-       xfs_send_mmap_t         xfs_send_mmap;
-       xfs_send_destroy_t      xfs_send_destroy;
-       xfs_send_namesp_t       xfs_send_namesp;
-       xfs_send_mount_t        xfs_send_mount;
-       xfs_send_unmount_t      xfs_send_unmount;
-} xfs_dmops_t;
-
-#define XFS_DMAPI_UNMOUNT_FLAGS(mp) \
-       (((mp)->m_dmevmask & (1 << DM_EVENT_UNMOUNT)) ? 0 : DM_FLAGS_UNWANTED)
-
-#define XFS_SEND_DATA(mp, ev,ip,off,len,fl,lock) \
-       (*(mp)->m_dm_ops->xfs_send_data)(ev,ip,off,len,fl,lock)
-#define XFS_SEND_MMAP(mp, vma,fl) \
-       (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl)
-#define XFS_SEND_DESTROY(mp, ip,right) \
-       (*(mp)->m_dm_ops->xfs_send_destroy)(ip,right)
-#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
-       (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
-#define XFS_SEND_MOUNT(mp,right,path,name) \
-       (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
-#define XFS_SEND_PREUNMOUNT(mp) \
-do { \
-       if (mp->m_flags & XFS_MOUNT_DMAPI) { \
-               (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT, mp, \
-                       (mp)->m_rootip, DM_RIGHT_NULL, \
-                       (mp)->m_rootip, DM_RIGHT_NULL, \
-                       NULL, NULL, 0, 0, XFS_DMAPI_UNMOUNT_FLAGS(mp)); \
-       } \
-} while (0)
-#define XFS_SEND_UNMOUNT(mp) \
-do { \
-       if (mp->m_flags & XFS_MOUNT_DMAPI) { \
-               (*(mp)->m_dm_ops->xfs_send_unmount)(mp, (mp)->m_rootip, \
-                       DM_RIGHT_NULL, 0, 0, XFS_DMAPI_UNMOUNT_FLAGS(mp)); \
-       } \
-} while (0)
-
-
 #ifdef HAVE_PERCPU_SB
 
 /*
@@ -241,8 +182,6 @@ typedef struct xfs_mount {
        uint                    m_chsize;       /* size of next field */
        struct xfs_chash        *m_chash;       /* fs private inode per-cluster
                                                 * hash table */
-       struct xfs_dmops        *m_dm_ops;      /* vector of DMI ops */
-       struct xfs_qmops        *m_qm_ops;      /* vector of XQM ops */
        atomic_t                m_active_trans; /* number trans frozen */
 #ifdef HAVE_PERCPU_SB
        xfs_icsb_cnts_t __percpu *m_sb_cnts;    /* per-cpu superblock counters */
@@ -269,7 +208,6 @@ typedef struct xfs_mount {
                                                   must be synchronous except
                                                   for space allocations */
 #define XFS_MOUNT_DELAYLOG     (1ULL << 1)     /* delayed logging is enabled */
-#define XFS_MOUNT_DMAPI                (1ULL << 2)     /* dmapi is enabled */
 #define XFS_MOUNT_WAS_CLEAN    (1ULL << 3)
 #define XFS_MOUNT_FS_SHUTDOWN  (1ULL << 4)     /* atomic stop of all filesystem
                                                   operations, typically for
@@ -440,11 +378,6 @@ extern int xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);
 
 extern int     xfs_dev_is_read_only(struct xfs_mount *, char *);
 
-extern int     xfs_dmops_get(struct xfs_mount *);
-extern void    xfs_dmops_put(struct xfs_mount *);
-
-extern struct xfs_dmops xfs_dmcore_xfs;
-
 #endif /* __KERNEL__ */
 
 extern void    xfs_mod_sb(struct xfs_trans *, __int64_t);
index fc1cda23b8171552ff6fd99d34adebf6be782bb3..fa752f495a0ce0deee2cfb9da8d8c00cff99de99 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
@@ -119,18 +118,6 @@ xfs_rename(
        xfs_itrace_entry(src_dp);
        xfs_itrace_entry(target_dp);
 
-       if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) ||
-           DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME,
-                                       src_dp, DM_RIGHT_NULL,
-                                       target_dp, DM_RIGHT_NULL,
-                                       src_name->name, target_name->name,
-                                       0, 0, 0);
-               if (error)
-                       return error;
-       }
-       /* Return through std_return after this point. */
-
        new_parent = (src_dp != target_dp);
        src_is_directory = ((src_ip->i_d.di_mode & S_IFMT) == S_IFDIR);
 
@@ -369,26 +356,13 @@ xfs_rename(
         * trans_commit will unlock src_ip, target_ip & decrement
         * the vnode references.
         */
-       error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
-
-       /* Fall through to std_return with error = 0 or errno from
-        * xfs_trans_commit      */
-std_return:
-       if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) ||
-           DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) {
-               (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME,
-                                       src_dp, DM_RIGHT_NULL,
-                                       target_dp, DM_RIGHT_NULL,
-                                       src_name->name, target_name->name,
-                                       0, error, 0);
-       }
-       return error;
+       return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
 
  abort_return:
        cancel_flags |= XFS_TRANS_ABORT;
-       /* FALLTHROUGH */
  error_return:
        xfs_bmap_cancel(&free_list);
        xfs_trans_cancel(tp, cancel_flags);
-       goto std_return;
+ std_return:
+       return error;
 }
index a2d32ce335aa681c3beab111f4c844873353f6af..c7b20568ee88234a6a13fac331a18dcdca2fca59 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index e336742a58a47a467a24abb0688b8c1fe7853207..1101bc63ced42d7ed0bc9dc8cf4efaf1aea8ad3c 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 28547dfce037643fb19744ed36906d5e7f3c1c76..2fd44d8fe3aef540c10eb7f5aef45ae26c170efd 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_error.h"
 #include "xfs_da_btree.h"
index e799824f72451ff017175144994c3322040945a6..dc9069568ff7182db00b0cf6bf9008ea41aeff69 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
 #include "xfs_error.h"
index 63d81a22f4fd60c6d6abc93538c37e6480c8fd3b..93ed4a5edde8dd45ef707eca06123a98c5a92cfa 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index 27cce2a9c7e9108debaab50b96a92a2c0109cb39..dfb6a0fdcf9c5fcf75dd08043693b40a88d3002f 100644 (file)
@@ -23,7 +23,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_trans_priv.h"
 #include "xfs_extfree_item.h"
index 2559dfec946bb990afe7e44af28ae43204d6474a..4f4df63144d7cecd86b12abad2dea762a235db1f 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_alloc_btree.h"
index f11d37d06dcc1cfde42290d17ca885a07a85cb75..55035a7401cb65af9f8117b594341401d588f765 100644 (file)
@@ -28,7 +28,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 
 STATIC int     xfs_trans_unlock_chunk(xfs_log_item_chunk_t *,
index 4d88616bde914ea4fe07696a30fdbd81fca878fa..4b1df677abd9213bc2956d656d3c9869a9367da2 100644 (file)
@@ -25,7 +25,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_dir2_sf.h"
index c1646838898f45120767046f0b62d43cca92dd54..f6fd7502fc0e87ade94294bddc486789505548b0 100644 (file)
@@ -26,7 +26,6 @@
 #include "xfs_sb.h"
 #include "xfs_ag.h"
 #include "xfs_dir2.h"
-#include "xfs_dmapi.h"
 #include "xfs_mount.h"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
@@ -143,16 +142,6 @@ xfs_setattr(
                        goto error_return;
                }
        } else {
-               if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) &&
-                   !(flags & XFS_ATTR_DMI)) {
-                       int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR;
-                       code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, ip,
-                               iattr->ia_size, 0, dmflags, NULL);
-                       if (code) {
-                               lock_flags = 0;
-                               goto error_return;
-                       }
-               }
                if (need_iolock)
                        lock_flags |= XFS_IOLOCK_EXCL;
        }
@@ -470,17 +459,10 @@ xfs_setattr(
                        return XFS_ERROR(code);
        }
 
-       if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) &&
-           !(flags & XFS_ATTR_DMI)) {
-               (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, ip, DM_RIGHT_NULL,
-                                       NULL, DM_RIGHT_NULL, NULL, NULL,
-                                       0, 0, AT_DELAY_FLAG(flags));
-       }
        return 0;
 
  abort_return:
        commit_flags |= XFS_TRANS_ABORT;
-       /* FALLTHROUGH */
  error_return:
        xfs_qm_dqrele(udqp);
        xfs_qm_dqrele(gdqp);
@@ -1060,9 +1042,6 @@ xfs_inactive(
 
        mp = ip->i_mount;
 
-       if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY))
-               XFS_SEND_DESTROY(mp, ip, DM_RIGHT_NULL);
-
        error = 0;
 
        /* If this is a read-only mount, don't do this (would generate I/O) */
@@ -1314,16 +1293,6 @@ xfs_create(
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
 
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE,
-                               dp, DM_RIGHT_NULL, NULL,
-                               DM_RIGHT_NULL, name->name, NULL,
-                               mode, 0, 0);
-
-               if (error)
-                       return error;
-       }
-
        if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
                prid = dp->i_d.di_projid;
        else
@@ -1487,16 +1456,7 @@ xfs_create(
        xfs_qm_dqrele(gdqp);
 
        *ipp = ip;
-
-       /* Fallthrough to std_return with error = 0  */
- std_return:
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) {
-               XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, dp, DM_RIGHT_NULL,
-                               ip, DM_RIGHT_NULL, name->name, NULL, mode,
-                               error, 0);
-       }
-
-       return error;
+       return 0;
 
  out_bmap_cancel:
        xfs_bmap_cancel(&free_list);
@@ -1510,8 +1470,8 @@ xfs_create(
 
        if (unlock_dp_on_error)
                xfs_iunlock(dp, XFS_ILOCK_EXCL);
-
-       goto std_return;
+ std_return:
+       return error;
 
  out_abort_rele:
        /*
@@ -1732,14 +1692,6 @@ xfs_remove(
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
 
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dp, DM_RIGHT_NULL,
-                                       NULL, DM_RIGHT_NULL, name->name, NULL,
-                                       ip->i_d.di_mode, 0, 0);
-               if (error)
-                       return error;
-       }
-
        error = xfs_qm_dqattach(dp, 0);
        if (error)
                goto std_return;
@@ -1877,21 +1829,15 @@ xfs_remove(
        if (!is_dir && link_zero && xfs_inode_is_filestream(ip))
                xfs_filestream_deassociate(ip);
 
- std_return:
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) {
-               XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, dp, DM_RIGHT_NULL,
-                               NULL, DM_RIGHT_NULL, name->name, NULL,
-                               ip->i_d.di_mode, error, 0);
-       }
-
-       return error;
+       return 0;
 
  out_bmap_cancel:
        xfs_bmap_cancel(&free_list);
        cancel_flags |= XFS_TRANS_ABORT;
  out_trans_cancel:
        xfs_trans_cancel(tp, cancel_flags);
-       goto std_return;
+ std_return:
+       return error;
 }
 
 int
@@ -1917,17 +1863,6 @@ xfs_link(
        if (XFS_FORCED_SHUTDOWN(mp))
                return XFS_ERROR(EIO);
 
-       if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK,
-                                       tdp, DM_RIGHT_NULL,
-                                       sip, DM_RIGHT_NULL,
-                                       target_name->name, NULL, 0, 0, 0);
-               if (error)
-                       return error;
-       }
-
-       /* Return through std_return after this point. */
-
        error = xfs_qm_dqattach(sip, 0);
        if (error)
                goto std_return;
@@ -2014,27 +1949,14 @@ xfs_link(
                goto abort_return;
        }
 
-       error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
-       if (error)
-               goto std_return;
-
-       /* Fall through to std_return with error = 0. */
-std_return:
-       if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) {
-               (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK,
-                               tdp, DM_RIGHT_NULL,
-                               sip, DM_RIGHT_NULL,
-                               target_name->name, NULL, 0, error, 0);
-       }
-       return error;
+       return xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES);
 
  abort_return:
        cancel_flags |= XFS_TRANS_ABORT;
-       /* FALLTHROUGH */
-
  error_return:
        xfs_trans_cancel(tp, cancel_flags);
-       goto std_return;
+ std_return:
+       return error;
 }
 
 int
@@ -2086,17 +2008,6 @@ xfs_symlink(
        if (pathlen >= MAXPATHLEN)      /* total string too long */
                return XFS_ERROR(ENAMETOOLONG);
 
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dp,
-                                       DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
-                                       link_name->name,
-                                       (unsigned char *)target_path, 0, 0, 0);
-               if (error)
-                       return error;
-       }
-
-       /* Return through std_return after this point. */
-
        udqp = gdqp = NULL;
        if (dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
                prid = dp->i_d.di_projid;
@@ -2278,21 +2189,8 @@ xfs_symlink(
        xfs_qm_dqrele(udqp);
        xfs_qm_dqrele(gdqp);
 
-       /* Fall through to std_return with error = 0 or errno from
-        * xfs_trans_commit     */
-std_return:
-       if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTSYMLINK)) {
-               (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK,
-                                       dp, DM_RIGHT_NULL,
-                                       error ? NULL : ip,
-                                       DM_RIGHT_NULL, link_name->name,
-                                       (unsigned char *)target_path,
-                                       0, error, 0);
-       }
-
-       if (!error)
-               *ipp = ip;
-       return error;
+       *ipp = ip;
+       return 0;
 
  error2:
        IRELE(ip);
@@ -2306,8 +2204,8 @@ std_return:
 
        if (unlock_dp_on_error)
                xfs_iunlock(dp, XFS_ILOCK_EXCL);
-
-       goto std_return;
+ std_return:
+       return error;
 }
 
 int
@@ -2412,25 +2310,9 @@ xfs_alloc_file_space(
        startoffset_fsb = XFS_B_TO_FSBT(mp, offset);
        allocatesize_fsb = XFS_B_TO_FSB(mp, count);
 
-       /*      Generate a DMAPI event if needed.       */
-       if (alloc_type != 0 && offset < ip->i_size &&
-                       (attr_flags & XFS_ATTR_DMI) == 0  &&
-                       DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) {
-               xfs_off_t           end_dmi_offset;
-
-               end_dmi_offset = offset+len;
-               if (end_dmi_offset > ip->i_size)
-                       end_dmi_offset = ip->i_size;
-               error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip, offset,
-                                     end_dmi_offset - offset, 0, NULL);
-               if (error)
-                       return error;
-       }
-
        /*
         * Allocate file space until done or until there is an error
         */
-retry:
        while (allocatesize_fsb && !error) {
                xfs_fileoff_t   s, e;
 
@@ -2527,17 +2409,6 @@ retry:
                startoffset_fsb += allocated_fsb;
                allocatesize_fsb -= allocated_fsb;
        }
-dmapi_enospc_check:
-       if (error == ENOSPC && (attr_flags & XFS_ATTR_DMI) == 0 &&
-           DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) {
-               error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE,
-                               ip, DM_RIGHT_NULL,
-                               ip, DM_RIGHT_NULL,
-                               NULL, NULL, 0, 0, 0); /* Delay flag intentionally unused */
-               if (error == 0)
-                       goto retry;     /* Maybe DMAPI app. has made space */
-               /* else fall through with error from XFS_SEND_DATA */
-       }
 
        return error;
 
@@ -2548,7 +2419,7 @@ error0:   /* Cancel bmap, unlock inode, unreserve quota blocks, cancel trans */
 error1:        /* Just cancel transaction */
        xfs_trans_cancel(tp, XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT);
        xfs_iunlock(ip, XFS_ILOCK_EXCL);
-       goto dmapi_enospc_check;
+       return error;
 }
 
 /*
@@ -2661,7 +2532,6 @@ xfs_free_file_space(
 {
        int                     committed;
        int                     done;
-       xfs_off_t               end_dmi_offset;
        xfs_fileoff_t           endoffset_fsb;
        int                     error;
        xfs_fsblock_t           firstfsb;
@@ -2691,19 +2561,7 @@ xfs_free_file_space(
                return error;
        rt = XFS_IS_REALTIME_INODE(ip);
        startoffset_fsb = XFS_B_TO_FSB(mp, offset);
-       end_dmi_offset = offset + len;
-       endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset);
-
-       if (offset < ip->i_size && (attr_flags & XFS_ATTR_DMI) == 0 &&
-           DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) {
-               if (end_dmi_offset > ip->i_size)
-                       end_dmi_offset = ip->i_size;
-               error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip,
-                               offset, end_dmi_offset - offset,
-                               AT_DELAY_FLAG(attr_flags), NULL);
-               if (error)
-                       return error;
-       }
+       endoffset_fsb = XFS_B_TO_FSBT(mp, offset + len);
 
        if (attr_flags & XFS_ATTR_NOLOCK)
                need_iolock = 0;