[PATCH 17/26] drbd: Move resource options from connection to resource

2013-12-20 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |4 ++-- drivers/block/drbd/drbd_main.c | 33 +++-- drivers/block/drbd/drbd_nl.c|8 +++- drivers/block/drbd

[PATCH 24/26] drbd: get_one_status(): Iterate over resource->devices instead of connection->peer_devices

2013-12-20 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_nl.c | 70 +++--- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd

[PATCH 04/26] drbd: Split off on-the-wire protocol definitions

2013-12-20 Thread Philipp Reisner
From: Andreas Gruenbacher Keep the protocol definitions separate from the kernel code; they are useful in their own right. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h | 293 +-- drivers/block/drbd

[PATCH 00/27] DRBD code reorganization

2013-12-23 Thread Philipp Reisner
Hi, we are preparing DRBD for the ability to have multiple connections, in other words the ability to mirror a single block device to multiple peers concurrently. This patch set is the second half of a preparation step. With part 1 it introduces a new in memory object (struct drbd_resource), and

[PATCH 13/27] drbd: Kill drbd_task_to_thread_name()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_bitmap.c | 16 drivers/block/drbd/drbd_int.h|3 +-- drivers/block/drbd/drbd_main.c | 20 ++-- 3 files changed, 11 insertions

[PATCH 26/27] drbd: Use the right peer device

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher in w_e_ (peer request) callbacks and in peer request I/O completion handlers Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_worker.c | 69 +- 1 file changed, 38 insertions(+), 31

[PATCH 23/27] drbd: In the worker thread, process drbd_work instead of drbd_device_work items

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_worker.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index

[PATCH 20/27] drbd: struct drbd_peer_request: Use drbd_work instead of drbd_device_work

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |3 +- drivers/block/drbd/drbd_receiver.c | 91 ++-- drivers/block/drbd/drbd_worker.c | 50 +--- 3 files

[PATCH 01/27] drbd: Rename net_conf variables old_conf -> old_net_conf and new_conf -> new_net_conf

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_nl.c | 92 +- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd

[PATCH 19/27] drbd: struct after_conn_state_chg_work: Use drbd_work instead of drbd_device_work

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_state.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index c9a0dba

[PATCH 16/27] drbd: Rename w_prev_work_done -> w_complete

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Also move it to drbd_receiver.c and make it static. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |1 - drivers/block/drbd/drbd_receiver.c | 10 +- drivers/block/drbd/drbd_worker.c |8

[PATCH 27/27] drbd: Add drbd_thread->resource and make drbd_thread->connection optional

2013-12-23 Thread Philipp Reisner
ruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |1 + drivers/block/drbd/drbd_main.c | 49 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h ind

[PATCH 06/27] drbd: Define the size of res_opts->cpu_mask in a single place

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_main.c |3 +-- include/linux/drbd.h |2 ++ include/linux/drbd_genl.h |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH 24/27] drbd: Get rid of first_peer_device() in handle_write_conflicts()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_receiver.c |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index

[PATCH 05/27] drbd: Move susp, susp_nod, susp_fen from connection to resource

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h | 18 ++ drivers/block/drbd/drbd_main.c |2 +- drivers/block/drbd/drbd_nl.c|3 +-- drivers/block/drbd/drbd_state.c | 17

[PATCH 10/27] drbd: drbd_csum_bio(), drbd_csum_ee(): Remove unused device argument

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |5 ++--- drivers/block/drbd/drbd_main.c |6 +++--- drivers/block/drbd/drbd_receiver.c |4 ++-- drivers/block/drbd/drbd_worker.c | 13

[PATCH 11/27] drbd: Replace vnr_to_mdev() with conn_peer_device()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher The new function returns a peer device, which allows us to eliminate a few instances of first_peer_device(). Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |8 -- drivers/block/drbd/drbd_receiver.c | 174

[PATCH 08/27] drbd: Rename drbdd_init() -> drbd_receiver()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_main.c |4 ++-- drivers/block/drbd/drbd_nl.c |2 +- drivers/block/drbd/drbd_receiver.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 04/27] drbd: Move conf_mutex from connection to resource

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h | 15 +++-- drivers/block/drbd/drbd_main.c | 36 +-- drivers/block/drbd/drbd_nl.c | 50 drivers/block/drbd

[PATCH 21/27] drbd: Make w_make_resync_request() static

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h|1 - drivers/block/drbd/drbd_worker.c |4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block

