All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhu Lingshan <lszhu@suse.com>
To: target-devel@vger.kernel.org
Subject: [PATCH 02/33] TCMU PR: add tcmu_dev_pr_info to store PR buffer
Date: Fri, 15 Jun 2018 18:23:11 +0000	[thread overview]
Message-ID: <20180615182342.6239-2-lszhu@suse.com> (raw)

This patch added a struct tcmu_dev_pr_info, which can help
store the string buffer we got from a TCMU device record (for
example, for RBD devices, the records should be stored in
their metadata). So that we can decode / encode them.

Signed-off-by: Zhu Lingshan <lszhu@suse.com>
---
 drivers/target/target_core_user.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 1dea66a851dd..1efc2800ca14 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -110,6 +110,14 @@ struct tcmu_nl_cmd {
 	int status;
 };
 
+/* This struct help to store the string buffer which contain
+ * Persistent Reservation info record from the device metadata.
+ */
+struct tcmu_dev_pr_info {
+	struct mutex pr_info_lock;
+	char *pr_info_buf;
+	};
+
 struct tcmu_dev {
 	struct list_head node;
 	struct kref kref;
@@ -165,6 +173,7 @@ struct tcmu_dev {
 	char dev_config[TCMU_CONFIG_LEN];
 
 	int nl_reply_supported;
+	struct tcmu_dev_pr_info pr_info;
 };
 
 #define TCMU_DEV(_se_dev) container_of(_se_dev, struct tcmu_dev, se_dev)
-- 
2.17.1


                 reply	other threads:[~2018-06-15 18:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20180615182342.6239-2-lszhu@suse.com \
    --to=lszhu@suse.com \
    --cc=target-devel@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 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.