linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Remove orphan declarations for drbd
@ 2022-09-20  1:52 Gaosheng Cui
  2022-09-20  1:52 ` [PATCH 1/2] drbd: remove orphan _req_may_be_done() declaration Gaosheng Cui
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gaosheng Cui @ 2022-09-20  1:52 UTC (permalink / raw)
  To: philipp.reisner, lars.ellenberg, christoph.boehmwalder, axboe,
	cuigaosheng1
  Cc: drbd-dev, linux-block

This series contains a few cleanup patches, to remove a orphan
declaration which has been removed and some useless comments. Thanks!

Gaosheng Cui (2):
  drbd: remove orphan _req_may_be_done() declaration
  block/drbd: remove useless comments in receive_DataReply()

 drivers/block/drbd/drbd_receiver.c | 3 ---
 drivers/block/drbd/drbd_req.h      | 2 --
 2 files changed, 5 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] drbd: remove orphan _req_may_be_done() declaration
  2022-09-20  1:52 [PATCH 0/2] Remove orphan declarations for drbd Gaosheng Cui
@ 2022-09-20  1:52 ` Gaosheng Cui
  2022-09-20  1:52 ` [PATCH 2/2] block/drbd: remove useless comments in receive_DataReply() Gaosheng Cui
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Gaosheng Cui @ 2022-09-20  1:52 UTC (permalink / raw)
  To: philipp.reisner, lars.ellenberg, christoph.boehmwalder, axboe,
	cuigaosheng1
  Cc: drbd-dev, linux-block

The _req_may_be_done() has been removed by
commit 6870ca6d463e ("drbd: factor out master_bio completion
and drbd_request destruction paths"), so remove the orphan
declaration.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/block/drbd/drbd_req.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/block/drbd/drbd_req.h b/drivers/block/drbd/drbd_req.h
index 511f39a08de4..6237fa1dcb0e 100644
--- a/drivers/block/drbd/drbd_req.h
+++ b/drivers/block/drbd/drbd_req.h
@@ -266,8 +266,6 @@ struct bio_and_error {
 
 extern void start_new_tl_epoch(struct drbd_connection *connection);
 extern void drbd_req_destroy(struct kref *kref);
-extern void _req_may_be_done(struct drbd_request *req,
-		struct bio_and_error *m);
 extern int __req_mod(struct drbd_request *req, enum drbd_req_event what,
 		struct bio_and_error *m);
 extern void complete_master_bio(struct drbd_device *device,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] block/drbd: remove useless comments in receive_DataReply()
  2022-09-20  1:52 [PATCH 0/2] Remove orphan declarations for drbd Gaosheng Cui
  2022-09-20  1:52 ` [PATCH 1/2] drbd: remove orphan _req_may_be_done() declaration Gaosheng Cui
@ 2022-09-20  1:52 ` Gaosheng Cui
  2022-09-21 10:33 ` [PATCH 0/2] Remove orphan declarations for drbd Christoph Böhmwalder
  2022-09-22  1:45 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Gaosheng Cui @ 2022-09-20  1:52 UTC (permalink / raw)
  To: philipp.reisner, lars.ellenberg, christoph.boehmwalder, axboe,
	cuigaosheng1
  Cc: drbd-dev, linux-block

All implementations of req->collision, _req_may_be_done and
drbd_fail_pending_reads have been removed, so remove the comments
in receive_DataReply() that provide no useful information.

Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/block/drbd/drbd_receiver.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index af4c7d65490b..c897c4572036 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -2113,9 +2113,6 @@ static int receive_DataReply(struct drbd_connection *connection, struct packet_i
 	if (unlikely(!req))
 		return -EIO;
 
-	/* hlist_del(&req->collision) is done in _req_may_be_done, to avoid
-	 * special casing it there for the various failure cases.
-	 * still no race with drbd_fail_pending_reads */
 	err = recv_dless_read(peer_device, req, sector, pi->size);
 	if (!err)
 		req_mod(req, DATA_RECEIVED);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Remove orphan declarations for drbd
  2022-09-20  1:52 [PATCH 0/2] Remove orphan declarations for drbd Gaosheng Cui
  2022-09-20  1:52 ` [PATCH 1/2] drbd: remove orphan _req_may_be_done() declaration Gaosheng Cui
  2022-09-20  1:52 ` [PATCH 2/2] block/drbd: remove useless comments in receive_DataReply() Gaosheng Cui
@ 2022-09-21 10:33 ` Christoph Böhmwalder
  2022-09-22  1:45 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Böhmwalder @ 2022-09-21 10:33 UTC (permalink / raw)
  To: Gaosheng Cui
  Cc: drbd-dev, linux-block, philipp.reisner, lars.ellenberg, axboe

Am 20.09.22 um 03:52 schrieb Gaosheng Cui:
> This series contains a few cleanup patches, to remove a orphan
> declaration which has been removed and some useless comments. Thanks!
> 
> Gaosheng Cui (2):
>   drbd: remove orphan _req_may_be_done() declaration
>   block/drbd: remove useless comments in receive_DataReply()
> 
>  drivers/block/drbd/drbd_receiver.c | 3 ---
>  drivers/block/drbd/drbd_req.h      | 2 --
>  2 files changed, 5 deletions(-)
> 

Both patches look good to me, thanks.

Acked-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>

PS: I think trivial fixes like this are important, but they also create
additional maintenance burden. So if you have more of these in the
future, maybe save them up and submit them all at once (maybe even in a
single patch if they are related). Thanks!

-- 
Christoph Böhmwalder
LINBIT | Keeping the Digital World Running
DRBD HA —  Disaster Recovery — Software defined Storage

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Remove orphan declarations for drbd
  2022-09-20  1:52 [PATCH 0/2] Remove orphan declarations for drbd Gaosheng Cui
                   ` (2 preceding siblings ...)
  2022-09-21 10:33 ` [PATCH 0/2] Remove orphan declarations for drbd Christoph Böhmwalder
@ 2022-09-22  1:45 ` Jens Axboe
  3 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-09-22  1:45 UTC (permalink / raw)
  To: lars.ellenberg, christoph.boehmwalder, Gaosheng Cui, philipp.reisner
  Cc: linux-block, drbd-dev

On Tue, 20 Sep 2022 09:52:14 +0800, Gaosheng Cui wrote:
> This series contains a few cleanup patches, to remove a orphan
> declaration which has been removed and some useless comments. Thanks!
> 
> Gaosheng Cui (2):
>   drbd: remove orphan _req_may_be_done() declaration
>   block/drbd: remove useless comments in receive_DataReply()
> 
> [...]

Applied, thanks!

[1/2] drbd: remove orphan _req_may_be_done() declaration
      commit: a437df5f8bbc6b52231bbeaef8b4052698c9007a
[2/2] block/drbd: remove useless comments in receive_DataReply()
      commit: 7f0c1afeacfcb4c32173b5a120ec0a362b79bd71

Best regards,
-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-22  1:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  1:52 [PATCH 0/2] Remove orphan declarations for drbd Gaosheng Cui
2022-09-20  1:52 ` [PATCH 1/2] drbd: remove orphan _req_may_be_done() declaration Gaosheng Cui
2022-09-20  1:52 ` [PATCH 2/2] block/drbd: remove useless comments in receive_DataReply() Gaosheng Cui
2022-09-21 10:33 ` [PATCH 0/2] Remove orphan declarations for drbd Christoph Böhmwalder
2022-09-22  1:45 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).