mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Eric Van Hensbergen <[email protected]>
This commit is contained in:
parent
64ba992675
commit
f75580c4af
2 changed files with 9 additions and 7 deletions
|
|
@ -296,13 +296,15 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args)
|
|||
|
||||
mutex_lock(&virtio_9p_lock);
|
||||
while (index < MAX_9P_CHAN) {
|
||||
if (chan->initialized && !chan->inuse) {
|
||||
chan->inuse = true;
|
||||
break;
|
||||
} else {
|
||||
index++;
|
||||
chan = &channels[index];
|
||||
if (chan->initialized &&
|
||||
!strcmp(devname, dev_name(&chan->vdev->dev))) {
|
||||
if (!chan->inuse) {
|
||||
chan->inuse = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
index++;
|
||||
chan = &channels[index];
|
||||
}
|
||||
mutex_unlock(&virtio_9p_lock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue