diff options
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 45b97da1bd06..8b4c075d9a2f 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -89,10 +89,21 @@ int dm_setup_md_queue(struct mapped_device *md); #define dm_target_is_valid(t) ((t)->table) /* + * To check whether the target type is bio-based or not (request-based). + */ +#define dm_target_bio_based(t) ((t)->type->map != NULL) + +/* * To check whether the target type is request-based or not (bio-based). */ #define dm_target_request_based(t) ((t)->type->map_rq != NULL) +/* + * To check whether the target type is a hybrid (capable of being + * either request-based or bio-based). + */ +#define dm_target_hybrid(t) (dm_target_bio_based(t) && dm_target_request_based(t)) + /*----------------------------------------------------------------- * A registry of target types. *---------------------------------------------------------------*/ |