[PATCH 15/27] drbd: Move string function prototypes from linux/drbd.h to drbd_string.h

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |1 + drivers/block/drbd/drbd_strings.c |1 + drivers/block/drbd/drbd_strings.h |9 + include/linux/drbd.h |6 -- 4 files

[PATCH 22/27] drbd: Turn w_make_ov_request and make_resync_request into "normal" functions

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher These functions are not used as drbd_work callbacks. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_worker.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/block/drbd

[PATCH 14/27] drbd: Remove useless assertion

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_state.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index 1aef152..3f5c5a5

[PATCH 25/27] drbd: Remove unused parameter of wire_flags_to_bio()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_receiver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 5c0239e

[PATCH 09/27] drbd: Function prototype cleanups

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |2 ++ drivers/block/drbd/drbd_main.c |5 - 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block

[PATCH 03/27] drbd: drbd_adm_prepare(): Only set adm_ctx.connection when a connection is requested

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Also change drbd_adm_connect() to expect a resource after it requested one. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_nl.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 17/27] drbd: Create a dedicated struct drbd_device_work

2013-12-23 Thread Philipp Reisner
container_of macro to get it. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_actlog.c | 16 +++-- drivers/block/drbd/drbd_int.h | 29 drivers/block/drbd/drbd_main.c | 32 - drivers/block/drbd/drbd_receiver.c | 84

[PATCH 18/27] drbd: Turn conn_flush_workqueue() into drbd_flush_workqueue()

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher The new function can flush any work queue, not just the work queue of the data socket of a connection. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h | 12 ++-- drivers/block/drbd/drbd_main.c

[PATCH 02/27] drbd: Iterate over all connections

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher in drbd_adm_down(), drbd_create_device() and drbd_set_role() Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_main.c | 55 +++- drivers/block/drbd/drbd_nl.c | 68

[PATCH 07/27] drbd: Move cpu_mask from connection to resource

2013-12-23 Thread Philipp Reisner
From: Andreas Gruenbacher Also fix drbd_calc_cpu_mask() to spread resources equally over all online cpus independent of device minor numbers. Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |5 ++- drivers/block/drbd/drbd_main.c | 74

[PATCH 6/8] drbd: Get rid of the WORK_PENDING macro

2014-08-25 Thread Philipp Reisner
From: Andreas Gruenbacher This macro doesn't add any value; just use test_bit() instead. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_worker.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/block

[PATCH 1/8] drbd: Use better variable names

2014-08-25 Thread Philipp Reisner
From: Andreas Gruenbacher Rename local variable 'ds' to 'disk_state' or 'data_size'. 'dgs' to 'digest_size' Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 6 ++--- drivers/block/drbd/drb

[PATCH 0/8] RFC DRBD cleanups and performance work

2014-08-25 Thread Philipp Reisner
Most of these patches are cleanup work. The exception are the two patches from Lars Ellenberg. These two can bring DRBD's performance into the area of 160k IOPs. (On fitting hardware of course). Andreas Gruenbacher (5): drbd: Use better variable names drbd: Use consistent names for all the bi_

[PATCH 5/8] drbd: Get rid of the __no_warn and __cond_lock macros

2014-08-25 Thread Philipp Reisner
From: Andreas Gruenbacher These macros can easily be replaced with its definition. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h| 11 ++- drivers/block/drbd/drbd_worker.c | 9 ++--- 2 files changed, 12 insertions(+), 8

[PATCH 4/8] drbd: Avoid inconsistent locking warning

2014-08-25 Thread Philipp Reisner
From: Andreas Gruenbacher request_timer_fn() takes resource->req_lock via the device and releases it via the connection. Avoid this as it is confusing static code checkers. Reported-by: "Dan Carpenter" Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner Signed

[PATCH 7/8] drbd: Improve asender performance

2014-08-25 Thread Philipp Reisner
From: Lars Ellenberg Shorten receive path in the asender thread. Reduces CPU utilisation of asender when receiving packets, and with that increases IOPs. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c | 6 ++ drivers/block/drbd

[PATCH 8/8] drbd: reduce lock contention in drbd_worker

2014-08-25 Thread Philipp Reisner
From: Lars Ellenberg The worker may now dequeue work items in batches. This should reduce lock contention during busy periods. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_worker.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions

[PATCH 3/8] drbd: Remove superfluous newline from "resync_extents" debugfs entry.

2014-08-25 Thread Philipp Reisner
From: Philipp Marek See "drbd/resources/*/volumes/*/resync_extents". Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/

[PATCH 2/8] drbd: Use consistent names for all the bi_end_io callbacks

