From: STAR::COUGHLAN "Tom" 7-OCT-1996 16:37:35.62 To: EVERHART CC: Subj: Design #3 for Skipfiles Modifications From: EVMS::TGOODWIN 4-OCT-1996 13:19:04.76 To: COUGHLAN CC: Subj: Updates to design from meeting Design #3 for Skipfiles Modifications The approach which we have decided to take is a merger of options 2.4.1 and 2.4.2 of the investigation report with modifications from Lenny's design. This means that we will be creating a function code modifier for IO$_SKIPFILE (IO$M_ALLOWFAST) which will be used to enable skip by filemarks for a single QIO operation and we will be creating a user mode QIO interface (part of SETMODE) which will be used to enable and disable skip by filemarks as the default operation for IO$_SKIPFILE and to enable and disable the use of the IO$M_ALLOWFAST modifier. Following unit init of a device, skip by filemarks will always be disabled by default for IO$_SKIPFILE and the new IO$_SKIPFILE modifier will be enabled. During a packack sequence, MKDRIVER will set or clear the SKIPFILE_SUPPORTED bit of UCB$L_MK_FLAGS using the same algorithm which is in place currently (reference CHECK_SKIPFILE_SUPPORTED routine). This design will define a two new bits in UCB$L_MK_FLAGS called SKIPFILE_ENABLED and SKIPFILE_DEFAULT which will be initialized to the enabled and disabled states, respectively, during unit init. The IO$_SETMODE QIO inteface will use three modifiers to control the current skip by filemarks settings. The modifier IO$M_ALLOWFAST_OFF will be used to clear both ENABLE_ALLOWFAST and FORCE_ALLOWFAST in UCB$L_MK_FLAGS. The modifier IO$M_ENABLE_ALLOWFAST will clear the FORCE_ALLOWFAST flag and set the ENABLE_ALLOWFAST in UCB$L_MK_FLAGS. The modifier IO$M_FORCE_ALLOWFAST will be used to set both ENABLE_ALLOWFAST and FORCE_ALLOWFAST in UCB$L_MK_FLAGS. The ENABLE_ALLOWFAST and FORCE_ALLOWFAST flags will only be looked at by IO$_SKIPFILE if the SKIPFILE_SUPPORTED bit is set. This will prevent the possibility of enabling this on drives which we know we cannot support skipfiles on. Anytime the skip by filemarks is used by IO$_SKIPFILE, whether due to IO$M_ALLOWFAST modifier being present or by forcing the allowfast functionality, the MT$M_FASTSKIP_USED flag in the devdepend longword of the UCB will be set and returned in the IOSB. This will be used as positive acknowledgement to an application which algorithm was used to move the tape. For the changes to the IO_SKIP_FILE routine in MKDRIVER, I feel it is easiest to show the change in the enabling algorithm using pseudocode: OLD ALGORITHM ------------- IO_SKIP_FILE: If SKIPFILE_SUPPORTED then Else Endif NEW ALGORITHM ------------- IO_SKIP_FILE: If (SKIPFILE_SUPPORTED) then If (FORCE_ALLOWFAST) then Else If (ENABLE_ALLOWFAST) then If (IO$M_ALLOWFAST set for IO$_SKIPFILE function code) then Else Endif Else Endif Endif Else Endif Total Work to MKDRIVER ---------------------- - Add two bit definition to UCB - Add one FDT routine and associated bit definitions - Change code in IO_SKIP_FILE routine to support new algorithm Work outside MKDRIVER --------------------- - Utility to enable,disable and force skip by filemarks for IO$_SKIPFILE - Modifications to OpenVMS utilites such as BACKUP and MTAACP to use IO$M_ALLOWFAST whenever possible. - Documentation of skip by filemarks behaviour with respect to tape positioning for new algorithm and how to use the IO$M_ALLOWFAST modifier and MT$M_FASTSKIP_USED return indication. By default the new interface, IO$M_ALLOWFAST modifier will be enabled and the skip by filemarks default in IO$_SKIPFILE will be disabled. When a user wants to run an old application with the skip by filemarks feature, he will run the utility with the FORCE_ALLOWFAST setting. IO$_SKIPFILE calls from all applications to the drive will now be performed as skip by filemarks until the utility is used to disable the feature. When a user has a new application which uses the IO$M_ALLOWFAST modifier and desires to revert to the old functionality due to non-standard media, he must do the following. First he will run the utility with the ALLOWFAST_OFF setting to disable all skip by filemark operations. The application will revert to using skip by record with the IO$_SKIPFILE interface. Running the utility with the ENABLE_ALLOWFAST setting will return the functionality back to the boot up settings of using skip by filemarks only when the IO$M_ALLOWFAST modifier is present. Additional Issues arising from Design Review -------------------------------------------- 1) The utility/setmode interface must have some level of privilege checking prior to changing the skip by filemark settings. 2) The utility must check that the device is a local MK device (not a served MK device) before issuing the IO$_SETMODE with the skip by filemarks modifiers. 3) A further investigation into the effect of this design on served tapes is needed. 4) Some method (SHOW MAGTAPE for example) should be present for indicating the state of the SKIPFILE_SUPPORTED bit in UCB$L_MK_FLAGS.