dm.c (26d0dfbb16fcb17d128a79dc70f3020ea6992af0) | dm.c (9360d077d3197f895f34cb8e6ae1b599278abf9d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. 4 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 5 * 6 * This file is released under the GPL. 7 */ 8 --- 1803 unchanged lines hidden (view full) --- 1812 1813static void dm_submit_bio(struct bio *bio) 1814{ 1815 struct mapped_device *md = bio->bi_bdev->bd_disk->private_data; 1816 int srcu_idx; 1817 struct dm_table *map; 1818 1819 map = dm_get_live_table(md, &srcu_idx); | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (C) 2001, 2002 Sistina Software (UK) Limited. 4 * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. 5 * 6 * This file is released under the GPL. 7 */ 8 --- 1803 unchanged lines hidden (view full) --- 1812 1813static void dm_submit_bio(struct bio *bio) 1814{ 1815 struct mapped_device *md = bio->bi_bdev->bd_disk->private_data; 1816 int srcu_idx; 1817 struct dm_table *map; 1818 1819 map = dm_get_live_table(md, &srcu_idx); |
1820 if (unlikely(!map)) { 1821 DMERR_LIMIT("%s: mapping table unavailable, erroring io", 1822 dm_device_name(md)); 1823 bio_io_error(bio); 1824 goto out; 1825 } |
|
1820 | 1826 |
1821 /* If suspended, or map not yet available, queue this IO for later */ 1822 if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags)) || 1823 unlikely(!map)) { | 1827 /* If suspended, queue this IO for later */ 1828 if (unlikely(test_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags))) { |
1824 if (bio->bi_opf & REQ_NOWAIT) 1825 bio_wouldblock_error(bio); 1826 else if (bio->bi_opf & REQ_RAHEAD) 1827 bio_io_error(bio); 1828 else 1829 queue_io(md, bio); 1830 goto out; 1831 } --- 1672 unchanged lines hidden --- | 1829 if (bio->bi_opf & REQ_NOWAIT) 1830 bio_wouldblock_error(bio); 1831 else if (bio->bi_opf & REQ_RAHEAD) 1832 bio_io_error(bio); 1833 else 1834 queue_io(md, bio); 1835 goto out; 1836 } --- 1672 unchanged lines hidden --- |