2014-08-25 Thread Philipp Reisner
From: Andreas Gruenbacher Now they follow the _endio naming sheme. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 4 ++-- drivers/block/drbd/drbd_bitmap.c | 6 +++--- drivers/block/drbd/drbd_int.h| 2 +- drivers/block/drbd

[PATCH 1/7] drbd: Minor cleanups

2014-10-29 Thread Philipp Reisner
From: Andreas Gruenbacher . Update comments . drbd_set_{in,out_of}_sync(): Remove unused parameters . Move common code into adm_del_resource() . Redefine ERR_MINOR_EXISTS -> ERR_MINOR_OR_VOLUME_EXISTS Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/d

[PATCH 4/7] drbd: fix resync throttling initialization

2014-10-29 Thread Philipp Reisner
end event counters, and drops the rs_last_events == 0 from the throttle condition. Reported-by: Mikhail Sugakov Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c | 2 +- drivers/block/drbd/drbd_state.c| 1 - drivers/block/drbd/drbd_worker.c

[PATCH 7/7] drbd: Remove an useless copy of kernel_setsockopt()

2014-10-29 Thread Philipp Reisner
Old backward-compat cruft Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 29 - 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index

[PATCH 0/7] RFC DRBD updates for 3.19

2014-10-29 Thread Philipp Reisner
Lars Ellenberg (2): drbd: fix resync throttling initialization drbd: merge_bvec_fn: properly remap bvm->bi_bdev Philipp Reisner (3): drbd: fix race between role change and handshake drbd: Fix state change in case of connection timeout drbd: Remove an useless copy of kernel_setsock

[PATCH 3/7] drbd: fix race between role change and handshake

2014-10-29 Thread Philipp Reisner
In order to avoid deadlocks give up the state_mutex while waiting for the transient state to go away. Conflicts: drbd/drbd_state.c drbd/drbd_state.h drbd/drbd_wrappers.h Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl

[PATCH 2/7] drbd: Only use drbd_msg_put_info() in drbd_nl.c

2014-10-29 Thread Philipp Reisner
From: Andreas Gruenbacher Avoid generic netlink calls in other parts of the code base. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 1 - drivers/block/drbd/drbd_main.c | 17 +++-- drivers/block/drbd/drbd_nl.c | 2 +- 3

[PATCH 5/7] drbd: merge_bvec_fn: properly remap bvm->bi_bdev

2014-10-29 Thread Philipp Reisner
From: Lars Ellenberg This was not noticed for many years. Affects operation if md raid is used a backing device for DRBD. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/drbd

[PATCH 6/7] drbd: Fix state change in case of connection timeout

2014-10-29 Thread Philipp Reisner
ollow up failures. E.g. "BUG: scheduling while atomic" Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c inde

[PATCH 00/19] RFC DRBD updates for the 4.3 merge window (part II)

2015-08-04 Thread Philipp Reisner
g walk in protocol A drbd: separate out __al_write_transaction helper function drbd: avoid potential deadlock during handshake drbd: fix error path during resize Oleg Drokin (1): drbd: fix memory leak in drbd_adm_resize Philipp Reisner (3): drbd: Rename asender to ack_receiver drbd

[PATCH 19/19] MAINTAINERS: Updated information for DRBD DRIVER

2015-08-04 Thread Philipp Reisner
-git a/MAINTAINERS b/MAINTAINERS index 9289ecb..d5ce1c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3472,13 +3472,12 @@ F: drivers/scsi/dpt* F: drivers/scsi/dpt/ DRBD DRIVER -P: Philipp Reisner -P: Lars Ellenberg -M: drbd-...@lists.linbit.com -L: drbd-u...@lists.linbit.com +M:

[PATCH 17/19] drbd: avoid potential deadlock during handshake

2015-08-04 Thread Philipp Reisner
ome standard activity log transactions. Using lc_try_lock_for_transaction() instead of lc_try_lock() does not care about pending activity log references, avoiding the potential deadlock. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 19 +++--

[PATCH 16/19] drbd: separate out __al_write_transaction helper function

2015-08-04 Thread Philipp Reisner
, move the definition, so we can drop the forward declaration of a static helper. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 304 --- 1 file changed, 156 insertions(+), 148 deletions(-) diff --git a/drivers/

[PATCH 15/19] drbd: make suspend_io() / resume_io() must be thread and recursion safe

2015-08-04 Thread Philipp Reisner
Avoid to prematurely resume application IO: don't set/clear a single bit, but inc/dec an atomic counter. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 4 ++-- drivers/block/drbd/drbd_nl.c| 8 +--- drivers/block/drbd/drbd_state.

