From: Tejun Heo <tj@kernel.org>
To: dm-devel@redhat.com, snitzer@redhat.com
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 2/6] dm-snap: kill unused dm_snapshot->queued_bios_work and ksnapd
Date: Sun, 12 Dec 2010 20:10:51 +0100 [thread overview]
Message-ID: <1292181055-25696-3-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1292181055-25696-1-git-send-email-tj@kernel.org>
dm_snapshot->queued_bios_work isn't used anywhere. Remove
->queued_bios[_work], the work function and ksnapd.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@redhat.com
---
drivers/md/dm-snap.c | 38 --------------------------------------
1 files changed, 0 insertions(+), 38 deletions(-)
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 53cf79d..0f47698 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -19,7 +19,6 @@
#include <linux/vmalloc.h>
#include <linux/log2.h>
#include <linux/dm-kcopyd.h>
-#include <linux/workqueue.h>
#include "dm-exception-store.h"
@@ -106,10 +105,6 @@ struct dm_snapshot {
struct dm_kcopyd_client *kcopyd_client;
- /* Queue of snapshot writes for ksnapd to flush */
- struct bio_list queued_bios;
- struct work_struct queued_bios_work;
-
/* Wait for events based on state_bits */
unsigned long state_bits;
@@ -160,9 +155,6 @@ struct dm_dev *dm_snap_cow(struct dm_snapshot *s)
}
EXPORT_SYMBOL(dm_snap_cow);
-static struct workqueue_struct *ksnapd;
-static void flush_queued_bios(struct work_struct *work);
-
static sector_t chunk_to_sector(struct dm_exception_store *store,
chunk_t chunk)
{
@@ -1153,9 +1145,6 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
spin_lock_init(&s->tracked_chunk_lock);
- bio_list_init(&s->queued_bios);
- INIT_WORK(&s->queued_bios_work, flush_queued_bios);
-
ti->private = s;
ti->num_flush_requests = num_flush_requests;
@@ -1279,8 +1268,6 @@ static void snapshot_dtr(struct dm_target *ti)
struct dm_snapshot *s = ti->private;
struct dm_snapshot *snap_src = NULL, *snap_dest = NULL;
- flush_workqueue(ksnapd);
-
down_read(&_origins_lock);
/* Check whether exception handover must be cancelled */
(void) __find_snapshots_sharing_cow(s, &snap_src, &snap_dest, NULL);
@@ -1342,20 +1329,6 @@ static void flush_bios(struct bio *bio)
}
}
-static void flush_queued_bios(struct work_struct *work)
-{
- struct dm_snapshot *s =
- container_of(work, struct dm_snapshot, queued_bios_work);
- struct bio *queued_bios;
- unsigned long flags;
-
- spin_lock_irqsave(&s->pe_lock, flags);
- queued_bios = bio_list_get(&s->queued_bios);
- spin_unlock_irqrestore(&s->pe_lock, flags);
-
- flush_bios(queued_bios);
-}
-
static int do_origin(struct dm_dev *origin, struct bio *bio);
/*
@@ -2291,17 +2264,8 @@ static int __init dm_snapshot_init(void)
goto bad_tracked_chunk_cache;
}
- ksnapd = create_singlethread_workqueue("ksnapd");
- if (!ksnapd) {
- DMERR("Failed to create ksnapd workqueue.");
- r = -ENOMEM;
- goto bad_pending_pool;
- }
-
return 0;
-bad_pending_pool:
- kmem_cache_destroy(tracked_chunk_cache);
bad_tracked_chunk_cache:
kmem_cache_destroy(pending_cache);
bad_pending_cache:
@@ -2322,8 +2286,6 @@ bad_register_snapshot_target:
static void __exit dm_snapshot_exit(void)
{
- destroy_workqueue(ksnapd);
-
dm_unregister_target(&snapshot_target);
dm_unregister_target(&origin_target);
dm_unregister_target(&merge_target);
--
1.7.1
next prev parent reply other threads:[~2010-12-12 19:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-12 19:10 [PATCHSET] dm: update workqueue usages Tejun Heo
2010-12-12 19:10 ` [PATCH 1/6] dm-stripe: drop kstriped Tejun Heo
2010-12-14 23:59 ` Mike Snitzer
2010-12-15 1:34 ` Mike Snitzer
2011-01-07 23:02 ` Alasdair G Kergon
2011-01-08 17:16 ` Tejun Heo
2010-12-12 19:10 ` Tejun Heo [this message]
2010-12-12 19:10 ` [PATCH 3/6] dm-snap: convert to alloc[_ordered]_workqueue() Tejun Heo
2010-12-12 19:10 ` [PATCH 4/6] dm: don't use flush_scheduled_work() Tejun Heo
2010-12-12 19:10 ` [PATCH 5/6] dm: use non-reentrant workqueues if equivalent Tejun Heo
2010-12-12 19:10 ` [PATCH 6/6] dm-snap-persistent: make metadata_wq multithreaded Tejun Heo
2011-01-08 3:31 ` Mikulas Patocka
2010-12-12 21:23 ` [PATCHSET] dm: update workqueue usages Milan Broz
2010-12-14 15:49 ` Tejun Heo
2010-12-14 16:03 ` Mike Snitzer
2010-12-14 16:05 ` Tejun Heo
2010-12-20 14:14 ` Mike Snitzer
2010-12-20 16:03 ` Tejun Heo
2010-12-14 12:19 ` [PATCHSET] " Heinz Mauelshagen
2010-12-14 13:16 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1292181055-25696-3-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=dm-devel@redhat.com \
--cc=snitzer@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.