dm.c (b2abdb1b4b9eaffc4f41aa466ce77c2d91bb23df) | dm.c (0cede372ce6a8adf4d4d28fe7edd2aa913804595) |
---|---|
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" --- 2504 unchanged lines hidden (view full) --- 2513 dm_table_presuspend_undo_targets(map); 2514 return r; 2515 } 2516 } 2517 2518 /* 2519 * Here we must make sure that no processes are submitting requests 2520 * to target drivers i.e. no one may be executing | 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" --- 2504 unchanged lines hidden (view full) --- 2513 dm_table_presuspend_undo_targets(map); 2514 return r; 2515 } 2516 } 2517 2518 /* 2519 * Here we must make sure that no processes are submitting requests 2520 * to target drivers i.e. no one may be executing |
2521 * __split_and_process_bio. This is called from dm_request and 2522 * dm_wq_work. | 2521 * __split_and_process_bio from dm_submit_bio. |
2523 * | 2522 * |
2524 * To get all processes out of __split_and_process_bio in dm_request, | 2523 * To get all processes out of __split_and_process_bio in dm_submit_bio, |
2525 * we take the write lock. To prevent any process from reentering | 2524 * we take the write lock. To prevent any process from reentering |
2526 * __split_and_process_bio from dm_request and quiesce the thread 2527 * (dm_wq_work), we set BMF_BLOCK_IO_FOR_SUSPEND and call | 2525 * __split_and_process_bio from dm_submit_bio and quiesce the thread 2526 * (dm_wq_work), we set DMF_BLOCK_IO_FOR_SUSPEND and call |
2528 * flush_workqueue(md->wq). 2529 */ 2530 set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags); 2531 if (map) 2532 synchronize_srcu(&md->io_barrier); 2533 2534 /* 2535 * Stop md->queue before flushing md->wq in case request-based --- 634 unchanged lines hidden --- | 2527 * flush_workqueue(md->wq). 2528 */ 2529 set_bit(DMF_BLOCK_IO_FOR_SUSPEND, &md->flags); 2530 if (map) 2531 synchronize_srcu(&md->io_barrier); 2532 2533 /* 2534 * Stop md->queue before flushing md->wq in case request-based --- 634 unchanged lines hidden --- |