[PATCH 18/19] drbd: fix error path during resize

2015-08-04 Thread Philipp Reisner
ta related offsets/sizes, and on error restore them all. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 68 +--- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c

[PATCH 14/19] drbd: fix "endless" transfer log walk in protocol A

2015-08-04 Thread Philipp Reisner
or with a huge bandwidth-delay product. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 03d5b09..c0ec559 100644 ---

[PATCH 13/19] drbd: fix memory leak in drbd_adm_resize

2015-08-04 Thread Philipp Reisner
From: Oleg Drokin new_disk_conf could be leaked if the follow on checks fail, so make sure to free it on error if it was not assigned yet. Found with smatch. Signed-off-by: Oleg Drokin Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 2 ++ 1

[PATCH 10/19] drbd: make drbd known to lsblk: use bd_link_disk_holder

2015-08-04 Thread Philipp Reisner
recedences for us to use it as well. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h| 2 +- drivers/block/drbd/drbd_main.c | 16 +- drivers/block/drbd/drbd_nl.c | 121 --- drivers/block/drbd

[PATCH 12/19] drbd: don't block forever in disconnect during resync if fencing=r-a-stonith

2015-08-04 Thread Philipp Reisner
writeout in this case does not care for concurrent application IO, so there is no point waiting for it. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd

[PATCH 11/19] lru_cache: Converted lc_seq_printf_status to return void

2015-08-04 Thread Philipp Reisner
From: Roland Kammerer Fix the semantic of lc_seq_printf. Currently, it always returns 0 and the return value is unused, therefore, convert the return type to void. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- include/linux/lru_cache.h | 2 +- lib/lru_cache.c | 4

[PATCH 09/19] drbd: fix queue limit setup for discard

2015-08-04 Thread Philipp Reisner
usion with e.g. lsblk -D. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 66e8acd..9f60a68 1

[PATCH 03/19] drbd: prevent NULL pointer deref when resuming diskless primary

2015-08-04 Thread Philipp Reisner
et without first being demoted (deconfigured). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index

[PATCH 08/19] drbd: fix spurious alert level printk

2015-08-04 Thread Philipp Reisner
e the range estimate returned by drbd_md_last_sector() was still wrong. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 30c

[PATCH 06/19] drbd: avoid redefinition of BITS_PER_PAGE

2015-08-04 Thread Philipp Reisner
From: Lars Ellenberg Apparently we now implicitly get definitions for BITS_PER_PAGE and BITS_PER_PAGE_MASK from the pid_namespace.h Instead of renaming our defines, I chose to define only if not yet defined, but to double check the value if already defined. Signed-off-by: Philipp Reisner

[PATCH 07/19] drbd: use bitmap_weight() helper, don't open code

2015-08-04 Thread Philipp Reisner
From: Lars Ellenberg Suggested by Akinobu Mita Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_bitmap.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd

[PATCH 05/19] drbd: use resource name in workqueue

2015-08-04 Thread Philipp Reisner
From: Lars Ellenberg Since kernel 3.3, we can use snprintf-style arguments to create a workqueue. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 4 ++-- drivers/block/drbd/drbd_receiver.c | 5 - 2 files changed, 6 insertions(+), 3

[PATCH 01/19] drbd: Rename asender to ack_receiver

2015-08-04 Thread Philipp Reisner
This prepares the next patch where the sending on the meta (or control) socket is moved to a dedicated workqueue. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 6 +++--- drivers/block/drbd/drbd_main.c | 10 +- drivers/block

[PATCH 02/19] drbd: Create a dedicated workqueue for sending acks on the control connection

2015-08-04 Thread Philipp Reisner
. One exception in that is sending back ping_acks. These stay in the ack-receiver thread. Otherwise the logic becomes too complicated for no added value. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 27 ++--- drivers/block/drbd/drbd_main.c

[PATCH 04/19] drbd: debugfs: expose ed_data_gen_id

2015-08-04 Thread Philipp Reisner
From: Lars Ellenberg The effective data generation ID may be interesting for debugging purposes of scenarios involving diskless states. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_debugfs.c | 10 ++ drivers/block/drbd/drbd_int.h | 1

[PATCH 09/19] drbd: Deletion of an unnecessary check before the function call "lc_destroy"

2015-07-30 Thread Philipp Reisner
: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 6ed3876..727e63e 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block

[PATCH 04/19] drbd: Move enum write_ordering_e to drbd.h

