[linux-cifs-client] DFS support in CIFS
Steve French
smfrench at austin.rr.com
Fri Sep 22 03:40:21 GMT 2006
> Currently I'm writing DFS support in cifs kernel module
> At current state I can work read/write/list files in DFS shares and so on.
> Only two big things hasn't been done:
2. not enough knowledge to do propper cleanup when cleaning nested
trees, module crashes on 'rmmod cifs'
So, Does anybody know a way to accomplish 1 problem or any proposal how
I had finished part of the code necessary for DFS a few years ago (and
they are in mainline) as you have probably noticed.
CIFS code can recognize DFS referral, get the referral list - and for
referrals with server as ip address could probably work today with small
changes. ip address based referrals are ok, although not common.
> 1. resolving server names to ip in kernel space
I think the easiest approach for kernels 2.6.12 or later will be to define a key type (keyed on hostname) for the upcall and use the
key management api to return the ip address (see Documentation/keys.txt etc and Dave Howells web page at RedHat). Most other
upcall possibilities (captive ioctl, cn.ko, or worse netlink, or pseudo-fs require a long running daemon which is
probably not ideal, and also have some problems with reliability). This should probably not be a cifs specific key type
but cifs would be the first user of it.
>2. not enough knowledge to do propper cleanup when cleaning nested
> trees, module crashes on 'rmmod cifs'
There may be a way to do this with explicit mounts from a daemon in userspace (I hope we can avoid this) but surely this
is something the automounter deals with. Again the key request api (with a null, noncached key - passing as description
the mount parms you want to issue?) might work. An alternative if mount in kernel could be to attached a list of the
"sub-mounts" (implicit dfs mounts) off the CIFS_SB (cifs specific portion of the superblock).
In any case - let's discuss this more. I would like to take a look at integrating this - the DFS code has languished too long.
More information about the linux-cifs-client
mailing list