home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
tvfs211.zip
/
TVFS.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1997-10-31
|
43KB
|
1,272 lines
ΓòÉΓòÉΓòÉ 1. Copyright ΓòÉΓòÉΓòÉ
(c) Copyright International Business Machines Corporation 1994, 1995,
1996, 1997.
All rights reserved.
ΓòÉΓòÉΓòÉ 2. Introduction ΓòÉΓòÉΓòÉ
The Toronto Virtual File System (TVFS) is an OS/2 Installable File System that
combines VM and UNIX (**) file system concepts. The specific VM file system
concept employed is the "CMS search path". The specific UNIX file system
concept employed is the "symbolic link". Each of these concepts is described
below.
ΓòÉΓòÉΓòÉ 2.1. The CMS Search Path ΓòÉΓòÉΓòÉ
Under CMS a user may mount (access) a minidisk. Each minidisk may contain a
set of files in a flat (non-hierarchical) name space.
A number of minidisks may be mounted in a specific order. The order of the
minidisks determines the CMS search path.
For example, if the user wants to find the file foo.c, the minidisks will be
searched according to the CMS search path. The user will be given the first
instance of foo.c found.
ΓòÉΓòÉΓòÉ 2.2. The UNIX Symbolic Link ΓòÉΓòÉΓòÉ
A UNIX symbolic link may exist between a pair of files or directories. In
either case, when creating a symbolic link, a link is established within a
directory. The link may be considered equivalent to a file or subdirectory that
is resident within a parent directory. The file or directory link may be
referenced just like a "normal" file or directory entry. However, since the
entry is in reality a link to another file or directory within the UNIX file
system, the file system request is actually routed to the linked to file or
directory. For example, although one may create a directory under a directory
link, the directory will actually be created in the linked to file system.
Through the creation of these so called symbolic links, a file/directory link
will appear identical to the existing file/directory it has been linked to. In
this manner, only one copy of the file or directory actually exists although
many copies appear to exist (each with a distinct name).
ΓòÉΓòÉΓòÉ 2.3. Combining the Two ΓòÉΓòÉΓòÉ
The TVFS combines the VM and UNIX file system concepts described above.
Through the TVFS, symbolic links may be established between a TVFS file system
and a TVFS/non-TVFS local/remote file system. For each of these symbolic
links, a search path (much like a CMS search path) may be specified. In this
manner a virtual file system (TVFS) may be configured whereby files are located
by searching other (local and remote) file systems.
A concept of both CMS and UNIX file systems that is not prevalent under OS/2
but is provided by the TVFS is that of permissions. Under the TVFS,
files/directories may be specified as being read only, write only, or
read/write. These permissions are obeyed during all TVFS file system
operations.
In addition to symbolic links, search paths, and permissions, the TVFS also
supports directories. Directories may contain other directories, directory
links, or file links.
In summary, through the TVFS, specialized "views" of local and remote file
systems may be established. A diagram illustrating the architecture supported
by the TVFS follows.
The Toronto Virtual File System Architecture
ΓòÉΓòÉΓòÉ 3. Toronto Virtual File System Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.1. File System Control Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.1.1. TVCTL ΓòÉΓòÉΓòÉ
The TVCTL command is used to start the TVFS control program.
The syntax of TVCTL is:
TVCTL [-[b|c[999]|d|D|f[9999]|h|i[999]|k|m|o|O|p|q|r|s|t|v|w|z]]
A sample invocation is:
TVCTL -srw
Option Description
-b Load balance writes.
When a file is created on a writable link, the file is
typically put on the first suitable writable link. With
this option, TVFS will determine all suitable writable
links and selects the one with the most free space. In
this manner, files may be distributed across several file
systems according to resource availability.
Two things to be aware of when using this option:
1. UNC drives are discriminated against. Since I know
of no way to determine the amount of free space on a
linked to UNC name, a UNC name will always be the
last choice when balancing writes (i.e. the free
space is assumed to be zero).
2. There will be a minor performance hit when employing
this option as more file system queries are
generated.
-c[999] Perform "virtual cache management".
Virtual cache management will cache file location
information in the TVFS in order to improve performance. A
cache interval (in minutes) may also be specified. If a
cache interval is not specified, a default value will be
used. For further information on virtual cache management,
see Virtual Cache Management.
-d Perform "soft" deletions.
When a file system entity is to be deleted via DosDelete,
the TVFS will attempt to delete the entity on a write
link. If the entity does not exist on a write link, a
failure condition is returned.
The soft delete feature will not return a failure
condition if the entity does exist on a read only link (of
course, the entity will not be deleted). This feature is
provided to make the TVFS more compatable with a select
set of tools.
-D Use the default option setting.
The default option setting is equivalent to specifying
"-dfi0Oqz".
-f[9999] Use the maximum free space value.
With every (TVFS) drive, there is an amount of free space
associated with it. Since a TVFS drive is virtual, the
free space is represented as zero. However, some
applications query the amount of freespace to ensure there
is enough room for a given operation. To provide
compatability with such applications, this option will
result in the TVFS returning the "maximum possible free
space" when queried.
The user may override the free space value with a variable
number of free space units. The free space units may
range from 1 to 2048 (with 0 indicating the default value
of 1024).
-h Reuse DOS search handles.
If the user regularly runs out of search handles allocated
to DOS processes, this option should be enabled.
-i[999] Set the Ring 0 to Ring 3 interval timer.
The Ring 0 component of the TVFS sets an interrupt timer
when it send a request to the Ring 3 component (TVCTL). If
the interval timer expires before the request completes,
an error is returned to the user and the Ring 3 component
is detached.
The default interval (30 seconds) may be overridden
through this parameter. An interval of zero is valid and
represents an infinite timeout interval.
-k Ensure cache konsistency (sic).
When caching is enabled, this option will add a validation
step to ensure the cached information is still valid (i.e.
the cached file still exists) before use. This has an
obvious, though minor, performance impact over "straight"
caching.
-m Manually connect.
When the control program starts up, it connects with the
Ring 0 device driver. The device driver verifies if a
control program is already active and, if one is active,
will reject any subsequent connection requests. This
option will ignore this verification and will forcibly
connect with the Ring 0 device driver.
Warning Use of this option is only recommended in extreme circumstances
where the connection has been irrevocably broken. Use of this option when
an instance of the control program is already active will lead to
unpredictable results.
-o Initialize the opening of "new" files.
When a file is opened in write mode, it must be found on a
writable link. If a writable instance does not exist, a
new file is created. However, in some cases an instance of
the file may exist on a readable link. In these cases,
this option will initialize the "new" file to the contents
of the readable instance.
-O Initialize the opening of "new" files and reset the read
only attribute as necessary.
This option performs the "-o" processing. It also will
remove the read only attribute of the file copied to the
writable link.
-p Run at `regular' priority.
When the control program is started, it runs as a high
priority, time critical process. By specifying this
option, the control program will run at the default OS/2
Ring 3 process level.
-q Quit immediately.
The control program will resist termination if TVFS drives
are mounted. This option will avoid any resistance and
terminate immediately, even if drives are mounted. The
control program will make an attempt to unmount all
mounted drives before termination.
-r Restore the TVFS configuration.
When the control program is started, it will attempt to
restore a saved TVFS configuration. See the TVSAVE and
TVRESTOR commands for more information.
-s Save the TVFS configuration.
When the control program is shutdown, it will attempt to
save the current TVFS configuration. See the TVSAVE and
TVRESTOR commands for more information.
-t Support TVFS to TVFS links.
When this parameter is specified, added processing to
manage (recursive) TVFS to TVFS links is performed. As
this processing will degrade the performance of all
current TVFS file systems, it should only be used as
required.
-v Run the control program in verbose mode.
When the control program is run in verbose mode,
redirected file system calls will be displayed. This
information may be used to unravel exactly what the TVFS
is doing, whether for informational or debugging purposes.
-w Spawn the tvctl program and wait for it to load.
When the control program is started, it takes a small
amount of time to load. Until it is loaded, operations on
TVFS drives will fail. This option will spawn an instance
of the control program and will wait for it to be fully
loaded, at which time TVFS commands will be fully
operational.
-z Move with Zen-like precision.
A move operation requires the source to be on a read/write
drive. If the source is on a read only drive, the move
will fail. This option will permit moves on source files
that are read only, leading to a copy (with replace)
operation.
This option has nothing to do with Zen (or motorcycle
maintenance), I simply ran out of meaningful options tags.
The TVFS control program must be running in order for the TVFS file system to
be active. (**) This may be accomplished by entering the following OS/2
command.
tvctl -w
This command may be added to the OS/2 startup.cmd file.
ΓòÉΓòÉΓòÉ 3.1.2. TVGUIDE ΓòÉΓòÉΓòÉ
The TVGUIDE command permits the alteration of TVCTL settings while the control
program is still active (i.e. you do not need to stop and restart TVCTL to
alter its settings).
The syntax of TVGUIDE is:
TVGUIDE [[+|-][b|c[999]|d|f[9999]|h|i[999]|k|o|O|p|q|s|t|v|z]]
A sample invocation is:
TVGUIDE +Ov -z
Option Description
+ Enables the control program setting.
- Disables the control program setting.
all others These parameters match the TVCTL parameters.
The "+" modifier will turn on the option in the control
program. The "-" modifier will turn off the option in the
control program (typically resetting it back to the
control program default).
ΓòÉΓòÉΓòÉ 3.1.3. TVKILL ΓòÉΓòÉΓòÉ
The TVKILL command is used to kill the currently active TVFS control program.
The syntax of TVKILL is:
TVKILL
A sample invocation is:
TVKILL
ΓòÉΓòÉΓòÉ 3.2. File System Save and Restore Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.2.1. TVSAVE ΓòÉΓòÉΓòÉ
The TVSAVE command is used to save the current TVFS configuration.
The syntax of TVSAVE is:
TVSAVE [save-file]
A sample invocation is:
TVSAVE
Option Description
save-file The file name to save to.
If a file name is not specified, the save file name is
derived from the TVFS_RESTORE_CMD environment variable.
(**)
ΓòÉΓòÉΓòÉ 3.2.2. TVRESTOR ΓòÉΓòÉΓòÉ
The TVRESTOR command is used to restore a saved TVFS configuration.
The syntax of TVRESTOR is:
TVRESTOR [save-file]
A sample invocation is:
TVRESTOR
Option Description
save-file The file name to restore from.
If a file name is not specified, the file name is derived
from the TVFS_RESTORE_CMD environment variable. (**)
ΓòÉΓòÉΓòÉ 3.3. File System Mount Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.3.1. TVMOUNT ΓòÉΓòÉΓòÉ
The TVMOUNT command is used to mount a TVFS file system.
The syntax of TVMOUNT is:
TVMOUNT [-c[999]] drive:
A sample invocation is:
TVMOUNT x:
Option Description
-c[999] Perform "virtual cache management" for the drive.
Virtual cache management will cache file location
information in the TVFS in order to improve performance. A
cache interval (in minutes) may also be specified. If a
cache interval is not specified, a default value will be
used. For further information on virtual cache management,
see Virtual Cache Management.
drive: The name of the drive to be mounted.
The drive must not yet exist.
ΓòÉΓòÉΓòÉ 3.3.2. TVUMOUNT ΓòÉΓòÉΓòÉ
The TVUMOUNT command is used to unmount a TVFS file system.
The syntax of TVUMOUNT is:
TVUMOUNT [-f] drive:
A sample invocation is:
TVUMOUNT x:
Option Description
-f Force the unmounting of the drive.
If the TVCTL program ever becomes disconnected and is then
reconnected, the drives it previously owned will be
invalid. To unmount these invalid drives without error,
the force option should be specified.
drive: The name of the drive to be unmounted.
The drive must be a TVFS drive. If an asterisk is
specified for the drive, all TVFS drives will be
unmounted. An asterisk will also, by default, force the
unmounting of all TVFS drives.
ΓòÉΓòÉΓòÉ 3.4. File System Link Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.4.1. TVLINK ΓòÉΓòÉΓòÉ
The TVLINK command is used to link a local or remote file system to a TVFS file
system.
The syntax of TVLINK is:
TVLINK [-r|-w|-rw] [-b] [-c] [-#9999] [-n] [-f|-d] [-t] [-x] tvfs-pathname link-pathname
A sample invocation is:
TVLINK -rd#5 x:\bin c:\bin:
Option Description
-r|-w|-rw The access mode to link with (read, write, or read/write).
The default access mode is read access.
Warning It is recommended that only the read and read/write access modes
be used. While linking in write-only mode is supported it may lead to
unexpected (although predictable) results.
-b Build the tvfs-pathname directory structure.
To simplify the creation of TVFS pathnames, the user may
request that the complete pathname directory structure be
built if it does not already exist. This involves
performing a DosMkdir for every directory entry that does
not yet exist (above the link being created).
-c Create subtrees automatically.
On a writable directory link, subtrees will be created
automatically under the linked to directory if a better
fit for a given pathname does not exist.
-#9999 The position to link at.
By specifying the position, the user may customise the
search path order. The default position is 9999.
-n Nonexistent file or directory.
Permit a link to a nonexistent link-pathname.
-f|-d File or directory.
If neither the tvfs-pathname nor the link-pathname exists,
the user must instruct the TVFS whether a directory or
file link is to be established.
-t Permit TVFS to TVFS links.
Since a TVFS to TVFS link may lead to a cycle of linked
files/directories, users must explicitly request such a
link. Responsibility for avoiding deadlock is left to the
user (the TVFS does no deadlock detection).
This option may also be used to link to (TVFS or non-TVFS)
drives that do not currently exist.
-x Exclude subdirectories.
When linking to a directory, the subdirectories in the
linked to directory may be excluded. When excluded, these
subdirectories may not be referenced in any manner via the
link. The exclude option may be used to improve
performance (by avoiding unnecessary searches of
subdirectory trees) in addition to providing another
mechanism for tailoring the view(s) of a file system.
tvfs-pathname The TVFS file/directory link.
The link will be created if it does not already exist.
Note When a TVFS drive is created, a root directory is automatically
created for it. The root directory may be linked to (transforming it into
a "root directory link") as long as it does not contain any
subdirectories.
link-pathname The local or remote file/directory to link to.
The link path may specify a "normal" path name or a UNC
name.
ΓòÉΓòÉΓòÉ 3.4.2. TVULINK ΓòÉΓòÉΓòÉ
The TVULINK command is used to unlink a local or remote file system from a TVFS
file system.
The syntax of TVULINK is:
TVULINK [-d] tvfs-pathname [*|-#9999|link-pathname]
A sample invocation is:
TVULINK x:\ *
Option Description
-d Unlink from a directory (as opposed to a directory or
file link point).
This option will remove the specified entry and its
subordinate tree (potentially containing TVFS
directories, directory links, and file links), even
if it is a TVFS directory. The link pathname must be
*.
tvfs-pathname The TVFS file/directory link being unlinked.
*|-#9999|link-pathname The local or remote file/directory to unlink from.
If * is specified, all linked to files/directories
will be unlinked from.
If -#9999 is specified, the linked to file/directory
at the specified position will be unlinked from.
If link-pathname is specified, the named
file/directory will be unlinked from.
If a TVFS file/directory link is no longer linked to
a local/remote file system after a TVULINK operation,
the file/directory link will be removed from the
TVFS.
ΓòÉΓòÉΓòÉ 3.5. File System Display Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.5.1. TVSTATUS ΓòÉΓòÉΓòÉ
The TVSTATUS command is used to display the status of the current control
program (is the program running and, if so, what is its process id).
The syntax of TVSTATUS is:
TVSTATUS
A sample invocation is:
TVSTATUS
ΓòÉΓòÉΓòÉ 3.5.2. TVDRIVE ΓòÉΓòÉΓòÉ
The TVDRIVE command is used to display the set of TVFS drives.
The syntax of TVDRIVE is:
TVDRIVE
A sample invocation is:
TVDRIVE
ΓòÉΓòÉΓòÉ 3.5.3. TVDIR ΓòÉΓòÉΓòÉ
The TVDIR. command is used to display a TVFS directory, including redirection
information.
The syntax of TVDIR is:
TVDIR [-a] [-r|-w|-rw] [directory]
A sample invocation is:
TVDIR x:\bin
Option Description
-a List all incidents of redirection.
-r|-w|-rw The access mode to list (read, write, or read/write).
The type of redirection for the listed files may be
specified through this option (.e.g. display where all
files in the current directory will be written to).
The default access mode is read access.
Note: The TVDIR command may only list those files on a
read (or read-write) link. Write-only links should be
inspected via the TVSCREEN utility or the TVCTL verbose
mode. This is a consequence of the "hidden" nature of
write-only links.
directory The directory to be displayed.
Each directory and file/directory link in the given TVFS
directory will be listed. If no directory is specified,
the current directory is used. Wildcard characters may be
specified.
ΓòÉΓòÉΓòÉ 3.5.4. TVSHOW ΓòÉΓòÉΓòÉ
The TVSHOW command is used to show a TVFS file or directory mapping.
The syntax of TVSHOW is:
TVSHOW [pathname]
A sample invocation is:
TVSHOW x:\bin
Option Description
pathname The file or directory to be shown.
For the specified file or directory, the set of TVFS links
will be shown. This includes the order, access mode, and
full pathname of each linked to file system. If no
pathname is specified, the current directory is used.
ΓòÉΓòÉΓòÉ 3.6. File System Synchronization Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.6.1. TVSYNC ΓòÉΓòÉΓòÉ
The TVSYNC command is used to move/copy/delete/list files on specific TVFS
links based upon access permissions and file masks.
The syntax of TVSYNC is:
TVSYNC [-l|-d] [-r|-w|-rw] source
TVSYNC [-c|-m] [-r|-w|-rw] source move/copy-target
A sample invocation is:
TVSYNC -cr x:\*.* c:\tmp
Option Description
-l List.
List all source files on the TVFS links with the specified
access permissions.
-d Delete.
Delete all source files on the TVFS links with the
specified access permissions.
-c Copy.
Copy all source files on the TVFS links with the specified
access permissions.
-m Move.
Move all source files on the TVFS links with the specified
access permissions.
source The source file mask.
move/copy-target The target file specification (move and copy options
only).
ΓòÉΓòÉΓòÉ 3.7. File System Cache Management Commands ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 3.7.1. TVCLEAN ΓòÉΓòÉΓòÉ
The TVCLEAN command is used to clean up cached file system entries. For more
information on caching, please see Virtual Cache Management.
The syntax of TVCLEAN is:
TVCLEAN [-i[999]] [-n] [-r] [-v]* [pathname]
A sample invocation is:
TVCLEAN -i5vvvvv x:\*.*
Option Description
-i[999] The cleanup interval in minutes.
If a cleanup interval is specified, the program will run
in an infinite loop. Upon each execution of the loop, the
cleanup process will sleep for the specified interval. In
this manner, a cache cleanup process may be set up to run
permanently in the background.
-n Permit the use of nonexistant pathnames.
Cleanup processing will typically validate the passed
pathname and fail if it is not valid (including if it does
not exist). This option will eliminate this validation.
This permits the creation of a cleanup process for
transient pathnames.
-r Run recursively.
This option will result in the recursive cleanup of the
specified pathname and all (cached) entries below it in
the directory tree.
-v The verbosity level.
Cleanup processing is normally quite terse. The verbosity
level may be increased by specifying the -v option
multiple times. The TVCLEAN program currently supports up
to five levels of verbosity (i.e. -vvvvv).
pathname The pathname to clean up.
This is the pathname that is to be cleaned up. It may
contain wildcard characters. If a pathname is not
specified, the current directory/pathname is used.
ΓòÉΓòÉΓòÉ 3.8. File System Dynamic Link Library Commands ΓòÉΓòÉΓòÉ
The TVFS supports dynamic linking to a fixed set of commands. The DLL support
provides the ability to write TVFS configuration programs. It also permits,
through the TVCMD utility built upon the DLL support, faster execution of a
given set of TVFS commands. The TVCMD utility is described below. For more
information, please see Dynamic Link Library Command Support.
ΓòÉΓòÉΓòÉ 3.8.1. TVCMD ΓòÉΓòÉΓòÉ
The TVCMD command is used to run a set of TVFS commands.
The syntax of TVCMD is:
TVCMD [tvmount-cmd|tvumount-cmd|tvlink-cmd|tvulink-cmd|tvmkdir-cmd]*
A sample invocation is:
TVCMD tvmount x: tvlink x:\c c:\ -rw
The TVCMD utility will invoke the passed set of commands sequentially. If any
of the commands fail, execution is terminated and the appropriate return code
is passed back.
All of the commands should be self-explanatory except for "tvmkdir-cmd". It
simply provides an interface to the DOS "mkdir" command.
ΓòÉΓòÉΓòÉ 3.9. File System Remote Execution Commands ΓòÉΓòÉΓòÉ
The TVFS supports the integration of user defined programs, thereby providing a
facility for remote processing based upon file system events. For more
information, please see Remote Execution Support.
ΓòÉΓòÉΓòÉ 3.9.1. TVREMOTE ΓòÉΓòÉΓòÉ
The TVREMOTE command is used to add to, delete from, and list the set of remote
programs.
The syntax of TVREMOTE is:
TVREMOTE [-a queue-name description] [-d [queue-name|*]] [-l] [-u]
A sample invocation is:
TVREMOTE
Option Description
-a Add a remote program.
-d Delete a remote program.
-l List the set of remote programs currently registered.
-u Unblock the (blocked) control program.
This option should only be used in extreme cases when
manual intervention is required to reset/unblock the
control program.
queue-name The message queue name to be added or deleted.
A message queue uniquely identifies the program to be
registered. All further communication between the TVFS and
the program will occur via this message queue.
If a message queue of `*' is specified on delete, all
registered programs will be deleted.
description The description of the user program (message queue) being
added.
ΓòÉΓòÉΓòÉ 3.9.2. TVSCREEN ΓòÉΓòÉΓòÉ
The TVSCREEN command is used to monitor the open TVFS files.
The syntax of TVSCREEN is:
TVSCREEN
A sample invocation is:
TVSCREEN
The TVSCREEN command is an example of a remote program. When executed, it will
register itself with the TVFS and display the set of files opened by the TVFS
over its lifetime. When terminated, TVSCREEN will unregister itself with the
TVFS.
Note: The TVSCREEN command is provided as a sample remote program. For this
reason, it has been implemented in as simple a manner as possible (e.g. scroll
bars are not supported). For information on obtaining the associated source
code, please see Remote Execution Support.
ΓòÉΓòÉΓòÉ 4. Usage ΓòÉΓòÉΓòÉ
The TVFS is a general purpose file system. However, it was written with a set
of specific applications in mind. A description of these applications follows.
A sample session involving the creation and usage of a TVFS file system
instance is also given.
ΓòÉΓòÉΓòÉ 4.1. Sample Applications ΓòÉΓòÉΓòÉ
1. Provide the ability to link OS/2 FAT file system names to HPFS or UNIX
file system names.
Through the TVFS, the short (8.3 format) names supported by the FAT file
system may be linked to the long (less restricted) name format supported
by the HPFS and UNIX file systems. In this manner, tools that depend on
the FAT file system may be able to better cooperate with HPFS and UNIX
name spaces.
UNIX file systems may be mounted under OS/2 via the OS/2 Network File
System Program Product.
2. Provide the basis for an OS/2 build utility.
A typical OS/2 source code library stores files on an OS/2 LAN server
within several distinct directories (and possibly across several LAN
servers). Through the TVFS, these directories may be combined into a
single search path that may be used for building via a general purpose
build tool (e.g. MAKE).
ΓòÉΓòÉΓòÉ 4.2. A Sample Session ΓòÉΓòÉΓòÉ
A sample session involving the use of the TVFS is given below.
Start the TVFS control program.
tvctl -Dw
Mount a TVFS file system instance.
tvmount x:
Locate to the TVFS file system instance.
x:
Make a directory within the TVFS.
mkdir foo
Create a file link under the created directory.
tvlink x:\foo\my.sys c:\config.sys
Display the linked to file.
type x:\foo\my.sys
> The contents of the c:\config.sys file will be displayed...
> If a search path was employed, the contents of the first
> existing file with the correct access permission (read)
> would be provided.
Create a directory link.
tvlink x:\foodir c:\os2
Display the linked to directory.
dir x:\foodir
> The contents of the c:\os2 directory will be displayed...
> If a search path was employed, the merged output of the dir
> command on each of the directories in the search path
> would be provided.
Unmount the file system.
c:
tvumount x:
ΓòÉΓòÉΓòÉ 5. Appendices ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 5.1. Ordering and Support ΓòÉΓòÉΓòÉ
The TVFS package may be ordered from the OS2TOOLS conferencing disk. This may
be achieved by running the following (CMS) command:
TOOLS SENDTO KGNVMZ PCTOOLS OS2TOOLS GET TVFS PACKAGE
All support of the TVFS package is provided by the author through the OS2TOOLS
conferencing disk. A TVFS forum is available on the IBMPC conferencing disk for
questions, bug reports, etc. regarding the TVFS.
Note: The TVFS is also available to external customers via the OS2EWS program.
All external support is through OS2EWS.
ΓòÉΓòÉΓòÉ 5.2. Installation ΓòÉΓòÉΓòÉ
Once the TVFS package has been received, its various components should be
installed as follows.
Component Name Installation
TVFS.INF The online help should be loaded into a valid help
directory (any directory included in the BOOKSHELF
statement in the OS/2 config.sys file). The help may be
viewed by entering "view tvfs.inf".
TVFS.IFS This component provides the file system driver program.
It may reside in any OS/2 directory on the local
workstation. However, it must be identified via an IFS=
statement in the OS/2 config.sys file.
The "/LOGO" parameter may be passed on the IFS= statement
to display the device driver logo at boot time. For
example:
IFS=C:\IFS\TVFS.IFS /LOGO
Once config.sys has been updated, the machine must be
rebooted to load the IFS. Once the IFS is loaded, it will
execute at the OS/2 Ring 0 level (as opposed to the
traditional Ring 3 level).
*.DLL All TVFS DLLs should be loaded in a valid DLL directory.
A valid DLL directory is any directory included in the
LIBPATH statement in the OS/2 config.sys file.
*.EXE, *.CMD All TVFS executable programs should be loaded in a valid
executable directory. A valid executable directory is any
directory included in the PATH statement in the OS/2
config.sys file.
ΓòÉΓòÉΓòÉ 5.3. Virtual Cache Management ΓòÉΓòÉΓòÉ
The TVFS provides virtual cache management. Caching in most file systems
implies maintaining (remote) file contents locally. Since the TVFS is virtual
and redirects requests to other file systems, it will cache the location of a
file instead of its contents. In this manner, the TVFS may eliminate search
effort thereby improving performance.
The TVFS only caches information on files accessed in read mode. The cached
information will be purged if:
1. An attempt is made to retrieve the cached file in update mode (write or
read/write).
2. The link point the information is cached under is altered (via TVLINK or
TVULINK).
3. The cached information has expired.
When caching is requested, a cache interval may be specified. If no
interval is specified, a default of five minutes is used. An attempt to
use cached information that is older than this interval will result in
the cache entry being invalidated, to be generated anew.
A cache interval may be specified at two levels: the global (file system)
level and the drive level. When the TVFS daemon (TVCTL) is started, caching
may be requested at the global level. All TVFS drives will inherit this
caching interval unless it is overidden by specifying a cache interval at the
drive level (via TVMOUNT). Note that it is possible to enable caching for only
a single TVFS drive. Similarly, it is possible to disable caching for only a
single TVFS drive.
ΓòÉΓòÉΓòÉ 5.4. Dynamic Link Library Command Support ΓòÉΓòÉΓòÉ
The dynamic link library support consists of the TVCMD utility and its
associated DLL (TVCMD.DLL). The source for the TVCMD utility is provided with
the TVFS to support the writing of TVFS utilities by the user. To obtain the
source, simply execute the TVCMDZIP.EXE program (**) that has been provided
with the TVFS.
It is felt that the sample application is sufficiently straightforward to
warrant little (or, rather, no) discussion here.
ΓòÉΓòÉΓòÉ 5.5. REXX Support ΓòÉΓòÉΓòÉ
A REXX dynamic link library is provided to support the invocation of TVFS
operations from a REXX script. The DLL (TVRX.DLL) provides support for the
loading, invocation, and unloading of the "core" TVFS functions (TvMount,
TvUmount, TvLink, TvUlink) as well as a mkdir utility (TvMkdir).
A sample of the REXX usage is provided in TVSAMPLE.CMD.
ΓòÉΓòÉΓòÉ 5.6. Remote Execution Support ΓòÉΓòÉΓòÉ
The remote execution support provided by the TVFS enables a user program to be
integrated with the TVFS. The user program registers itself with the TVFS by
passing a message queue identifier. The message queue will then be used by the
TVFS to communicate with the program, notifying the program of file system
events. Information related to these events will be passed in a segment
allocated by the TVFS.
All required information for creating a user program is provided in the
supplied header file TVREMOTE.H. This header file is provided along with the
sample source code for the TVSCREEN command. To obtain it, simply execute the
TVSCRZIP.EXE command (**) that has been provided with the TVFS.
It is felt that TVREMOTE.H and the sample application are sufficiently
straightforward to warrant little discussion here. However, the following
points are worth noting:
1. Only the public declarations in TVREMOTE.H should be used.
2. It is possible for the user to filter messages based upon specific file
system events (file preopen, postopen, preclose, and postclose).
3. It is possible for the user to filter messages based upon the source
(TVFS) drive and the target (redirected) drive involved.
4. It is possible for the user to request the TVFS control program block on
the event until a signal (actually, a semaphore) is set by the user
program. A timeout interval for the blocked control program may also be
specified.
5. It is the responsibility of the user program to free the segments
allocated by the TVFS.
6. It is the responsibility of the user program to unregister itself from
the TVFS.
7. The entry points provided in TVREMOTE.DLL should be imported by the user
program if required.
ΓòÉΓòÉΓòÉ 5.7. Known Limitations ΓòÉΓòÉΓòÉ
Limitations are intended to provide the basis for future TVFS enhancements.
However, several limitations are imposed by OS/2 and may not be resolved by the
TVFS. Limitations imposed by OS/2 will be recognized but are not expected to
be dealt with in future releases of the TVFS.
1. OS/2 only supports read and write access in the exported file system
interface. Execute only access is not recognized outside of a file
system, although it is recognized within a file system. Consequently,
execute only files (e.g. on an OS/2 LAN Server) may not be redirected by
the TVFS.
2. The TVFS consists of a set of cooperating Ring 0 and Ring 3 components.
Migration to a single Ring 0 component is preferred (but, alas,
impossible).
3. The TVFS directories only support read only extended attributes. Full
(read/write) extended attributes are supported for redirected file
systems.
4. Several tools require a read/write root directory on a drive (for
example, IPFC). If the root of a TVFS drive is read only, these tools
will fail.
5. Not all Ring 3 components have been ported to 32 bit (OS/2 2.x only).
6. TVFS messages should be generalized/improved (in particular, the DosFSCtl
error messages).
7. Support should be provided for excluded TVFS links to contain TVFS
directory entries.
ΓòÉΓòÉΓòÉ 5.8. Known Bugs ΓòÉΓòÉΓòÉ
Program bugs are prioritized according to their (perceived) severity and will
be eliminated accordingly.
1. The DosFindFirst/DosFindNext calls may require the TVFS to return a
merged set of file names. The TVFS, following the OS/2 model, maintains
the case of these file names. However, it ignores case when comparing
file names. Network File Systems, on the other hand, support a "complete"
mixed case name space. Therefore, DosFindFirst/DosFindNext may return a
smaller set of names than is actually available when Network File Systems
are involved. (**) The TVFS should detect the case orientation of the
linked to file systems and merge appropriately.
2. DosFSCtl calls are not redirected. This prevents utilities supported by
other file systems from being supported/redirected by the TVFS. A known
example of such a utility is the NFS ln program (the program responsible
for creating symbolic links in NFS file systems).
3. A single volume label is maintained across all TVFS drives. The label
should be settable per drive.
4. The save/restore scripts do not handle embedded blanks in file (link)
names.
ΓòÉΓòÉΓòÉ 6. Glossary ΓòÉΓòÉΓòÉ
ΓòÉΓòÉΓòÉ 6.1. DLL ΓòÉΓòÉΓòÉ
DLL
Dynamic Link Library.
A DLL provides a mechanism to link programs dynamically at run time, as opposed
to statically at program build time.
ΓòÉΓòÉΓòÉ 6.2. IFS ΓòÉΓòÉΓòÉ
IFS
Installable File System.
The OS/2 IFS enables the development of customised file systems that may be
integrated with OS/2. The TVFS and HPFS (High Performance File System) file
systems are but two examples of an IFS.
ΓòÉΓòÉΓòÉ 6.3. link ΓòÉΓòÉΓòÉ
link
The creation of a connection between file systems. A link may be considered
equivalent to a UNIX "symbolic link" (as opposed to a UNIX "hard link").
ΓòÉΓòÉΓòÉ 6.4. local ΓòÉΓòÉΓòÉ
local
That which is resident on the immediate workstation.
ΓòÉΓòÉΓòÉ 6.5. mount ΓòÉΓòÉΓòÉ
mount
To attach a file system to the local workstation. A mounted file system must
be assigned an OS/2 drive letter.
ΓòÉΓòÉΓòÉ 6.6. remote ΓòÉΓòÉΓòÉ
remote
That which is not local (typically accessed via the network).
ΓòÉΓòÉΓòÉ 6.7. Ring 0 ΓòÉΓòÉΓòÉ
Ring 0
The OS/2 kernel program execution level.
ΓòÉΓòÉΓòÉ 6.8. Ring 3 ΓòÉΓòÉΓòÉ
Ring 3
The OS/2 application program execution level.
ΓòÉΓòÉΓòÉ 6.9. TVFS ΓòÉΓòÉΓòÉ
TVFS
Toronto Virtual File System
ΓòÉΓòÉΓòÉ 6.10. unlink ΓòÉΓòÉΓòÉ
unlink
The removal of a connection between file systems.
ΓòÉΓòÉΓòÉ 6.11. unmount ΓòÉΓòÉΓòÉ
unmount
To detach a file system from the local workstation.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
UNIX is a trademark of AT&T.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The control program executes at the Ring 3 level. It communicates with the
TVFS.IFS control program running at Ring 0 via the DBFS package provided by
David Bolen.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
The environment variable should give the full pathname of an OS/2 command file
(an OS/2 command file name must end in ".cmd"). In this manner, one may save
several, distinct TVFS configurations and restore them at will. The saved
command file may also be edited at the discretion of the user.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
External customers should unzip the TVCMD.ZIP file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
External customers should unzip the TVSCREEN.ZIP file.
ΓòÉΓòÉΓòÉ <hidden> ΓòÉΓòÉΓòÉ
Note that all other commands against the TVFS handle case correctly without
knowledge of the type of file system linked to. This is achieved by letting the
linked to file system determine how to handle case. For
DosFindFirst/DosFindNext, the TVFS must handle the case for all involved file
systems.