On Fri, Aug 04, 2000 at 08:36:15AM +0200, Miklos Szeredi wrote:
> Hi!
>
> At the moment the coda kernel module does't seem to support multilple
> mounts with independent clients attached to the devices.
>
> I think it would be quite simple to fix this, e.g. storing the
> coda_upc_comm structure in an array (or struct file), and
> coda_super_info in the superblock.
Or allocate a coda_upc_comm structure when the device is first opened,
record the pointer in psdev_inode->u.generic_ip and copy this pointer to
coda_super_info->sbi_vcomm when the filesystem is mounted (in
coda_read_super).
Similarily, coda_super_info should not be a global, but allocated on
mount, and a pointer to that one (or to the superblock) can be stored in
the coda_upc_comm structure that belongs to the mountpoint.
Functions that operate on the character device use
vcp = (struct venus_comm *)file->f_dentry->d_inode->u.generic_ip, and
sb = vcp->vc_sb (or sb = vcp->vc_sbi.sbi_sb?)
While the ones that go through the superblock (coda_upcall/downcall),
use vcp = sbi->sbi_vcomm.
It seems simple enough, there really are not many globals, and it will
definitely be useful. I'm not sure whether keeping track of statistics
on a per-fs basis is worth the additional complexity.
Jan