[XFS] optimize dmapi event tests w/o dmapi config

SGI-PV: 969372
SGI-Modid: xfs-linux-melb:xfs-kern:29444a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Vlad Apostolov <vapo@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
This commit is contained in:
Eric Sandeen
2007-08-23 16:19:57 +10:00
committed by Tim Shimmin
parent eb9df39daf
commit 948c6d4fd8
2 changed files with 6 additions and 1 deletions

View File

@@ -67,11 +67,15 @@ typedef enum {
#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 (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \
( ((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) | \