2015-07-30 Thread Philipp Reisner
From: Andreas Gruenbacher Also change the enum values to all-capital letters. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 6 -- drivers/block/drbd/drbd_main.c | 2 +- drivers/block/drbd/drbd_nl.c | 4 ++-- drivers

[PATCH 10/19] drbd: Replace 0 with the more meaningful GFP_NOWAIT

2015-07-30 Thread Philipp Reisner
GFP_NOWAIT has a value of 0. I.e. functionality not changed. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd

[PATCH 14/19] drbd: also bump UUIDs if a diskless primary connects

2015-07-30 Thread Philipp Reisner
and is able to communicate this in time. Otherwise, a later re-attach of the disk on the primary may start a resync in the "wrong" direction. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_state.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 00/19] RFC DRBD updates for the 4.3 merge window

2015-07-30 Thread Philipp Reisner
delayed_completion_of_aborted_request() drbd: improve network timeout detection drbd: fix NULL deref in remember_new_state drbd: fix refcount error during detach of an already failed disk Markus Elfring (1): drbd: Deletion of an unnecessary check before the function call "lc_d

[PATCH 16/19] drbd: drbd_panic_after_delayed_completion_of_aborted_request()

2015-07-30 Thread Philipp Reisner
have been recycled for other purposes meanwhile, this will cause unexpected random memory changes. To prevent corruption, we rather panic in that case. Make it obvious from stack traces that this was the case by introducing drbd_panic_after_delayed_completion_of_aborted_request(). Signed-off-b

[PATCH 06/19] drbd: Fix locking across all resources

2015-07-30 Thread Philipp Reisner
prevent changes of that resource. (Previously, a read lock on the global state lock was needed as well.) Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h| 18 ++--- drivers/block/drbd/drbd_main.c | 24 +++- drivers/block/drbd

[PATCH 08/19] drbd: Backport the "status" command

2015-07-30 Thread Philipp Reisner
information is exposed through /proc/drbd. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 566 +-- include/linux/drbd_genl.h| 35 +++ include/linux/idr.h | 14 ++ 3 files changed, 536 insertions

[PATCH 11/19] drbd: Fix spurious disk-timeout

2015-07-30 Thread Philipp Reisner
timer looks at a new request with timestamp still zero (before it even was submitted), and 0 + timeout is most likely older than "now". Better assign the timestamp right when we put the request object on said ring list. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --

[PATCH 18/19] drbd: fix NULL deref in remember_new_state

2015-07-30 Thread Philipp Reisner
fine, there will be no change then. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_state.c | 46 + 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/

[PATCH 01/19] drbd: Remove pointless check

2015-07-30 Thread Philipp Reisner
In drbd-8.4 there is always a single connection per resource, and there is always exactly one peer_device for a device. peer_device can not be NULL here. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 03/19] drbd: Get rid of some first_peer_device() calls

2015-07-30 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index c097909

[PATCH 15/19] drbd: add comment why we want to first call local-io-error, then send state

2015-07-30 Thread Philipp Reisner
crash", without bumping the data generation UUIDs on the peer in between, it makes it easier to deal with. If you intend to return from the local-io-error handler, then better return as quickly as possible to avoid triggering other timeouts. Signed-off-by: Philipp Reisner Signed-off-by: Lars

[PATCH 19/19] drbd: fix refcount error during detach of an already failed disk

2015-07-30 Thread Philipp Reisner
sive local disk still pending. In that case, drbd_md_get_buffer() will return NULL. Don't unconditionally call drbd_md_put_buffer(), or it will cause refcount imbalance, and prevent any further re-attach on this volume (until it is deleted and re-created). Signed-off-by: Philipp Reisner Sign

[PATCH 05/19] drbd: drbd_adm_attach(): Add missing drbd_resync_after_changed()

2015-07-30 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index e1d5453

[PATCH 07/19] drbd: Backport the "events2" command

2015-07-30 Thread Philipp Reisner
user-base for a later switch to the complete drbd9 code base. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 45 +++ drivers/block/drbd/drbd_nl.c | 625 - drivers/block/drbd/drbd_receiver.c

[PATCH 12/19] drbd: drop remnants of connector -- we don't use it anymore in drbd 8.4

2015-07-30 Thread Philipp Reisner
From: Lars Ellenberg Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- include/linux/drbd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/drbd.h b/include/linux/drbd.h index 2c44d7e..392fc0e 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h

[PATCH 02/19] drbd: De-inline drbd_should_do_remote() and drbd_should_send_out_of_sync()

