[PATCH 04/18] drbd: use the cached meta_dev_idx

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Now we have the cached meta_dev_idx member, we can get rid of a few rcu_read_lock() sections and rcu_dereference(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 32 +--- drivers/block/drbd

[PATCH 00/18] RFC: Non blocking submit for activity log misses

2013-03-19 Thread Philipp Reisner
The Issues Since the beginning DRBD was written with the assumption that the write pattern has spacial locality. (This assumption was driven from the fact, that rotating media performs better if you do not send the head too far too often) Backed by this assumption a caller that submits a request

[PATCH 03/18] drbd: prepare for new striped layout of activity log

2013-03-19 Thread Philipp Reisner
without a detach/attach cycle. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c |6 +-- drivers/block/drbd/drbd_int.h| 46 ++- drivers/block/drbd/drbd_main.c | 77 ++ drivers/block

[PATCH 17/18] drbd: try hard to max out the updates per AL transaction

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg There may have been more incoming requests while we where preparing the current transaction. Try to consolidate more updates into this transaction until we make no more progres. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd

[PATCH 18/18] drbd: adjust upper limit for activity log extents

2013-03-19 Thread Philipp Reisner
hich means that if you use the maximum, you'd have to resync more than 250 GiB after an unclean Primary shutdown. With capable backend storage and replication links, this is entirely feasible. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/d

[PATCH 16/18] drbd: move start io accounting before activity log transaction

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg The IO accounting of the drbd "queue depth" was misleading. We only started IO accounting once we already wrote the activity log. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c |6 +++--- 1 file changed, 3

[PATCH 14/18] lru_cache: introduce lc_get_cumulative()

2013-03-19 Thread Philipp Reisner
as already marked %LC_DIRTY. Caller needs to make sure that the pending transaction is completed, before proceeding to actually use this element. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- include/linux/lru_cache.h |1 + lib/lru_cache.c

[PATCH 13/18] drbd: queue writes on submitter thread, unless they pass the activity log fastpath

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 4af709e..43bc1d0

[PATCH 15/18] drbd: consolidate as many updates as possible into one AL transaction

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Depending on current IO depth, try to consolidate as many updates as possible into one activity log transaction. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 49 ++ drivers/block/drbd

[PATCH 11/18] drbd: split drbd_al_begin_io into fastpath, prepare, and commit

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 104 ++ drivers/block/drbd/drbd_int.h|1 + 2 files changed, 72 insertions(+), 33 deletions(-) diff --git a/drivers/block/drbd

[PATCH 12/18] drbd: split out some helper functions to drbd_al_begin_io

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg To make the code easier to follow, use an explicit find_active_resync_extent(), and add a "nonblock" parameter to _al_get(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 49 ++-

[PATCH 09/18] drbd: split __drbd_make_request in before and after drbd_al_begin_io

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg This is in preparation to be able to defer requests that need to wait for an activity log transaction to a submitter workqueue. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 40

[PATCH 10/18] drbd: prepare to queue write requests on a submit worker

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h | 13 + drivers/block/drbd/drbd_main.c | 25 - drivers/block/drbd/drbd_nl.c |1 + drivers/block/drbd/drbd_req.c | 29

[PATCH 07/18] drbd: Clarify when activity log I/O is delegated to the worker thread

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 49 drivers/block/drbd/drbd_int.h |2 +- drivers/block/drbd/drbd_receiver.c |2 +- drivers/block/drbd/drbd_req.c

[PATCH 08/18] drbd: drbd_al_being_io: short circuit to reduce latency

2013-03-19 Thread Philipp Reisner
lizing the innocent. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 82199d9..1d7244d 10

[PATCH 06/18] drbd: read meta data early, base on-disk offsets on super block

2013-03-19 Thread Philipp Reisner
log and bitmap offsets on the stored offsets/al stripe settings. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 11 +++- drivers/block/drbd/drbd_main.c | 131 +++--- drivers/block/drbd/drbd_nl.c | 15

[PATCH 05/18] drbd: mechanically rename la_size to la_size_sect

2013-03-19 Thread Philipp Reisner
From: Lars Ellenberg Make it obvious that this value is in units of 512 Byte sectors. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c |6 +++--- drivers/block/drbd/drbd_nl.c | 16 drivers/block/drbd

[PATCH 02/18] drbd: cleanup ondisk meta data layout calculations and defines

2013-03-19 Thread Philipp Reisner
isk to 4kB, and initialize to zero not only the first 512 Byte, but all of it in drbd_md_sync(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_actlog.c | 28 ++--- drivers/block/drbd/drbd_bitmap.c | 13 +- drivers/block/drbd/drbd_in

[PATCH 01/18] drbd: cleanup bogus assert message

2013-03-19 Thread Philipp Reisner
and that checks already for D_FAILED, drop that assert, and fold in the drbd_queue_work(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h |7 --- drivers/block/drbd/drbd_main.c |7 --- 2 files changed, 4 insertions(+), 10 del

[GIT PULL] drbd build fix in case CONFIG_CRYPTO_HMAC is not set

2013-02-04 Thread Philipp Reisner
78aa7987a223e8542f2735dace439690c6171ac5: drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set (2013-02-04 18:14:03 +0100) Philipp Reisner (1): drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set drivers/block/drbd

Re: [GIT PULL] drbd build fix in case CONFIG_CRYPTO_HMAC is not set

2013-02-05 Thread Philipp Reisner
RYPTO_HMAC is not set (2013-02-05 15:58:34 +0100) -------- Philipp Reisner (1): drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set drivers/block/drbd/drbd_receiver.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[GIT PULL] drbd activity log improvements for the 3.9 merge window

2013-01-30 Thread Philipp Reisner
g transaction drbd: try hard to max out the updates per AL transaction drbd: adjust upper limit for activity log extents Philipp Reisner (7): drbd: reset ap_in_flight counter for new connections drbd: abort start of resync early, if it raced with connection breakage

[GIT PULL] drbd: Fix flushes without data on a diskless primary node

2013-01-30 Thread Philipp Reisner
Hi Jens, Please consider to forward this fix for 3.8 to Linus. The following changes since commit 949db153b6466c6f7cad5a427ecea94985927311: Linux 3.8-rc5 (2013-01-25 11:57:28 -0800) are available in the git repository at: git://git.drbd.org/linux-drbd.git for-jens-3.8-fix for you to fetch

FLUSH/FUA documentation & code discrepancy

2012-09-04 Thread Philipp Reisner
Hi, I think commit 1e87901e18 was wrong. Starting with that commit the REQ_FLUSH and REQ_FUA bits get stripped away if the queue does not advertise REQ_FLUSH or REQ_FUA support. But the REQ_FLUSH bit is also tested for when not merging requests (blk_queue_bio()) or when it comes to the elevator

Re: [Drbd-dev] FLUSH/FUA documentation & code discrepancy

2012-09-05 Thread Philipp Reisner
> Currently, FLUSH/FUA doesn't enforce any ordering requirement. File > systems are responsible for draining all writes which have to happen > before and not issue further writes which should come after. Ok. That is a clear statement. So we will do it that way. The "Currently" in you statement,

[GIT PULL] drbd-8.3 updates

2012-10-02 Thread Philipp Reisner
isk, unless force-detached drbd: prepare for more than 32 bit flags drbd: always write bitmap on detach drbd: log request sector offset and size for IO errors Philipp Reisner (6): drbd: Add a drbd directory to sysfs drbd: expose the data generation identifiers via sy

Re: [GIT PULL] drbd-8.3 updates

2012-10-03 Thread Philipp Reisner
> Not pulled. Two reasons: > > - It's late (in the merge window) > - and it's not based off my for-3.7/drivers branch, hence I get a ton of > unrelated changes with a pull into that branch. Hi Jens, I can rebase it for you in a few hours. Would influence this your decission? Best, Phil -- To

Re: [GIT PULL] drbd-8.3 updates

2012-10-03 Thread Philipp Reisner
data IO completion even with failed disk, unless force-detached drbd: prepare for more than 32 bit flags drbd: always write bitmap on detach drbd: log request sector offset and size for IO errors Philipp Reisner (6): drbd: Add a drbd directory to sysfs drbd: expo

Re: [GIT PULL] drbd-8.3 updates

2012-10-03 Thread Philipp Reisner
> Thanks, one question before this is pulled in: > > Philipp Reisner (6): > > drbd: Add a drbd directory to sysfs > > drbd: expose the data generation identifiers via sysfs > > What are these? It's sitting in /sys/block//drbd/, I don't see any >

Re: [GIT PULL] 4 fixes for drbd

2012-11-05 Thread Philipp Reisner
> > Can you rebase this against for-3.8/drivers? Thanks. Hi Jens, One of these changes fixes a regression that was introduced in the last merge window. Please consider to pull this single commit. (I will rebase the other 3 commit on for-3.8/drivers) The following changes since commit a13c29ddf

Re: [GIT PULL] 4 fixes for drbd

2012-11-05 Thread Philipp Reisner
Am Montag, 5. November 2012, 15:43:28 schrieb Jens Axboe: > On 2012-11-05 15:35, Philipp Reisner wrote: > >> Can you rebase this against for-3.8/drivers? Thanks. > > > > Hi Jens, > > > > One of these changes fixes a regression that was introduced in the last

[GIT PULL] 4 fixes for drbd

2012-10-29 Thread Philipp Reisner
ng Wang (1): drbd: check return of kmalloc in receive_uuids Lars Ellenberg (2): drbd: fix regression: potential NULL pointer dereference drbd: don't try to clear bits once the disk has failed Philipp Reisner (1): drbd: Broadcast sync progress no more often than

Re: [Drbd-dev] [PATCH] drbd: use list_move_tail instead of list_del/list_add_tail

2012-09-05 Thread Philipp Reisner
Thanks, applied. Best regards, Phil > From: Wei Yongjun > > Using list_move_tail() instead of list_del() + list_add_tail(). > > spatch with a semantic match is used to found this problem. > (http://coccinelle.lip6.fr/) > > Signed-off-by: Wei Yongjun > --- > drivers/block/drbd/drbd_worker.c

[GIT PULL] drbd Kconfig update and minor fixes

2012-12-06 Thread Philipp Reisner
rs setting also when changed online via disk-options drbd: update Kconfig to match current dependencies Philipp Reisner (3): drbd: Remove obsolete check drbd: close race between drbd_set_role and drbd_connect drbd: Fix drbdsetup wait-connect, wait-sync etc... commands dri

[GIT PULL] drbd-8.4.2 for the linux-3.8 merge window

2012-11-09 Thread Philipp Reisner
drbd: simplify condition in drbd_may_do_local_read() [...] Philipp Marek (1): drbd: pass some more information to userspace. Philipp Reisner (234): idr: idr_for_each_entry() macro [...] drivers/block/drbd/Makefile|2 + drivers/block/drbd/drbd_actlog.c | 689

Re: [GIT PULL] drbd-8.4.2 for the linux-3.8 merge window

2012-11-09 Thread Philipp Reisner
[...] > > It has the sysfs bits in again. The reason for that is that we want to > > expose more information by that, and remove the /proc/drbd with the > > next evolutionary step. -- In case this is a show stopper, let me > > remove the sysfs bits. > > The exact same sysfs bits I complained about

Re: [GIT PULL] drbd-8.4.2 for the linux-3.8 merge window

2012-11-09 Thread Philipp Reisner
completion even with failed disk, unless force-detached drbd: always write bitmap on detach drbd: log request sector offset and size for IO errors drbd: if the replication link breaks during handshake, keep retrying Philipp Marek (1): drbd: pass some more information to users

Re: [GIT PULL] drbd-8.4.2 for the linux-3.8 merge window

2012-11-09 Thread Philipp Reisner
Am Freitag, 9. November 2012, 15:50:24 schrieb Jens Axboe: > On 2012-11-09 15:18, Jens Axboe wrote: > > On 2012-11-09 14:33, Philipp Reisner wrote: > >> Jens, here it is without the sysfs stuff > > > > Thanks, pulled into for-3.8/drivers > > I didn't say

[PATCH 5/6] drbd: Constants should be UPPERCASE

2013-06-14 Thread Philipp Reisner
Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |7 ++- drivers/block/drbd/drbd_nl.c | 20 ++-- drivers/block/drbd/drbd_receiver.c |6 +++--- 3 files changed, 19 insertions(+), 14 deletions(-) diff

[PATCH 4/6] drbd: Ignore the exit code of a fence-peer handler if it returns too late

2013-06-14 Thread Philipp Reisner
In case the connection was established and lost again before the a fence-peer handler returns, ignore the exit code of this instance. (And use the exit code of the later started instance) Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h

[PATCH 3/6] drbd: Fix rcu_read_lock balance on error path

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

[PATCH 2/6] drbd: fix error return code in drbd_init()

2013-06-14 Thread Philipp Reisner
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Lars Ellenberg Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd

[PATCH 6/6] drbd: Allow online change of al-stripes and al-stripe-size

2013-06-14 Thread Philipp Reisner
). Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_actlog.c | 21 ++ drivers/block/drbd/drbd_int.h |7 +- drivers/block/drbd/drbd_main.c | 57 --- drivers/block/drbd/drbd_nl.c | 137

[PATCH 0/6] RFC: DRBD fixes and one functional enhancemet

2013-06-14 Thread Philipp Reisner
The first 4 patches are obvious fixes. The last patch adds the capability to change the activity log layout online. (al-stripes and al-stripe-size) Andreas Gruenbacher (2): drbd: Do not sleep inside rcu drbd: Fix rcu_read_lock balance on error path Philipp Reisner (3): drbd: Ignore the

[PATCH 1/6] drbd: Do not sleep inside rcu

2013-06-14 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 4222aff

[PATCH 2/6] drbd: fix error return code in drbd_init()

2013-06-25 Thread Philipp Reisner
From: Wei Yongjun Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: Lars Ellenberg Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd

[PATCH 1/6] drbd: Do not sleep inside rcu

2013-06-25 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher --- 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 4222aff..adee58e 100644 --- a/drivers/blo

[PATCH 0/6] DRBD fixes and one functional enhancemet

2013-06-25 Thread Philipp Reisner
Gruenbacher (2): drbd: Do not sleep inside rcu drbd: Fix rcu_read_lock balance on error path Philipp Reisner (3): drbd: Ignore the exit code of a fence-peer handler if it returns too late drbd: Constants should be UPPERCASE drbd: Allow online change of al-stripes and al-stripe-size Wei

[PATCH 3/6] drbd: Fix rcu_read_lock balance on error path

2013-06-25 Thread Philipp Reisner
From: Andreas Gruenbacher Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_nl.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 9e3f441

[PATCH 6/6] drbd: Allow online change of al-stripes and al-stripe-size

2013-06-25 Thread Philipp Reisner
). Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_actlog.c | 21 ++ drivers/block/drbd/drbd_int.h |7 +- drivers/block/drbd/drbd_main.c | 57 --- drivers/block/drbd/drbd_nl.c | 137

[PATCH 5/6] drbd: Constants should be UPPERCASE

2013-06-25 Thread Philipp Reisner
Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h |7 ++- drivers/block/drbd/drbd_nl.c | 20 ++-- drivers/block/drbd/drbd_receiver.c |6 +++--- 3 files changed, 19 insertions(+), 14 deletions(-) diff

[PATCH 4/6] drbd: Ignore the exit code of a fence-peer handler if it returns too late

2013-06-25 Thread Philipp Reisner
In case the connection was established and lost again before the a fence-peer handler returns, ignore the exit code of this instance. (And use the exit code of the later started instance) Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_int.h

[PATCH 5/5] drbd: avoid to shrink max_bio_size due to peer re-configuration

2013-07-31 Thread Philipp Reisner
o allow it a bit earlier during the handshake. Also consider max_hw_sectors in our merge bvec function, just in case. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c |4 ++-- drivers/block/drbd/drbd_req.c |3 +++ 2 files changed, 5 insertio

[PATCH 1/5] drbd: fix NULL pointer deref in module init error path

2013-07-31 Thread Philipp Reisner
From: Lars Ellenberg If we want to iterate over the (as of yet still empty) list in the cleanup path, we need to initialize the list before the first goto fail. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c | 19 +-- 1 file

[PATCH 2/5] drbd: Fix an connection drop issue after enabling allow-two-primaries

2013-07-31 Thread Philipp Reisner
always tracking the sequence number, but only waiting for it if allow-two-primaries is set. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c | 39 +++- 1 file changed, 16 insertions(+), 23 deletions(-) diff

[PATCH 3/5] drbd: Fix adding of new minors with freshly created meta data

2013-07-31 Thread Philipp Reisner
wrongly got into the code path for resyncing new storage that was added while the disk was detached. Fixed that by making the GREW from ZERO a special case. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_int.h |3 ++- drivers/block/drbd/drbd_nl.c |2

[PATCH 4/5] drbd: fix decoding of bitmap vli rle for device sizes > 64 TB

2013-07-31 Thread Philipp Reisner
ult of which is "undefined" :( (only "sometimes" the result is the desired 0) Fix: don't do any bit shift magic for shift == 64, just assign. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c |6 +- 1 file chang

[PATCH 0/5] RFC: DRBD Fixes

2013-07-31 Thread Philipp Reisner
Ellenberg (3): drbd: fix NULL pointer deref in module init error path drbd: fix decoding of bitmap vli rle for device sizes > 64 TB drbd: avoid to shrink max_bio_size due to peer re-configuration Philipp Reisner (2): drbd: Fix an connection drop issue after enabling allow-two-primar

Re: [PATCH] drbd: add module_put() on error path in drbd_proc_open()

2013-03-04 Thread Philipp Reisner
Hi Alexey, Thanks a lot! I have put it into our tree. http://git.drbd.org/gitweb.cgi?p=drbd-8.4.git I intend to get it into the 3.10 merge window. Best, Phil > If single_open() fails in drbd_proc_open(), module refcount is left > incremented. The patch adds module_put() on the error path. > >

Re: [ 052/153] idr: idr_for_each_entry() macro

2013-03-04 Thread Philipp Reisner
Sure, here it is: -- From: Philipp Reisner commit 9749f30f1a387070e6e8351f35aeb829eacc3ab6 upstream. Inspired by the list_for_each_entry() macro Signed-off-by: Ben Hutchings Signed-off-by: Philipp Reisner --- include/linux/idr.h | 11 +++ 1 file changed, 11 insertions

Re: drbd: kernels 3.7 => 3.8 broken userspace compatibility

2013-05-06 Thread Philipp Reisner
Am Montag, 6. Mai 2013, 09:59:08 schrieb Chris Boot: > Hi all, > > I upgraded from a 3.7.x kernel to a 3.8.x kernel on a test machine > running DRBD, and found myself unable to bring up my DRBD devices. I'm > using the 8.3.13 userspace tools as shipped in Debian Wheezy, which work > fine on the 3.

Re: [PATCH 3.9-stable] drbd: fix memory leak

2013-05-10 Thread Philipp Reisner
for each attach/detach cycle we leaked 336 bytes. > > Signed-off-by: Philipp Reisner > Signed-off-by: Lars Ellenberg > Signed-off-by: Jens Axboe > Signed-off-by: Jonghwan Choi > --- > drivers/block/drbd/drbd_main.c |1 + > 1 file changed, 1 insertion(+) &g

Re: [PATCH 3.9-stable] drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set

2013-05-10 Thread Philipp Reisner
Yes, please. > This patch looks like it should be in the 3.9-stable tree, should we apply > it? > > -- > > From: "Philipp Reisner " > > commit ef57f9e6bb9278720c8a5278728f252ab85d7ac6 upstream > > Signed-off-by: Philipp Reisner > Sig

Re: [PATCH 3.9-stable ]drbd: fix for deadlock when using automatic split-brain-recovery

2013-05-10 Thread Philipp Reisner
Yes, please. > This patch looks like it should be in the 3.9-stable tree, should we apply > it? > > -- > > From: "Philipp Reisner " > > commit 7c689e63a847316c1b2500f86891b0a574ce7e69 upstream > > With an automatic after split-brain reco

[PATCH 16/17] drbd: use sched_setscheduler()

2013-03-27 Thread Philipp Reisner
It was unnoticed for some time that assigning to current->policy is no longer sufficient to set a real time priority for a kernel thread. Reported-by: Charlie Suffin Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c |6 -- incl

[PATCH 15/17] drbd: fix for deadlock when using automatic split-brain-recovery

2013-03-27 Thread Philipp Reisner
very when both nodes are" replacing drbd_set_role() with drbd_change_state() in that code-path, but the first hunk of that patch forgets to remove the drbd_set_role(). We apparently only ever tested the "two primaries" case. Signed-off-by: Philipp Reisner Signed-off-by: Lars Elle

[PATCH 02/17] drbd: reset ap_in_flight counter for new connections

2013-03-27 Thread Philipp Reisner
Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_receiver.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 1921871..cd172b4 100644 --- a/drivers/block/drbd

[PATCH 17/17] drbd: fix if(); found by kbuild test robot

2013-03-27 Thread Philipp Reisner
From: Lars Ellenberg Recently introduced al_begin_io_nonblock() was returning -EBUSY, even when it should return -EWOULDBLOCK. Impact: A few spurious wake_up() calls in prepare_al_transaction_nonblock(). Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd

[PATCH 14/17] drbd: add module_put() on error path in drbd_proc_open()

2013-03-27 Thread Philipp Reisner
From: Alexey Khoroshilov If single_open() fails in drbd_proc_open(), module refcount is left incremented. The patch adds module_put() on the error path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Signed-off-by: Philipp Reisner Signed-off

[PATCH 03/17] drbd: abort start of resync early, if it raced with connection breakage

2013-03-27 Thread Philipp Reisner
quest that state change, if we had connection or IO problems. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_worker.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_work

[PATCH 13/17] drbd: fix drbd epoch write count for ahead/behind mode

2013-03-27 Thread Philipp Reisner
an off-by-one in the sanity check, and further to a "Protocol Error". Fix: move the call to maybe_pull_ahead() a few lines up, and assign req->epoch only after that. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 14 +++---

[PATCH 12/17] drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set

2013-03-27 Thread Philipp Reisner
Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- 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 cd172b4..7af0cc7 100644 --- a/drivers

[PATCH 10/17] drbd: fix memory leak

2013-03-27 Thread Philipp Reisner
From: Lars Ellenberg We forgot to free the disk_conf, so for each attach/detach cycle we leaked 336 bytes. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_main.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/drbd/drbd_main.c b

[PATCH 09/17] drbd: only fail empty flushes if no good data is reachable

2013-03-27 Thread Philipp Reisner
-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_req.c | 12 drivers/block/drbd/drbd_req.h |8 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 9f7ff1c

[PATCH 08/17] drbd: Fix disconnect to keep the peer disk state if connection breaks during operation

2013-03-27 Thread Philipp Reisner
a new error code (SS_OUTDATE_WO_CONN). This one should never reach back into user space. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c |7 +-- drivers/block/drbd/drbd_state.c | 14 +++--- drivers/block/drbd/drbd_strings.c

[PATCH 00/17] RFC: Pile of DRBD fixes

2013-03-27 Thread Philipp Reisner
count for ahead/behind mode drbd: fix if(); found by kbuild test robot Philipp Reisner (10): drbd: reset ap_in_flight counter for new connections drbd: abort start of resync early, if it raced with connection breakage drbd: move invalidating the whole bitmap out of after_state ch() drbd

[PATCH 11/17] drbd: validate resync_after dependency on attach already

2013-03-27 Thread Philipp Reisner
allowed and equivalent to no dependency. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c |6 ++ drivers/block/drbd/drbd_worker.c | 15 --- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/block/drbd

[PATCH 06/17] drbd: drop now useless duplicate state request from invalidate

2013-03-27 Thread Philipp Reisner
Patch best viewed with git diff --ignore-space-change. Now that we attempt the fallback to local bitmap operation only when disconnected, we can safely drop the extra "silent" state request from both invalidate and invalidate-remote. Signed-off-by: Philipp Reisner Signed-off-by: Lars

[PATCH 07/17] drbd: fix spurious warning about bitmap being locked from detach

2013-03-27 Thread Philipp Reisner
Introduced in drbd: always write bitmap on detach, the bitmap bulk writeout on detach was indicating it expected exclusive bitmap access. Where I meant to say: expect no more modifications, but testing/counting is still allowed. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg

[PATCH 05/17] drbd: fix effective error returned when refusing an invalidate

2013-03-27 Thread Philipp Reisner
alid_state(), changing that to "Need access to UpToDate data", respectively "Need a connection to start verify or resync". Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_state.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/dri

[PATCH 01/17] idr: document exit conditions on idr_for_each_entry better

2013-03-27 Thread Philipp Reisner
From: George Spelvin And some manual common subexpression elimination which may help the compiler produce smaller code. Signed-off-by: George Spelvin Signed-off-by: Philipp Reisner --- include/linux/idr.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a

[PATCH 04/17] drbd: move invalidating the whole bitmap out of after_state ch()

2013-03-27 Thread Philipp Reisner
stablished replication link, or really be disconnected). Also mention that in the documentation. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_nl.c| 36 drivers/block/drbd/drbd_state.c |7 --- 2 files c

drbd fixes

2012-08-16 Thread Philipp Reisner
compatibility for empty flushes Philipp Reisner (2): drbd: Finish requests that completed while IO was frozen drbd: Write all pages of the bitmap after an online resize drivers/block/drbd/drbd_bitmap.c | 15 ++- drivers/block/drbd/drbd_int.h|1 + drivers/block

drbd-8.3 fixes

2012-07-24 Thread Philipp Reisner
Hi Jens, Please consider to pull these changes for the 3.6 merge window. I did not found a for-3.6/drivers branch, so I based the patches on the 3.5 release. Best, Phil The following changes since commit 28a33cbc24e4256c143dce96c7d93bf423229f92: Linux 3.5 (2012-07-21 13:58:29 -0700) are av

[GIT PULL] drbd regression fix

2013-01-21 Thread Philipp Reisner
Hi Jens, Here is a single fix I want to hand in for Linux-3.8. The following changes since commit d2ec180c23a5a1bfe34d8638b0342a47c00cf70f: drbd: update Kconfig to match current dependencies (2012-12-06 13:08:29 +0100) are available in the git repository at: git://git.drbd.org/linux-drbd f

connector: Bugfix for cn_call_callback()

2007-03-07 Thread Philipp Reisner
e bug. The right thing is the dereference the original __cbq. Therefore the bugfix is to use a new variable for the newly allocated __cbq. This is tested, and it fixes the issue. Signed-off-by: Philipp Reisner <[EMAIL PROTECTED]> Signed-off-by: Lars Ellenberg <[EMAIL PROTECTED]> ---

Re: [PATCH] drbd: mark symbols static where possible

2016-09-02 Thread Philipp Reisner
Hi Baoyou, thanks for the patch. I applied it to our tree. Will be sent to one of the next merge windows... best regards, Phil Am Donnerstag, 1. September 2016, 18:57:53 CEST schrieb Baoyou Xie: > We get a few warnings when building kernel with W=1: > drivers/block/drbd/drbd_receiver.c:1224:6: w

[PATCH] Fix smatch warning

2014-02-19 Thread Philipp Reisner
Hi Jens, After I posted to pull request, we got a report about a smatch warning, which was not CCed to you or the lkml. It is not a bug right now, but a mistake that could easily become a bug as we move forward. Normally I would keep this in my queue until the next batch. Just to be prepared in c

[PATCH] drbd: Fix future possible NULL pointer dereference

2014-02-19 Thread Philipp Reisner
issue was introduced in drbd: get_one_status(): Iterate over resource->devices instead of connection->peer_devices Reported-by: Dan Carpenter Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_nl.c |2 +- 1 file changed, 1 insertion(+), 1 d

[PATCH 2/2] drbd: use RB_DECLARE_CALLBACKS() to define augment callbacks

2014-09-18 Thread Philipp Reisner
From: Lai Jiangshan The original code are the same as RB_DECLARE_CALLBACKS(). CC: Michel Lespinasse Signed-off-by: Lai Jiangshan Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_interval.c | 36 ++-- 1 file

[PATCH 0/2] More for the 3.18 merge window

2014-09-18 Thread Philipp Reisner
Hi Jens, please put these two patches into your for-3.18/drivers branch. They fix the safety code for concurrent overlapping write detection in a DRBD dual primary setup. The first of those two should also go to the stable kernels, I marked it with CC: sta...@kernel.org Lai Jiangshan (2): dr

[PATCH 1/2] drbd: compute the end before rb_insert_augmented()

2014-09-18 Thread Philipp Reisner
ore cancel since the @this node is already in the subtrees in this case. CC: Michel Lespinasse CC: sta...@kernel.org # v3.10+ Signed-off-by: Lai Jiangshan Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- drivers/block/drbd/drbd_interval.c | 4 1 file changed, 4 inserti

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

2014-09-11 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 0/9] DRBD updates for 3.18

2014-09-11 Thread Philipp Reisner
drbd: Get rid of the __no_warn and __cond_lock macros drbd: Get rid of the WORK_PENDING macro Lars Ellenberg (2): drbd: Improve asender performance drbd: reduce lock contention in drbd_worker Philipp Marek (1): drbd: Remove superfluous newline from "resync_extents" debugfs entry

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

2014-09-11 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 2/9] drbd: Use consistent names for all the bi_end_io callbacks

2014-09-11 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 6/9] drbd: Get rid of the WORK_PENDING macro

2014-09-11 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 7/9] drbd: Improve asender performance

2014-09-11 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 9/9] drbd: Add missing newline in resync progress display in /proc/drbd

2014-09-11 Thread Philipp Reisner
Was broken in 2010 with commit 4b0715f096 Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- drivers/block/drbd/drbd_proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c index 06e6147

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

2014-09-11 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

  1   2   3   4   5   >