mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 10/12] drbd: Rename drbd_pp_first_pages_or_try_alloc() to __drbd_alloc_pages()
Date: Thu, 29 Sep 2011 10:15:29 +0200	[thread overview]
Message-ID: <1317284131-17464-11-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1317284131-17464-1-git-send-email-philipp.reisner@linbit.com>

From: Andreas Gruenbacher <agruen@linbit.com>

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
 drivers/block/drbd/drbd_receiver.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 3003d9e..0e4e651 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -150,11 +150,12 @@ static void page_chain_add(struct page **head,
 	*head = chain_first;
 }
 
-static struct page *drbd_pp_first_pages_or_try_alloc(struct drbd_conf *mdev, int number)
+static struct page *__drbd_alloc_pages(struct drbd_conf *mdev,
+				       unsigned int number)
 {
 	struct page *page = NULL;
 	struct page *tmp = NULL;
-	int i = 0;
+	unsigned int i = 0;
 
 	/* Yes, testing drbd_pp_vacant outside the lock is racy.
 	 * So what. It saves a spin_lock. */
@@ -247,7 +248,7 @@ static struct page *drbd_pp_alloc(struct drbd_conf *mdev, unsigned number, bool
 	/* Yes, we may run up to @number over max_buffers. If we
 	 * follow it strictly, the admin will get it wrong anyways. */
 	if (atomic_read(&mdev->pp_in_use) < mdev->tconn->net_conf->max_buffers)
-		page = drbd_pp_first_pages_or_try_alloc(mdev, number);
+		page = __drbd_alloc_pages(mdev, number);
 
 	while (page == NULL) {
 		prepare_to_wait(&drbd_pp_wait, &wait, TASK_INTERRUPTIBLE);
@@ -255,7 +256,7 @@ static struct page *drbd_pp_alloc(struct drbd_conf *mdev, unsigned number, bool
 		drbd_kick_lo_and_reclaim_net(mdev);
 
 		if (atomic_read(&mdev->pp_in_use) < mdev->tconn->net_conf->max_buffers) {
-			page = drbd_pp_first_pages_or_try_alloc(mdev, number);
+			page = __drbd_alloc_pages(mdev, number);
 			if (page)
 				break;
 		}
-- 
1.7.4.1


  parent reply	other threads:[~2011-09-29  8:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29  8:15 [RFC 00/12] drbd: part 11 of adding multiple volume support to drbd Philipp Reisner
2011-09-29  8:15 ` [PATCH 01/12] drbd: validate_req_change_req_state(): Return 0 upon success and an error code otherwise Philipp Reisner
2011-09-29  8:15 ` [PATCH 02/12] drbd: Make all asynchronous command handlers return " Philipp Reisner
2011-09-29  8:15 ` [PATCH 03/12] drbd: drbd_init_ee() no longer exists Philipp Reisner
2011-09-29  8:15 ` [PATCH 04/12] drbd: Rename drbd_alloc_ee() to drbd_alloc_peer_req() Philipp Reisner
2011-09-29  8:15 ` [PATCH 05/12] drbd: Rename drbd_free_ee() and variants to *_peer_req() Philipp Reisner
2011-09-29  8:15 ` [PATCH 06/12] drbd: Rename drbd_release_ee() to drbd_free_peer_reqs() Philipp Reisner
2011-09-29  8:15 ` [PATCH 07/12] drbd: Rename reclaim_net_ee(), drbd_process_done_ee(), drbd_process_done_ee(), tconn_process_done_ee() to *_peer_reqs Philipp Reisner
2011-09-29  8:15 ` [PATCH 08/12] drbd: Rename drbd_{ ee -> peer_req }_has_active_page Philipp Reisner
2011-09-29  8:15 ` [PATCH 09/12] drbd: Make drbd_wait_ee_list_empty() and _drbd_wait_ee_list_empty() static Philipp Reisner
2011-09-29  8:15 ` Philipp Reisner [this message]
2011-09-29  8:15 ` [PATCH 11/12] drbd: Rename drbd_pp_alloc() to drbd_alloc_pages() and make it non-static Philipp Reisner
2011-09-29  8:15 ` [PATCH 12/12] drbd: Rename drbd_pp_free() to drbd_free_pages() Philipp Reisner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317284131-17464-11-git-send-email-philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=axboe@kernel.dk \
    --cc=drbd-dev@lists.linbit.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®