dm-table.c (6a23e05c2fe3c64ec012fd81e51e3ab51e4f2f9f) dm-table.c (953923c09fe83255ae11845db1c9eb576ba73df8)
1/*
2 * Copyright (C) 2001 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 857 unchanged lines hidden (view full) ---

866{
867 return (table_type == DM_TYPE_BIO_BASED ||
868 table_type == DM_TYPE_DAX_BIO_BASED ||
869 table_type == DM_TYPE_NVME_BIO_BASED);
870}
871
872static bool __table_type_request_based(enum dm_queue_mode table_type)
873{
1/*
2 * Copyright (C) 2001 Sistina Software (UK) Limited.
3 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include "dm-core.h"

--- 857 unchanged lines hidden (view full) ---

866{
867 return (table_type == DM_TYPE_BIO_BASED ||
868 table_type == DM_TYPE_DAX_BIO_BASED ||
869 table_type == DM_TYPE_NVME_BIO_BASED);
870}
871
872static bool __table_type_request_based(enum dm_queue_mode table_type)
873{
874 return (table_type == DM_TYPE_REQUEST_BASED ||
875 table_type == DM_TYPE_MQ_REQUEST_BASED);
874 return table_type == DM_TYPE_REQUEST_BASED;
876}
877
878void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type)
879{
880 t->type = type;
881}
882EXPORT_SYMBOL_GPL(dm_table_set_type);
883

--- 97 unchanged lines hidden (view full) ---

981 t->type = DM_TYPE_NVME_BIO_BASED;
982 }
983 }
984 return 0;
985 }
986
987 BUG_ON(!request_based); /* No targets in this table */
988
875}
876
877void dm_table_set_type(struct dm_table *t, enum dm_queue_mode type)
878{
879 t->type = type;
880}
881EXPORT_SYMBOL_GPL(dm_table_set_type);
882

--- 97 unchanged lines hidden (view full) ---

980 t->type = DM_TYPE_NVME_BIO_BASED;
981 }
982 }
983 return 0;
984 }
985
986 BUG_ON(!request_based); /* No targets in this table */
987
989 /*
990 * The only way to establish DM_TYPE_MQ_REQUEST_BASED is by
991 * having a compatible target use dm_table_set_type.
992 */
993 t->type = DM_TYPE_REQUEST_BASED;
994
995verify_rq_based:
996 /*
997 * Request-based dm supports only tables that have a single target now.
998 * To support multiple targets, request splitting support is needed,
999 * and that needs lots of changes in the block-layer.
1000 * (e.g. request completion process for partial completion.)

--- 1065 unchanged lines hidden ---
988 t->type = DM_TYPE_REQUEST_BASED;
989
990verify_rq_based:
991 /*
992 * Request-based dm supports only tables that have a single target now.
993 * To support multiple targets, request splitting support is needed,
994 * and that needs lots of changes in the block-layer.
995 * (e.g. request completion process for partial completion.)

--- 1065 unchanged lines hidden ---