diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:51:18 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 22:51:18 -0400 |
| commit | 2a5a68b840cbab31baab2d9b2e1e6de3b289ae1e (patch) | |
| tree | 25b8fc041b4dce6c404ff01b462bc6b58fa7d372 /fs/xfs/xfs_dmapi.h | |
| parent | 990a8baf568ca1d0ae65e59783ff821794118d07 (diff) | |
| parent | e1a40fa907498030b6e432c0dbcb06d7a9f14ee3 (diff) | |
Merge rsync://oss.sgi.com/git/xfs-2.6
Diffstat (limited to 'fs/xfs/xfs_dmapi.h')
| -rw-r--r-- | fs/xfs/xfs_dmapi.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index 55ae3e67d245..55c17adaaa37 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h | |||
| @@ -166,27 +166,32 @@ typedef enum { | |||
| 166 | #define DM_FLAGS_NDELAY 0x001 /* return EAGAIN after dm_pending() */ | 166 | #define DM_FLAGS_NDELAY 0x001 /* return EAGAIN after dm_pending() */ |
| 167 | #define DM_FLAGS_UNWANTED 0x002 /* event not in fsys dm_eventset_t */ | 167 | #define DM_FLAGS_UNWANTED 0x002 /* event not in fsys dm_eventset_t */ |
| 168 | #define DM_FLAGS_ISEM 0x004 /* thread holds i_sem */ | 168 | #define DM_FLAGS_ISEM 0x004 /* thread holds i_sem */ |
| 169 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) | ||
| 170 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,21) | ||
| 171 | /* i_alloc_sem was added in 2.4.22-pre1 */ | ||
| 172 | #define DM_FLAGS_IALLOCSEM_RD 0x010 /* thread holds i_alloc_sem rd */ | 169 | #define DM_FLAGS_IALLOCSEM_RD 0x010 /* thread holds i_alloc_sem rd */ |
| 173 | #define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */ | 170 | #define DM_FLAGS_IALLOCSEM_WR 0x020 /* thread holds i_alloc_sem wr */ |
| 174 | #endif | ||
| 175 | #endif | ||
| 176 | 171 | ||
| 177 | /* | 172 | /* |
| 178 | * Based on IO_ISDIRECT, decide which i_ flag is set. | 173 | * Based on IO_ISDIRECT, decide which i_ flag is set. |
| 179 | */ | 174 | */ |
| 180 | #ifdef DM_FLAGS_IALLOCSEM_RD | 175 | #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) |
| 176 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | ||
| 177 | DM_FLAGS_ISEM : 0) | ||
| 178 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM) | ||
| 179 | #endif | ||
| 180 | |||
| 181 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \ | ||
| 182 | (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,22)) | ||
| 181 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | 183 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ |
| 182 | DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_ISEM) | 184 | DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_ISEM) |
| 183 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM) | 185 | #define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM) |
| 184 | #else | 186 | #endif |
| 187 | |||
| 188 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,21) | ||
| 185 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ | 189 | #define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \ |
| 186 | 0 : DM_FLAGS_ISEM) | 190 | 0 : DM_FLAGS_ISEM) |
| 187 | #define DM_SEM_FLAG_WR (DM_FLAGS_ISEM) | 191 | #define DM_SEM_FLAG_WR (DM_FLAGS_ISEM) |
| 188 | #endif | 192 | #endif |
| 189 | 193 | ||
| 194 | |||
| 190 | /* | 195 | /* |
| 191 | * Macros to turn caller specified delay/block flags into | 196 | * Macros to turn caller specified delay/block flags into |
| 192 | * dm_send_xxxx_event flag DM_FLAGS_NDELAY. | 197 | * dm_send_xxxx_event flag DM_FLAGS_NDELAY. |
