diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-02-15 12:27:00 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-03-05 16:04:41 -0500 |
commit | f75580c4afb72c156746b3fc1ec977b1a85d3dee (patch) | |
tree | b576ddedbb51a0227597920dd849e98487c872fb /net/9p/trans_virtio.c | |
parent | 64ba9926759792cf7b95f823402e2781edd1b5d4 (diff) |
net/9p: Add multi channel support.
This is needed for supporting multiple mount points.
We can find out the device names to be used with mount by checking
/sys/devices/virtio-pci/virtio*/device file
if the device file have value 9 then the specific virtio device can
be used for mounting.
ex:
#cat /sys/devices/virtio-pci/virtio1/device
9
now we can mount using
# mount -t 9p -o trans=virtio virtio1 /mnt/
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/trans_virtio.c')
-rw-r--r-- | net/9p/trans_virtio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index cb50f4ae5eef..df924e5657d3 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -296,13 +296,15 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) | |||
296 | 296 | ||
297 | mutex_lock(&virtio_9p_lock); | 297 | mutex_lock(&virtio_9p_lock); |
298 | while (index < MAX_9P_CHAN) { | 298 | while (index < MAX_9P_CHAN) { |
299 | if (chan->initialized && !chan->inuse) { | 299 | if (chan->initialized && |
300 | chan->inuse = true; | 300 | !strcmp(devname, dev_name(&chan->vdev->dev))) { |
301 | break; | 301 | if (!chan->inuse) { |
302 | } else { | 302 | chan->inuse = true; |
303 | index++; | 303 | break; |
304 | chan = &channels[index]; | 304 | } |
305 | } | 305 | } |
306 | index++; | ||
307 | chan = &channels[index]; | ||
306 | } | 308 | } |
307 | mutex_unlock(&virtio_9p_lock); | 309 | mutex_unlock(&virtio_9p_lock); |
308 | 310 | ||