dm-table.c (dd73c320ec3089149b802a1316321c3e0f6a6aaf) | dm-table.c (7fc18728482b1a29bd7b8439a0ae7b3f23e097d1) |
---|---|
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" --- 2050 unchanged lines hidden (view full) --- 2059 * to the entropy pool, Only request-based targets use this. 2060 * Clear QUEUE_FLAG_ADD_RANDOM if any underlying device does not 2061 * have it set. 2062 */ 2063 if (blk_queue_add_random(q) && 2064 dm_table_any_dev_attr(t, device_is_not_random, NULL)) 2065 blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); 2066 | 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" --- 2050 unchanged lines hidden (view full) --- 2059 * to the entropy pool, Only request-based targets use this. 2060 * Clear QUEUE_FLAG_ADD_RANDOM if any underlying device does not 2061 * have it set. 2062 */ 2063 if (blk_queue_add_random(q) && 2064 dm_table_any_dev_attr(t, device_is_not_random, NULL)) 2065 blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, q); 2066 |
2067 /* 2068 * For a zoned target, the number of zones should be updated for the 2069 * correct value to be exposed in sysfs queue/nr_zones. For a BIO based 2070 * target, this is all that is needed. 2071 */ 2072#ifdef CONFIG_BLK_DEV_ZONED 2073 if (blk_queue_is_zoned(q)) { 2074 WARN_ON_ONCE(queue_is_mq(q)); 2075 q->nr_zones = blkdev_nr_zones(t->md->disk); 2076 } 2077#endif | 2067 /* For a zoned target, setup the zones related queue attributes */ 2068 if (blk_queue_is_zoned(q)) 2069 dm_set_zones_restrictions(t, q); |
2078 2079 dm_update_keyslot_manager(q, t); 2080 blk_queue_update_readahead(q); 2081} 2082 2083unsigned int dm_table_get_num_targets(struct dm_table *t) 2084{ 2085 return t->num_targets; --- 121 unchanged lines hidden --- | 2070 2071 dm_update_keyslot_manager(q, t); 2072 blk_queue_update_readahead(q); 2073} 2074 2075unsigned int dm_table_get_num_targets(struct dm_table *t) 2076{ 2077 return t->num_targets; --- 121 unchanged lines hidden --- |