All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 12/27] nbd: Rename NbdClientSession to NBDClientSession
Date: Mon, 31 Oct 2016 15:37:28 +0100	[thread overview]
Message-ID: <1477924663-30950-13-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1477924663-30950-1-git-send-email-pbonzini@redhat.com>

From: Eric Blake <eblake@redhat.com>

It's better to use consistent capitalization of the namespace
used for NBD functions; we have more instances of NBD* than
Nbd*.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-5-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/nbd-client.c | 26 +++++++++++++-------------
 block/nbd-client.h |  6 +++---
 block/nbd.c        |  4 ++--
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/block/nbd-client.c b/block/nbd-client.c
index 8ca5030..e6fe603 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -33,7 +33,7 @@
 #define HANDLE_TO_INDEX(bs, handle) ((handle) ^ ((uint64_t)(intptr_t)bs))
 #define INDEX_TO_HANDLE(bs, index)  ((index)  ^ ((uint64_t)(intptr_t)bs))
 
-static void nbd_recv_coroutines_enter_all(NbdClientSession *s)
+static void nbd_recv_coroutines_enter_all(NBDClientSession *s)
 {
     int i;
 
@@ -46,7 +46,7 @@ static void nbd_recv_coroutines_enter_all(NbdClientSession *s)
 
 static void nbd_teardown_connection(BlockDriverState *bs)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
 
     if (!client->ioc) { /* Already closed */
         return;
@@ -68,7 +68,7 @@ static void nbd_teardown_connection(BlockDriverState *bs)
 static void nbd_reply_ready(void *opaque)
 {
     BlockDriverState *bs = opaque;
-    NbdClientSession *s = nbd_get_client_session(bs);
+    NBDClientSession *s = nbd_get_client_session(bs);
     uint64_t i;
     int ret;
 
@@ -119,7 +119,7 @@ static int nbd_co_send_request(BlockDriverState *bs,
                                struct nbd_request *request,
                                QEMUIOVector *qiov)
 {
-    NbdClientSession *s = nbd_get_client_session(bs);
+    NBDClientSession *s = nbd_get_client_session(bs);
     AioContext *aio_context;
     int rc, ret, i;
 
@@ -167,7 +167,7 @@ static int nbd_co_send_request(BlockDriverState *bs,
     return rc;
 }
 
-static void nbd_co_receive_reply(NbdClientSession *s,
+static void nbd_co_receive_reply(NBDClientSession *s,
                                  struct nbd_request *request,
                                  struct nbd_reply *reply,
                                  QEMUIOVector *qiov)
@@ -195,7 +195,7 @@ static void nbd_co_receive_reply(NbdClientSession *s,
     }
 }
 
-static void nbd_coroutine_start(NbdClientSession *s,
+static void nbd_coroutine_start(NBDClientSession *s,
    struct nbd_request *request)
 {
     /* Poor man semaphore.  The free_sema is locked when no other request
@@ -209,7 +209,7 @@ static void nbd_coroutine_start(NbdClientSession *s,
     /* s->recv_coroutine[i] is set as soon as we get the send_lock.  */
 }
 
-static void nbd_coroutine_end(NbdClientSession *s,
+static void nbd_coroutine_end(NBDClientSession *s,
     struct nbd_request *request)
 {
     int i = HANDLE_TO_INDEX(s, request->handle);
@@ -222,7 +222,7 @@ static void nbd_coroutine_end(NbdClientSession *s,
 int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset,
                          uint64_t bytes, QEMUIOVector *qiov, int flags)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     struct nbd_request request = {
         .type = NBD_CMD_READ,
         .from = offset,
@@ -248,7 +248,7 @@ int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset,
 int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
                           uint64_t bytes, QEMUIOVector *qiov, int flags)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     struct nbd_request request = {
         .type = NBD_CMD_WRITE,
         .from = offset,
@@ -277,7 +277,7 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset,
 
 int nbd_client_co_flush(BlockDriverState *bs)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     struct nbd_request request = { .type = NBD_CMD_FLUSH };
     struct nbd_reply reply;
     ssize_t ret;
@@ -302,7 +302,7 @@ int nbd_client_co_flush(BlockDriverState *bs)
 
 int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     struct nbd_request request = {
         .type = NBD_CMD_TRIM,
         .from = offset,
@@ -343,7 +343,7 @@ void nbd_client_attach_aio_context(BlockDriverState *bs,
 
 void nbd_client_close(BlockDriverState *bs)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     struct nbd_request request = { .type = NBD_CMD_DISC };
 
     if (client->ioc == NULL) {
@@ -362,7 +362,7 @@ int nbd_client_init(BlockDriverState *bs,
                     const char *hostname,
                     Error **errp)
 {
-    NbdClientSession *client = nbd_get_client_session(bs);
+    NBDClientSession *client = nbd_get_client_session(bs);
     int ret;
 
     /* NBD handshake */
diff --git a/block/nbd-client.h b/block/nbd-client.h
index 307b8b1..d86dd22 100644
--- a/block/nbd-client.h
+++ b/block/nbd-client.h
@@ -17,7 +17,7 @@
 
 #define MAX_NBD_REQUESTS    16
 
-typedef struct NbdClientSession {
+typedef struct NBDClientSession {
     QIOChannelSocket *sioc; /* The master data channel */
     QIOChannel *ioc; /* The current I/O channel which may differ (eg TLS) */
     uint16_t nbdflags;
@@ -32,9 +32,9 @@ typedef struct NbdClientSession {
     struct nbd_reply reply;
 
     bool is_unix;
-} NbdClientSession;
+} NBDClientSession;
 
-NbdClientSession *nbd_get_client_session(BlockDriverState *bs);
+NBDClientSession *nbd_get_client_session(BlockDriverState *bs);
 
 int nbd_client_init(BlockDriverState *bs,
                     QIOChannelSocket *sock,
diff --git a/block/nbd.c b/block/nbd.c
index 6e837f8..b281484 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -44,7 +44,7 @@
 #define EN_OPTSTR ":exportname="
 
 typedef struct BDRVNBDState {
-    NbdClientSession client;
+    NBDClientSession client;
 
     /* For nbd_refresh_filename() */
     SocketAddress *saddr;
@@ -294,7 +294,7 @@ done:
     return saddr;
 }
 
-NbdClientSession *nbd_get_client_session(BlockDriverState *bs)
+NBDClientSession *nbd_get_client_session(BlockDriverState *bs)
 {
     BDRVNBDState *s = bs->opaque;
     return &s->client;
-- 
2.7.4

  parent reply	other threads:[~2016-10-31 14:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 14:37 [Qemu-devel] [PULL 00/27] Misc patches for 2016-10-31 Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 01/27] checkpatch: tweak "struct should normally be const" warning Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 02/27] nbd: Use CoQueue for free_sema instead of CoMutex Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 03/27] qemu-error: remove dependency of stubs on monitor Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 04/27] tests: send error_report to test log Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 05/27] exec.c: ensure all AddressSpaceDispatch updates under RCU Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 06/27] exec.c: do not truncate non-empty memory backend file Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 07/27] exec.c: check memory backend file size with 'size' option Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 08/27] hostmem-file: make option 'size' optional Paolo Bonzini
2016-10-31 18:20   ` Eduardo Habkost
2016-10-31 19:47     ` Paolo Bonzini
2016-10-31 22:22       ` Eduardo Habkost
2016-11-01  9:32         ` Haozhong Zhang
2016-11-01 14:16           ` Eduardo Habkost
2016-11-02  1:27             ` Haozhong Zhang
2016-10-31 14:37 ` [Qemu-devel] [PULL 09/27] nbd: Add qemu-nbd -D for human-readable description Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 10/27] nbd: Treat flags vs. command type as separate fields Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 11/27] nbd: Rename NBDRequest to NBDRequestData Paolo Bonzini
2016-10-31 14:37 ` Paolo Bonzini [this message]
2016-10-31 14:37 ` [Qemu-devel] [PULL 13/27] nbd: Rename struct nbd_request and nbd_reply Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 14/27] nbd: Share common reply-sending code in server Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 15/27] nbd: Send message along with server NBD_REP_ERR errors Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 16/27] nbd: Share common option-sending code in client Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 17/27] nbd: Let server know when client gives up negotiation Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 18/27] nbd: Let client skip portions of server reply Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 19/27] nbd: Less allocation during NBD_OPT_LIST Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 20/27] nbd: Support shorter handshake Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 21/27] nbd: Refactor conversion to errno to silence checkpatch Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 22/27] nbd: Improve server handling of shutdown requests Paolo Bonzini
2016-10-31 18:05   ` Eric Blake
2016-10-31 14:37 ` [Qemu-devel] [PULL 23/27] nbd: Implement NBD_CMD_WRITE_ZEROES on server Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 24/27] nbd: Implement NBD_CMD_WRITE_ZEROES on client Paolo Bonzini
2016-11-15 22:59   ` Eric Blake
2016-10-31 14:37 ` [Qemu-devel] [PULL 25/27] qemu-char: do not forward events through the mux until QEMU has started Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 26/27] slirp: fix CharDriver breakage Paolo Bonzini
2016-10-31 14:37 ` [Qemu-devel] [PULL 27/27] x86: add AVX512_4VNNIW and AVX512_4FMAPS features Paolo Bonzini
2016-10-31 16:21 ` [Qemu-devel] [PULL 00/27] Misc patches for 2016-10-31 Peter Maydell
2016-10-31 17:18   ` Alex Bennée
2016-10-31 17:20     ` Peter Maydell
2016-10-31 17:57       ` Paolo Bonzini

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=1477924663-30950-13-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.