dm.c (6a23e05c2fe3c64ec012fd81e51e3ab51e4f2f9f) dm.c (953923c09fe83255ae11845db1c9eb576ba73df8)
1/*
2 * Copyright (C) 2001, 2002 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"

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

2208int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
2209{
2210 int r;
2211 struct queue_limits limits;
2212 enum dm_queue_mode type = dm_get_md_type(md);
2213
2214 switch (type) {
2215 case DM_TYPE_REQUEST_BASED:
1/*
2 * Copyright (C) 2001, 2002 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"

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

2208int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t)
2209{
2210 int r;
2211 struct queue_limits limits;
2212 enum dm_queue_mode type = dm_get_md_type(md);
2213
2214 switch (type) {
2215 case DM_TYPE_REQUEST_BASED:
2216 case DM_TYPE_MQ_REQUEST_BASED:
2217 r = dm_mq_init_request_queue(md, t);
2218 if (r) {
2219 DMERR("Cannot initialize queue for request-based dm-mq mapped device");
2220 return r;
2221 }
2222 break;
2223 case DM_TYPE_BIO_BASED:
2224 case DM_TYPE_DAX_BIO_BASED:

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

2941 io_front_pad = roundup(front_pad, __alignof__(struct dm_io)) + offsetof(struct dm_io, tio);
2942 ret = bioset_init(&pools->io_bs, pool_size, io_front_pad, 0);
2943 if (ret)
2944 goto out;
2945 if (integrity && bioset_integrity_create(&pools->io_bs, pool_size))
2946 goto out;
2947 break;
2948 case DM_TYPE_REQUEST_BASED:
2216 r = dm_mq_init_request_queue(md, t);
2217 if (r) {
2218 DMERR("Cannot initialize queue for request-based dm-mq mapped device");
2219 return r;
2220 }
2221 break;
2222 case DM_TYPE_BIO_BASED:
2223 case DM_TYPE_DAX_BIO_BASED:

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

2940 io_front_pad = roundup(front_pad, __alignof__(struct dm_io)) + offsetof(struct dm_io, tio);
2941 ret = bioset_init(&pools->io_bs, pool_size, io_front_pad, 0);
2942 if (ret)
2943 goto out;
2944 if (integrity && bioset_integrity_create(&pools->io_bs, pool_size))
2945 goto out;
2946 break;
2947 case DM_TYPE_REQUEST_BASED:
2949 case DM_TYPE_MQ_REQUEST_BASED:
2950 pool_size = max(dm_get_reserved_rq_based_ios(), min_pool_size);
2951 front_pad = offsetof(struct dm_rq_clone_bio_info, clone);
2952 /* per_io_data_size is used for blk-mq pdu at queue allocation */
2953 break;
2954 default:
2955 BUG();
2956 }
2957

--- 221 unchanged lines hidden ---
2948 pool_size = max(dm_get_reserved_rq_based_ios(), min_pool_size);
2949 front_pad = offsetof(struct dm_rq_clone_bio_info, clone);
2950 /* per_io_data_size is used for blk-mq pdu at queue allocation */
2951 break;
2952 default:
2953 BUG();
2954 }
2955

--- 221 unchanged lines hidden ---