linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Grover <agrover@redhat.com>
To: target-devel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, hch@lst.de, nab@linux-iscsi.org,
	shli@kernel.org, linux-kernel@vger.kernel.org, rjones@redhat.com
Subject: [PATCH 2/4] uio: Export definition of struct uio_device
Date: Mon, 15 Sep 2014 16:12:28 -0700	[thread overview]
Message-ID: <1410822750-10717-3-git-send-email-agrover@redhat.com> (raw)
In-Reply-To: <1410822750-10717-1-git-send-email-agrover@redhat.com>

In order to prevent a O(n) search of the filesystem to link up its uio
node with its target configuration, TCMU needs to know the minor number
that UIO assigned. Expose the definition of this struct so TCMU can
access this field.

Signed-off-by: Andy Grover <agrover@redhat.com>
---
 drivers/uio/uio.c          | 12 ------------
 include/linux/uio_driver.h | 12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index a673e5b..60fa627 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -28,18 +28,6 @@
 
 #define UIO_MAX_DEVICES		(1U << MINORBITS)
 
-struct uio_device {
-	struct module		*owner;
-	struct device		*dev;
-	int			minor;
-	atomic_t		event;
-	struct fasync_struct	*async_queue;
-	wait_queue_head_t	wait;
-	struct uio_info		*info;
-	struct kobject		*map_dir;
-	struct kobject		*portio_dir;
-};
-
 static int uio_major;
 static struct cdev *uio_cdev;
 static DEFINE_IDR(uio_idr);
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index 1ad4724..baa8171 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -63,7 +63,17 @@ struct uio_port {
 
 #define MAX_UIO_PORT_REGIONS	5
 
-struct uio_device;
+struct uio_device {
+        struct module           *owner;
+        struct device           *dev;
+        int                     minor;
+        atomic_t                event;
+        struct fasync_struct    *async_queue;
+        wait_queue_head_t       wait;
+        struct uio_info         *info;
+        struct kobject          *map_dir;
+        struct kobject          *portio_dir;
+};
 
 /**
  * struct uio_info - UIO device capabilities
-- 
1.9.3


  parent reply	other threads:[~2014-09-15 23:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-15 23:12 [PATCH 0/4] Userspace Passthrough backstore for LIO Andy Grover
2014-09-15 23:12 ` [PATCH 1/4] target: Remove unneeded check in sbc_parse_cdb Andy Grover
2014-09-15 23:12 ` Andy Grover [this message]
2014-09-15 23:12 ` [PATCH 3/4] target: Add documentation on the target userspace pass-through driver Andy Grover
2014-09-15 23:12 ` [PATCH 4/4] target: Add a user-passthrough backstore Andy Grover
2014-09-19 21:14   ` Nicholas A. Bellinger
     [not found]     ` <lvi81j$ud8$2@ger.gmane.org>
2014-09-19 23:39       ` Nicholas A. Bellinger
2014-09-19 23:51         ` Alex Elsayed
2014-09-20  0:35           ` Andy Grover
2014-09-22 20:58             ` Nicholas A. Bellinger
2014-09-22 21:00               ` Andy Grover
2014-09-22 21:03                 ` Nicholas A. Bellinger
2014-09-22 20:36           ` Nicholas A. Bellinger

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=1410822750-10717-3-git-send-email-agrover@redhat.com \
    --to=agrover@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=rjones@redhat.com \
    --cc=shli@kernel.org \
    --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 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).