[linux-cifs-client] Re: remapping illegal file characters

Steven French sfrench at us.ibm.com
Fri Apr 8 14:45:28 GMT 2005






> I think as long as you were changing all of those function prototypes,
> it would be a lot cleaner to pass cifs_sb all the way through to
> cifsConvertToUCS, rather than have all the callers pass
> cifs_sb->local_codepage and (cifs_sb->mnt_cifs_flags &
> CIFS_MOUNT_MAP_SPECIAL_CHR)

Originally I wanted to do this but I decided against it because it causes
more vfs
concepts to break into the lowest, protocol related, part of the code.
The problem - I wanted to keep a sort of boundary between two halves of the
cifs vfs.
Architecturally I wanted to think of cifs vfs as a:
      "protocol layer" (cifssmb.c, cifspdu.h, and in a sense transport.c
which wraps the socket sends)
and the
      "vfs layer" of cifs - inode.c, dir.c, file.c (and their headers
cifsfs.h, cifs_fs_sb.h etc.)
and misc. support routines used by both (for debugging, string conversions,
etc.)

I wanted cifssmb.c as free of vfs specific code as possible (obviously that
is not completely possible, but it is close), partly so it could continue
to be be ported to an lgpl userspace cifs library (as benchmark people
did).  Passing a cifs_sb structure through the cifssmb layer would change
this a bit.

I agree that passing cifs_sb (instead of cifs_sb->local_nls and
cifs_sb->mnt_flags & MNT_xxxxx_FLAG) would make the functions smaller
(removing one parm from more than a dozen functions in cifssmb.c) but I
like the simplifying assumption that fs/cifs/cifssmb.c contains just the
"protocol" layer.

Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the linux-cifs-client mailing list