2022-11-22 14:43:01 +01:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tree-wide: Assorted spelling fixes
In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-02-03 08:01:28 +08:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2010-10-27 14:33:00 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2013-03-27 14:08:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-01 12:33:51 +02:00
|
|
|
|
2011-02-22 02:15:32 +01:00
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2014-04-28 18:43:24 +02:00
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-04-28 18:43:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-25 15:37:43 +01:00
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-27 15:07:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-14 00:26:31 +02:00
|
|
|
|
|
|
|
|
|
drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire")
And also re-enable partial-zero-out + discard aligned.
With the introduction of REQ_OP_WRITE_ZEROES,
we started to use that for both WRITE_ZEROES and DISCARDS,
hoping that WRITE_ZEROES would "do what we want",
UNMAP if possible, zero-out the rest.
The example scenario is some LVM "thin" backend.
While an un-allocated block on dm-thin reads as zeroes, on a dm-thin
with "skip_block_zeroing=true", after a partial block write allocated
that block, that same block may well map "undefined old garbage" from
the backends on LBAs that have not yet been written to.
If we cannot distinguish between zero-out and discard on the receiving
side, to avoid "undefined old garbage" to pop up randomly at later times
on supposedly zero-initialized blocks, we'd need to map all discards to
zero-out on the receiving side. But that would potentially do a full
alloc on thinly provisioned backends, even when the expectation was to
unmap/trim/discard/de-allocate.
We need to distinguish on the protocol level, whether we need to guarantee
zeroes (and thus use zero-out, potentially doing the mentioned full-alloc),
or if we want to put the emphasis on discard, and only do a "best effort
zeroing" (by "discarding" blocks aligned to discard-granularity, and zeroing
only potential unaligned head and tail clippings to at least *try* to
avoid "false positives" in an online-verify later), hoping that someone
set skip_block_zeroing=false.
For some discussion regarding this on dm-devel, see also
https://www.mail-archive.com/dm-devel%40redhat.com/msg07965.html
https://www.redhat.com/archives/dm-devel/2018-January/msg00271.html
For backward compatibility, P_TRIM means zero-out, unless the
DRBD_FF_WZEROES feature flag is agreed upon during handshake.
To have upper layers even try to submit WRITE ZEROES requests,
we need to announce "efficient zeroout" independently.
We need to fixup max_write_zeroes_sectors after blk_queue_stack_limits():
if we can handle "zeroes" efficiently on the protocol,
we want to do that, even if our backend does not announce
max_write_zeroes_sectors itself.
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-20 17:23:42 +01:00
|
|
|
|
2010-08-31 12:00:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-22 02:15:32 +01:00
|
|
|
|
drbd: introduce drbd_recv_header_maybe_unplug
Recently, drbd_recv_header() was changed to potentially
implicitly "unplug" the backend device(s), in case there
is currently nothing to receive.
Be more explicit about it: re-introduce the original drbd_recv_header(),
and introduce a new drbd_recv_header_maybe_unplug() for use by the
receiver "main loop".
Using explicit plugging via blk_start_plug(); blk_finish_plug();
really helps the io-scheduler of the backend with merging requests.
Wrap the receiver "main loop" with such a plug.
Also catch unplug events on the Primary,
and try to propagate.
This is performance relevant. Without this, if the receiving side does
not merge requests, number of IOPS on the peer can me significantly
higher than IOPS on the Primary, and can easily become the bottleneck.
Together, both changes should help to reduce the number of IOPS
as seen on the backend of the receiving side, by increasing
the chance of merging mergable requests, without trading latency
for more throughput.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-08-29 10:20:32 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-02-22 02:15:32 +01:00
|
|
|
|
|
|
|
|
|
2011-04-13 16:24:47 -07:00
|
|
|
|
2012-01-24 17:19:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-04-13 16:24:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-24 17:19:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-05 15:38:59 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-27 15:07:43 +02:00
|
|
|
|
2016-06-14 00:26:31 +02:00
|
|
|
|
|
|
|
|
|
drbd: introduce P_ZEROES (REQ_OP_WRITE_ZEROES on the "wire")
And also re-enable partial-zero-out + discard aligned.
With the introduction of REQ_OP_WRITE_ZEROES,
we started to use that for both WRITE_ZEROES and DISCARDS,
hoping that WRITE_ZEROES would "do what we want",
UNMAP if possible, zero-out the rest.
The example scenario is some LVM "thin" backend.
While an un-allocated block on dm-thin reads as zeroes, on a dm-thin
with "skip_block_zeroing=true", after a partial block write allocated
that block, that same block may well map "undefined old garbage" from
the backends on LBAs that have not yet been written to.
If we cannot distinguish between zero-out and discard on the receiving
side, to avoid "undefined old garbage" to pop up randomly at later times
on supposedly zero-initialized blocks, we'd need to map all discards to
zero-out on the receiving side. But that would potentially do a full
alloc on thinly provisioned backends, even when the expectation was to
unmap/trim/discard/de-allocate.
We need to distinguish on the protocol level, whether we need to guarantee
zeroes (and thus use zero-out, potentially doing the mentioned full-alloc),
or if we want to put the emphasis on discard, and only do a "best effort
zeroing" (by "discarding" blocks aligned to discard-granularity, and zeroing
only potential unaligned head and tail clippings to at least *try* to
avoid "false positives" in an online-verify later), hoping that someone
set skip_block_zeroing=false.
For some discussion regarding this on dm-devel, see also
https://www.mail-archive.com/dm-devel%40redhat.com/msg07965.html
https://www.redhat.com/archives/dm-devel/2018-January/msg00271.html
For backward compatibility, P_TRIM means zero-out, unless the
DRBD_FF_WZEROES feature flag is agreed upon during handshake.
To have upper layers even try to submit WRITE ZEROES requests,
we need to announce "efficient zeroout" independently.
We need to fixup max_write_zeroes_sectors after blk_queue_stack_limits():
if we can handle "zeroes" efficiently on the protocol,
we want to do that, even if our backend does not announce
max_write_zeroes_sectors itself.
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-20 17:23:42 +01:00
|
|
|
|
2010-08-31 12:00:50 +02:00
|
|
|
|
drbd: introduce drbd_recv_header_maybe_unplug
Recently, drbd_recv_header() was changed to potentially
implicitly "unplug" the backend device(s), in case there
is currently nothing to receive.
Be more explicit about it: re-introduce the original drbd_recv_header(),
and introduce a new drbd_recv_header_maybe_unplug() for use by the
receiver "main loop".
Using explicit plugging via blk_start_plug(); blk_finish_plug();
really helps the io-scheduler of the backend with merging requests.
Wrap the receiver "main loop" with such a plug.
Also catch unplug events on the Primary,
and try to propagate.
This is performance relevant. Without this, if the receiving side does
not merge requests, number of IOPS on the peer can me significantly
higher than IOPS on the Primary, and can easily become the bottleneck.
Together, both changes should help to reduce the number of IOPS
as seen on the backend of the receiving side, by increasing
the chance of merging mergable requests, without trading latency
for more throughput.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-08-29 10:20:32 +02:00
|
|
|
|
2011-02-22 02:15:32 +01:00
|
|
|
|
2012-01-24 17:19:42 +01:00
|
|
|
|
2011-04-13 16:24:47 -07:00
|
|
|
|
|
|
|
|
|
2012-01-24 17:19:42 +01:00
|
|
|
|
2010-05-27 15:07:43 +02:00
|
|
|
|
2010-05-12 17:08:26 +02:00
|
|
|
|
|
|
|
|
|
2011-07-17 23:06:12 +02:00
|
|
|
|
|
|
|
|
|
2010-05-12 17:08:26 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2013-10-11 15:44:27 -07:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-30 16:32:41 +02:00
|
|
|
|
2012-07-24 10:12:36 +02:00
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
2023-03-30 12:27:43 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-03 13:26:43 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2017-10-17 20:33:01 -07:00
|
|
|
|
2011-05-30 16:32:41 +02:00
|
|
|
|
|
|
|
|
|
2014-02-27 09:46:18 +01:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
drbd: fix potential deadlock during "restart" of conflicting writes
w_restart_write(), run from worker context, calls __drbd_make_request()
and further drbd_al_begin_io(, delegate=true), which then
potentially deadlocks. The previous patch moved a BUG_ON to expose
such call paths, which would now be triggered.
Also, if we call __drbd_make_request() from resource worker context,
like w_restart_write() did, and that should block for whatever reason
(!drbd_state_is_stable(), resource suspended, ...),
we potentially deadlock the whole resource, as the worker
is needed for state changes and other things.
Create a dedicated retry workqueue for this instead.
Also make sure that inc_ap_bio()/dec_ap_bio() are properly paired,
even if do_retry() needs to retry itself,
in case __drbd_make_request() returns != 0.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2011-11-24 10:36:25 +01:00
|
|
|
|
2012-07-17 10:05:04 +02:00
|
|
|
|
drbd: fix potential deadlock during "restart" of conflicting writes
w_restart_write(), run from worker context, calls __drbd_make_request()
and further drbd_al_begin_io(, delegate=true), which then
potentially deadlocks. The previous patch moved a BUG_ON to expose
such call paths, which would now be triggered.
Also, if we call __drbd_make_request() from resource worker context,
like w_restart_write() did, and that should block for whatever reason
(!drbd_state_is_stable(), resource suspended, ...),
we potentially deadlock the whole resource, as the worker
is needed for state changes and other things.
Create a dedicated retry workqueue for this instead.
Also make sure that inc_ap_bio()/dec_ap_bio() are properly paired,
even if do_retry() needs to retry itself,
in case __drbd_make_request() returns != 0.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2011-11-24 10:36:25 +01:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2023-03-30 12:27:43 +02:00
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-28 15:27:51 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2023-03-30 12:27:43 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-07-03 13:26:43 +02:00
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2010-10-26 16:02:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
2023-03-30 12:27:43 +02:00
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2010-10-26 16:02:27 +02:00
|
|
|
|
2011-07-28 15:27:51 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
|
|
|
|
|
2011-07-07 14:19:42 +02:00
|
|
|
|
2023-03-30 12:27:43 +02:00
|
|
|
|
2011-07-07 14:19:42 +02:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
|
|
|
|
|
2011-07-03 13:26:43 +02:00
|
|
|
|
2010-06-09 14:07:43 +02:00
|
|
|
|
|
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|
2011-01-17 20:27:30 +01:00
|
|
|
|
2014-08-08 17:48:00 +02:00
|
|
|
|
2011-01-17 20:27:30 +01:00
|
|
|
|
2009-09-25 16:07:19 -07:00
|
|
|
|