2015-07-30 Thread Philipp Reisner
From: Andreas Gruenbacher There is no need to have these two as inline functions. In addition, drbd_should_send_out_of_sync() is only used in a single place, anyway. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 18

[PATCH 13/19] drbd: drbdsetup detach of an unresponsive local disk should not block IO "forever"

2015-07-30 Thread Philipp Reisner
ble to continue IO to and from a healthy peer. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 2178fb7..7229d8e 10

[PATCH 17/19] drbd: improve network timeout detection

2015-07-30 Thread Philipp Reisner
From: Lars Ellenberg Don't blame the peer for being unresponsive, if we did not even ask the question yet. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h| 2 + drivers/block/drbd/drbd_req.c

Re: [Drbd-dev] [PATCH 00/21] drbd: clean-up patchset

2015-12-01 Thread Philipp Reisner
Hi Fabian, I will take these patches and send them towards upstream in the next round. (Probably squashing them into a smaller number of patches while doing so) Best regards, Phil Am Freitag, 27. November 2015, 22:26:05 schrieb Fabian Frederick: > This small patchset does some code clean-up in

[PATCH 30/38] drbd: make drbd known to lsblk: use bd_link_disk_holder

2015-11-25 Thread Philipp Reisner
recedences for us to use it as well. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h| 2 +- drivers/block/drbd/drbd_main.c | 16 +- drivers/block/drbd/drbd_nl.c | 121 --- drivers/block/drbd

[PATCH 15/38] drbd: also bump UUIDs if a diskless primary connects

2015-11-25 Thread Philipp Reisner
and is able to communicate this in time. Otherwise, a later re-attach of the disk on the primary may start a resync in the "wrong" direction. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_state.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 33/38] drbd: fix memory leak in drbd_adm_resize

2015-11-25 Thread Philipp Reisner
From: Oleg Drokin new_disk_conf could be leaked if the follow on checks fail, so make sure to free it on error if it was not assigned yet. Found with smatch. Signed-off-by: Oleg Drokin Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 2 ++ 1

[PATCH 17/38] drbd: drbd_panic_after_delayed_completion_of_aborted_request()

2015-11-25 Thread Philipp Reisner
have been recycled for other purposes meanwhile, this will cause unexpected random memory changes. To prevent corruption, we rather panic in that case. Make it obvious from stack traces that this was the case by introducing drbd_panic_after_delayed_completion_of_aborted_request(). Signed-off-b

[PATCH 10/38] drbd: Deletion of an unnecessary check before the function call "lc_destroy"

2015-11-25 Thread Philipp Reisner
: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 1eb10e2..b87fb31 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block

[PATCH 02/38] drbd: Remove pointless check

2015-11-25 Thread Philipp Reisner
In drbd-8.4 there is always a single connection per resource, and there is always exactly one peer_device for a device. peer_device can not be NULL here. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 25/38] drbd: use resource name in workqueue

2015-11-25 Thread Philipp Reisner
From: Lars Ellenberg Since kernel 3.3, we can use snprintf-style arguments to create a workqueue. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 4 ++-- drivers/block/drbd/drbd_receiver.c | 5 - 2 files changed, 6 insertions(+), 3

[PATCH 36/38] drbd: separate out __al_write_transaction helper function

2015-11-25 Thread Philipp Reisner
, move the definition, so we can drop the forward declaration of a static helper. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 304 --- 1 file changed, 156 insertions(+), 148 deletions(-) diff --git a/drivers/

[PATCH 34/38] drbd: fix "endless" transfer log walk in protocol A

2015-11-25 Thread Philipp Reisner
or with a huge bandwidth-delay product. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 7907fb5..2255dcf 100644 ---

[PATCH 26/38] drbd: avoid redefinition of BITS_PER_PAGE

2015-11-25 Thread Philipp Reisner
From: Lars Ellenberg Apparently we now implicitly get definitions for BITS_PER_PAGE and BITS_PER_PAGE_MASK from the pid_namespace.h Instead of renaming our defines, I chose to define only if not yet defined, but to double check the value if already defined. Signed-off-by: Philipp Reisner

[PATCH 11/38] drbd: Replace 0 with the more meaningful GFP_NOWAIT

2015-11-25 Thread Philipp Reisner
GFP_NOWAIT has a value of 0. I.e. functionality not changed. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd

[PATCH 04/38] drbd: Get rid of some first_peer_device() calls

2015-11-25 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index b4b5680

<    1   2   3   4   5   >