<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/block/drbd/drbd_state.c, branch linux-4.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-11-25T16:22:03Z</updated>
<entry>
<title>drbd: make suspend_io() / resume_io() must be thread and recursion safe</title>
<updated>2015-11-25T16:22:03Z</updated>
<author>
<name>Philipp Reisner</name>
</author>
<published>2013-02-28T09:30:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dbb4386b90a13a7b0cab12aae184e5e04c536c3'/>
<id>urn:sha1:7dbb4386b90a13a7b0cab12aae184e5e04c536c3</id>
<content type='text'>
Avoid to prematurely resume application IO: don't set/clear a single
bit, but inc/dec an atomic counter.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: fix NULL deref in remember_new_state</title>
<updated>2015-11-25T16:22:01Z</updated>
<author>
<name>Lars Ellenberg</name>
</author>
<published>2015-02-25T12:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b479766ee79a821f3cd7fad92fbcf2ff16cacb3'/>
<id>urn:sha1:2b479766ee79a821f3cd7fad92fbcf2ff16cacb3</id>
<content type='text'>
The recent (not yet released) backport of the extended state broadcasts
to support the "events2" subcommand of drbdsetup had some glitches.

remember_old_state() would first count all connections with a
net_conf != NULL, then allocate a suitable array, then populate that
array with all connections found to have net_conf != NULL.

This races with the state change to C_STANDALONE,
and the NULL assignment there.

remember_new_state() then iterates over said connection array,
assuming that it would be fully populated.

But rcu_lock() just makes sure the thing some pointer points to,
if any, won't go away. It does not make the pointer itself immutable.

In fact there is no need to "filter" connections based on whether or not
they have a currently valid configuration.  Just record them always, if
they don't have a config, that's fine, there will be no change then.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: add comment why we want to first call local-io-error, then send state</title>
<updated>2015-11-25T16:22:01Z</updated>
<author>
<name>Lars Ellenberg</name>
</author>
<published>2015-02-19T12:43:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc99562a48f39db4be0f9195137ec6f5350baf19'/>
<id>urn:sha1:dc99562a48f39db4be0f9195137ec6f5350baf19</id>
<content type='text'>
Even though we really want to get the state information about our bad
disk to the peer as soon as possible, it is useful to first call the
local-io-error handler.

People may chose to hard-reset the box from there.
If that looks and behaves exactly like a "regular node 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 &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: also bump UUIDs if a diskless primary connects</title>
<updated>2015-11-25T16:22:01Z</updated>
<author>
<name>Lars Ellenberg</name>
</author>
<published>2015-02-19T13:01:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bd2eb2c98239c465a51571b5c2a465a2ff7d70b'/>
<id>urn:sha1:9bd2eb2c98239c465a51571b5c2a465a2ff7d70b</id>
<content type='text'>
If for some reason the primary lost its disk *and* the replication link
before it is able to communicate the disk loss, probably blocked IO,
then later is able to re-establish the connection, the peer needs to
bump its UUIDs just like it does when peer only loses the disk
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 &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: Backport the "events2" command</title>
<updated>2015-11-25T16:22:00Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2014-07-31T15:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a29728463b254ce81ecefdf20c1a02e01d9361da'/>
<id>urn:sha1:a29728463b254ce81ecefdf20c1a02e01d9361da</id>
<content type='text'>
The events2 command originates from drbd-9 development. It features
more information but requires a incompatible change in output
format.
Therefore the previous events command continues to exist, the new
improved events2 command becomes available now.

This prepares the user-base for a later switch to the complete
drbd9 code base.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: Fix locking across all resources</title>
<updated>2015-11-25T16:22:00Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2014-08-14T16:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28bc3b8c71cda033a4c013131c635d1148889824'/>
<id>urn:sha1:28bc3b8c71cda033a4c013131c635d1148889824</id>
<content type='text'>
Instead of using a rwlock for synchronizing state changes across
resources, take the request locks of all resources for global state
changes.  Use resources_mutex to serialize global state changes.

This means that taking the request lock of a resource is now enough to
prevent changes of that resource.  (Previously, a read lock on the
global state lock was needed as well.)

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: fix resync throttling initialization</title>
<updated>2014-11-10T16:27:37Z</updated>
<author>
<name>Lars Ellenberg</name>
</author>
<published>2014-11-10T16:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff8bd88b73fad369a12465dfa52ad5c0bf088ced'/>
<id>urn:sha1:ff8bd88b73fad369a12465dfa52ad5c0bf088ced</id>
<content type='text'>
If for some reason DRBD resync was the only activity on a backend
device, drbd_rs_c_min_rate_throttle() would mistakenly decide that it is
still initialization time, and keep throttling the resync.

This patch explicitly initializes -&gt;rs_last_events to the current
backend event counters, and drops the rs_last_events == 0 from the
throttle condition.

Reported-by: Mikhail Sugakov &lt;msugakov@amazon.de&gt;

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: fix race between role change and handshake</title>
<updated>2014-11-10T16:27:35Z</updated>
<author>
<name>Philipp Reisner</name>
</author>
<published>2014-11-10T16:21:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a88215312c5ed74697973f6c9f0fce718bcf18ad'/>
<id>urn:sha1:a88215312c5ed74697973f6c9f0fce718bcf18ad</id>
<content type='text'>
Symptoms:
If DRBD was "cleanly shut down" (all in sync, both Secondary before
disconnect, identical data generation uuids), and then one side was
promoted *during* the next connection handshake, the role change
could confuse the handshake.

The Primary would get stuck in WFBitmapS, the Secondary would log
unexpected cstate (Connected) in receive_bitmap
and get stuck in WFBitmapT.

Fix:
The test in is_valid_soft_transition wrong. It works because
the not allowed actions (promote/attach) do not touch the
cstate. The previous condition failed to demand a cstate change
in one clause.

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 &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: Use better variable names</title>
<updated>2014-09-11T14:41:29Z</updated>
<author>
<name>Andreas Gruenbacher</name>
</author>
<published>2014-09-11T12:29:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=11f8b2b69d32d43a6d9b45c60c1fee48ab91f440'/>
<id>urn:sha1:11f8b2b69d32d43a6d9b45c60c1fee48ab91f440</id>
<content type='text'>
Rename local variable 'ds' to 'disk_state' or 'data_size'.
'dgs' to 'digest_size'

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>drbd: clear CRASHED_PRIMARY only after successful resync</title>
<updated>2014-07-10T16:35:05Z</updated>
<author>
<name>Lars Ellenberg</name>
</author>
<published>2014-03-27T09:34:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f2abeae3cd139fb3581249388bf2018612a87e5'/>
<id>urn:sha1:2f2abeae3cd139fb3581249388bf2018612a87e5</id>
<content type='text'>
If we lost a disk during the first resync after primary crash,
we could have prematurely cleared the CRASHED_PRIMARY flag.
Testing on C_CONNECTED is not what we meant there,
but testing for both peers to become D_UP_TO_DATE.

Signed-off-by: Philipp Reisner &lt;philipp.reisner@linbit.com&gt;
Signed-off-by: Lars Ellenberg &lt;lars.ellenberg@linbit.com&gt;
</content>
</entry>
</feed>
