dm-kcopyd.c (bf61c8840efe60fd8f91446860b63338fb424158) dm-kcopyd.c (670368a8ddc5df56437444c33b8089afc547c30a)
1/*
2 * Copyright (C) 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2006 Red Hat GmbH
4 *
5 * This file is released under the GPL.
6 *
7 * Kcopyd provides a simple interface for copying an area of one
8 * block-device to one or more other block-devices, with an asynchronous

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

828 INIT_LIST_HEAD(&kc->pages_jobs);
829 kc->throttle = throttle;
830
831 kc->job_pool = mempool_create_slab_pool(MIN_JOBS, _job_cache);
832 if (!kc->job_pool)
833 goto bad_slab;
834
835 INIT_WORK(&kc->kcopyd_work, do_work);
1/*
2 * Copyright (C) 2002 Sistina Software (UK) Limited.
3 * Copyright (C) 2006 Red Hat GmbH
4 *
5 * This file is released under the GPL.
6 *
7 * Kcopyd provides a simple interface for copying an area of one
8 * block-device to one or more other block-devices, with an asynchronous

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

828 INIT_LIST_HEAD(&kc->pages_jobs);
829 kc->throttle = throttle;
830
831 kc->job_pool = mempool_create_slab_pool(MIN_JOBS, _job_cache);
832 if (!kc->job_pool)
833 goto bad_slab;
834
835 INIT_WORK(&kc->kcopyd_work, do_work);
836 kc->kcopyd_wq = alloc_workqueue("kcopyd",
837 WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);
836 kc->kcopyd_wq = alloc_workqueue("kcopyd", WQ_MEM_RECLAIM, 0);
838 if (!kc->kcopyd_wq)
839 goto bad_workqueue;
840
841 kc->pages = NULL;
842 kc->nr_reserved_pages = kc->nr_free_pages = 0;
843 r = client_reserve_pages(kc, RESERVE_PAGES);
844 if (r)
845 goto bad_client_pages;

--- 40 unchanged lines hidden ---
837 if (!kc->kcopyd_wq)
838 goto bad_workqueue;
839
840 kc->pages = NULL;
841 kc->nr_reserved_pages = kc->nr_free_pages = 0;
842 r = client_reserve_pages(kc, RESERVE_PAGES);
843 if (r)
844 goto bad_client_pages;

--- 40 unchanged lines hidden ---