windows-cm_ioctl_query_opts-20080115
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 16 Jan 2008 03:16:19 +0000 (03:16 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 16 Jan 2008 03:16:19 +0000 (03:16 +0000)
commit88e915d8f976898e75a6afe8bc7b6d7c33b8a121
tree9779fb5b664367744afd9126a0ef499806ddc1d5
parent64ef3f518eee22b167ff5043b01dc1f3251f10bd
windows-cm_ioctl_query_opts-20080115

LICENSE MIT

The path ioctl operations have several issues:

(1) the specified path for "fs examine, whereis, whichcell, flush" and so
    always has the follow symlinks and mount points semantics.  This makes
    it impossible to determine what the FID of a symlink or mount point is.

(2) "fs examine" out is not the result of a single pioctl operation but is
    actually the combined output of half a dozen operations.  Path evaluation
    is an expensive operation.  It would be faster if the caller could
    evaluate the FID first and then perform all of the rest of the operations
    by specifying the FID instead of the path.

(3) fs output reports all objects as files.  By adding a GetFileType
    pioctl more informative output can be provided that indicates what
    type of object the path evaluates to.

(4) the Windows fs command includes a number of commands that do nothing
    but exist only because the Unix cache manager supports them.

This delta adds a new extendible data structure cm_ioctl_query_opts_t which
can be optionally specified with pioctls that do not already require
input data.  The first two fields of this structure are 'literal' and
'fid'.  The literal field is used to indicate whether the last component
of the path should be evaluated following symlinks and mount points.
The fid field permits a fid to be specified.

A new GetFileType pioctl has been added. The type of objects are now
output.

A new "-literal" option is available for "fs examine, flush, whereis, and
whichcell.

Unimplemented fs commands have been removed.
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_ioctl.h
src/WINNT/afsd/fs.c
src/WINNT/afsd/smb_iocons.h
src/WINNT/afsd/smb_ioctl.c