From: Philipp Reisner <philipp.reisner@linbit.com>
To: Jens Axboe <axboe@fb.com>, linux-kernel@vger.kernel.org
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 09/17] drbd: Use setup_timer() instead of init_timer() to simplify the code.
Date: Thu, 24 Aug 2017 23:23:06 +0200 [thread overview]
Message-ID: <1503609794-13233-10-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1503609794-13233-1-git-send-email-philipp.reisner@linbit.com>
From: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 11f3852..056d9ab 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2023,18 +2023,14 @@ void drbd_init_set_defaults(struct drbd_device *device)
device->unplug_work.cb = w_send_write_hint;
device->bm_io_work.w.cb = w_bitmap_io;
- init_timer(&device->resync_timer);
- init_timer(&device->md_sync_timer);
- init_timer(&device->start_resync_timer);
- init_timer(&device->request_timer);
- device->resync_timer.function = resync_timer_fn;
- device->resync_timer.data = (unsigned long) device;
- device->md_sync_timer.function = md_sync_timer_fn;
- device->md_sync_timer.data = (unsigned long) device;
- device->start_resync_timer.function = start_resync_timer_fn;
- device->start_resync_timer.data = (unsigned long) device;
- device->request_timer.function = request_timer_fn;
- device->request_timer.data = (unsigned long) device;
+ setup_timer(&device->resync_timer, resync_timer_fn,
+ (unsigned long)device);
+ setup_timer(&device->md_sync_timer, md_sync_timer_fn,
+ (unsigned long)device);
+ setup_timer(&device->start_resync_timer, start_resync_timer_fn,
+ (unsigned long)device);
+ setup_timer(&device->request_timer, request_timer_fn,
+ (unsigned long)device);
init_waitqueue_head(&device->misc_wait);
init_waitqueue_head(&device->state_wait);
--
2.7.4
next prev parent reply other threads:[~2017-08-24 21:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-24 21:22 [PATCH 00/17] DRBD updates Philipp Reisner
2017-08-24 21:22 ` [PATCH 01/17] drbd: introduce drbd_recv_header_maybe_unplug Philipp Reisner
2017-08-25 17:26 ` Jens Axboe
2017-08-28 13:35 ` Philipp Reisner
2017-08-28 13:43 ` Philipp Reisner
2017-08-24 21:22 ` [PATCH 02/17] drbd: change list_for_each_safe to while(list_first_entry_or_null) Philipp Reisner
2017-08-24 21:23 ` [PATCH 03/17] drbd: add explicit plugging when submitting batches Philipp Reisner
2017-08-24 21:23 ` [PATCH 04/17] drbd: Send P_NEG_ACK upon write error in protocol != C Philipp Reisner
2017-08-24 21:23 ` [PATCH 05/17] drbd: mark symbols static where possible Philipp Reisner
2017-08-24 21:23 ` [PATCH 06/17] drbd: Fix resource role for newly created resources in events2 Philipp Reisner
2017-08-24 21:23 ` [PATCH 07/17] drbd: new disk-option disable-write-same Philipp Reisner
2017-08-24 21:23 ` [PATCH 08/17] drbd: fix potential get_ldev/put_ldev refcount imbalance during attach Philipp Reisner
2017-08-24 21:23 ` Philipp Reisner [this message]
2017-08-24 21:23 ` [PATCH 10/17] drbd: fix rmmod cleanup, remove _all_ debugfs entries Philipp Reisner
2017-08-24 21:23 ` [PATCH 11/17] drbd: A single dot should be put into a sequence Philipp Reisner
2017-08-24 21:23 ` [PATCH 12/17] drbd: fix potential deadlock when trying to detach during handshake Philipp Reisner
2017-08-24 21:23 ` [PATCH 13/17] drbd: fix race between handshake and admin disconnect/down Philipp Reisner
2017-08-24 21:23 ` [PATCH 14/17] drbd: rename "usermode_helper" to "drbd_usermode_helper" Philipp Reisner
2017-08-24 21:23 ` [PATCH 15/17] drbd: move global variables to drbd namespace and make some static Philipp Reisner
2017-08-24 21:23 ` [PATCH 16/17] drbd: abort drbd_start_resync if there is no connection Philipp Reisner
2017-08-24 21:23 ` [PATCH 17/17] drbd: switch from kmalloc() to kmalloc_array() Philipp Reisner
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=1503609794-13233-10-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@fb.com \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome