Pointers

      MFT field mft_sptr points to the associated sf_entry.

      RLR field rlr_sptr points to the associated sf_entry.

      SAS field SAS_file_SFT contains the selector for the SFT segment table.

      NP field np_ssft points to the server SFT for a named pipe.

      NP field np_csft points to the client SFT for a named pipe.

      GDT_SFT locates the GDT descriptor for the SFT segement table.

    Locations
      Dynamically allocated from the system arena.
    VM Owner
      sft (0xffa1).

    Format

    SFT

    ┌──────────────┬──────┬──────┬────┬────────────────────────────────────┐│Field Name    │Offset│Length│Type│Description                         │
    ├──────────────┼──────┼──────┼────┼────────────────────────────────────┤
    │sft_link      │0     │2     │W   │selector for next chunk of table    │
    ├──────────────┼──────┼──────┼────┼────────────────────────────────────┤
    │sft_count     │2     │2     │W   │number of entries in this block     │
    ├──────────────┼──────┼──────┼────┼────────────────────────────────────┤
    │sft_handle    │4     │2     │W   │handle of segment holding this block│
    ├──────────────┼──────┼──────┼────┼────────────────────────────────────┤
    │sft_inshutdown│6     │2     │W   │flags for shutdown                  │
    └──────────────┴──────┴──────┴────┴────────────────────────────────────┘
    

    sf_entry

    ┌─────────────┬──────┬──────┬────┬────────────────────────────────────────┐
    │Field Name   │Offset│Length│Type│Description                             │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_ref_count │0     │2     │W   │number of processes sharing entry       │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_usercnt   │2     │2     │W   │For files: number of threads waiting for│
    │             │      │      │    │access to sf_entry. For devices: number │
    │             │      │      │    │of threads using this sf_entry.         │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │reserved     │4     │1     │B   │Used to be attr of file - moved to *    │
    │             │      │      │    │independent part of the SFT for general │
    │             │      │      │    │* access                                │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_flags     │5     │2     │W   │Bits 8-15                               │
    │             │      │      │    │Bit 15 = 1 if remote file               │
    │             │      │      │    │      = 0 if local file or device       │
    │             │      │      │    │Bit 14 = not used                       │
    │             │      │      │    │Bit 13 = Pipe bit                       │
    │             │      │      │    │Bit 12 = FCB bit                        │
    │             │      │      │    │       = 1 if fcb sft                   │
    │             │      │      │    │       = 0 if normal sft                │
    │             │      │      │    │Bit 11 = if Pipe,                       │
    │             │      │      │    │       = 0 if anonymous pipe            │
    │             │      │      │    │       = 1 if named pipe                │
    │             │      │      │    │Bit 10 == sf_inuse = sf_entry is in use │
    │             │      │      │    │by some thread, ie busy                 │
    │             │      │      │    │Bit  9 == sf_want = some thrd blocked   │
    │             │      │      │    │waiting to use the sf_entry             │
    │             │      │      │    │Bit  8 == sf_noJFN, no handle alloced   │
    │             │      │      │    │for sft                                 │
    │             │      │      │    │Bits 0-7 (old FCB_devid bits)           │
    │             │      │      │    │If remote file or local file, bit       │
    │             │      │      │    │6=0 if dirty Device ID number, bits     │
    │             │      │      │    │0-5 if local file.                      │
    │             │      │      │    │bit 7=0 for local file                  │
    │             │      │      │    │     =1 for local I/O device            │
    │             │      │      │    │     If local I/O device, bit 6=0 if EOF│
    │             │      │      │    │(input)                                 │
    │             │      │      │    │Bit 5=1 if Raw mode                     │
    │             │      │      │    │Bit 0=1 if console input device         │
    │             │      │      │    │Bit 1=1 if console output device        │
    │             │      │      │    │Bit 2=1 if null device                  │
    │             │      │      │    │Bit 3=1 if clock device                 │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_flags2    │7     │2     │W   │                                        │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_devptr    │9     │4     │D   │Not used if local file, points          │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_FSC       │D     │4     │D   │Pointer to the file system control      │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_cookie    │11    │4     │D   │server's per-file id (for oplock        │
    │             │      │      │    │support)                                │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_chain     │15    │4     │D   │16:16 Link to next SFT                  │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_MFT       │19    │4     │D   │32 bit FLAT pointer to MFT entry        │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_fsd       │1D    │32    │S   │File system dependent section           │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_fsi       │4F    │2a    │S   │File system independent section         │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_plock     │79    │2     │W   │16 bit offset to first pending LOCK     │
    │             │      │      │    │record                                  │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_NmPipeSfn │7b    │2     │W   │SFN of named pipe for spooled files     │
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_codepage  │7d    │2     │W   │current codepage (font) for data in file│
    ├─────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sf_LockID    │7f    │4     │D   │lock-id for protected file-handle access│
    └─────────────┴──────┴──────┴────┴────────────────────────────────────────┘
    

    sf_flags flag definitions

    ┌──────────┬────────┬────────────────────────────────────────┐
    │Name      │Bit Mask│Description                             │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_ISNET  │0x8000  │True if SFT is for remote               │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_PIPE   │0x2000  │Anonymous Pipe                          │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_FCB    │0x1000  │True if SFT is for an FCB               │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_NMPIPE │0x0800  │true if name pipe                       │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_INUSE  │0x0400  │True if sf entry is in use by some      │
    │          │        │thread, that is, busy                   │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_BLOCKED│0x0200  │True if some thread is blocked waiting  │
    │          │        │to use the sf entry                     │
    ├──────────┼────────┼────────────────────────────────────────┤
    │SF_NOJFN  │0x0100  │True if no handle alloc'ed for SFT      │
    └──────────┴────────┴────────────────────────────────────────┘
    

    sf_flags2 flag definitions

    ┌─────────────────────┬────────┬────────────────────────────────────────┐
    │Name                 │Bit Mask│Description                             │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SF_FORMAT_MOUNT      │0x8000  │True if a format mount was done, and    │
    │                     │        │still in effect                         │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SF_BEGINFORMAT_FAILED│0x4000  │True if a beginformat ioctl failed      │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SSF2_LDRBINARYSEM    │0x2000  │'ON' if SFT owned by some thread        │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SF_SRVRDR            │0x1000  │serving pipe redirection in effect      │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_LOCKED_DRIVE    │0x0800  │A LOCK was issued on this direct access │
    │                     │        │handle to lock the drive.               │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_SPOOLED         │0x0400  │File is spooled                         │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_DATAWRITTEN     │0x0200  │Data written to file                    │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_Consistency     │0x0180  │consistency bits                        │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_CANCELJOB       │0x0040  │spool job has been canceled*/ ;whs      │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_NONSPOOLED      │0x0020  │File is nonspooled; going to printer    │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │SFF2_STPTHINFDN      │0x0010  │SetPathInfo done, don't set archive     │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │sff2_RA_ON           │0x0008  │Readahead started                       │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │sff2_UNC             │0x0004  │UNC object                              │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │sff2_isfree          │0x0002  │this SFT is on free list (unused)       │
    ├─────────────────────┼────────┼────────────────────────────────────────┤
    │sff2_RA_BIG          │0x0001  │Big Readahead                           │
    └─────────────────────┴────────┴────────────────────────────────────────┘
    

    sfdFATFS

    ┌──────────────────┬──────┬──────┬────┬────────────────────────────────────────┐
    │Field Name        │Offset│Length│Type│Description                             │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_firFILEclus│0     │2     │W   │First cluster of file (bit 15 = 0)      │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_cluspos    │2     │2     │W   │Position of last cluster accessed       │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_lstclus    │4     │2     │W   │Last cluster accessed                   │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_dirsec     │6     │4     │D   │Sector # of directory sector for this   │
    │                  │      │      │    │file                                    │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_dirpos     │A     │1     │B   │Offset of this entry in the above       │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_EAHandle   │B     │2     │W   │starting cluster of EAs                 │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_name[11]   │D     │B     │B   │                                        │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_bRAReads   │18    │4     │D   │# of consecutive reads within range     │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_bRABigReads│1C    │4     │D   │# of consecutive big reads              │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_fldMask    │20    │4     │D   │Unique File Dirty Mask                  │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_pSFT       │24    │4     │D   │Linear address of SFT                   │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_ulNextRA   │28    │4     │D   │Position where next rahead starts       │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_bBufRun    │2C    │4     │D   │Number of sectors in rahead run         │
    ├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfdFAT_LastFATSec │30    │2     │W   │last FAT sector added to chain          │
    └──────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
    

    sftfsd

    ┌────────────┬──────┬──────┬────┬────────────┐
    │Field Name  │Offset│Length│Type│Description │
    ├────────────┼──────┼──────┼────┼────────────┤
    │sfd_work[50]│0     │32    │B   │            │
    ├────────────┼──────┼──────┼────┼────────────┤
    ├────────────┼──────┼──────┼────┼────────────┤
    │            │      │      │B   │            │
    └────────────┴──────┴──────┴────┴────────────┘
    

    sftsfi

    ┌────────────┬──────┬──────┬────┬────────────────────────────────────────┐
    │Field Name  │Offset│Length│Type│Description                             │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_mode    │0     │2     │W   │mode of access or high bit on if FCB    │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_mode2   │2     │2     │W   │additional openmode bits for DosOpen2   │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_hVPB    │4     │2     │W   │handle of volume                        │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_ctime   │6     │2     │W   │Creation time of file                   │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_cdate   │8     │2     │W   │Creation date of file                   │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_atime   │A     │2     │W   │Time of last access of file             │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_adate   │C     │2     │W   │Date of last access of file             │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_mtime   │E     │2     │W   │Time of last modification of file       │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_mdate   │10    │2     │W   │Date of last modification of file       │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_size    │12    │4     │D   │Size associated with file               │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_position│16    │4     │D   │Read/Write pointer or LRU count for FCBs│
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_UID     │1A    │2     │W   │User ID                                 │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_PID     │1C    │2     │W   │Process ID                              │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_PDB     │1E    │2     │W   │Process Data Block                      │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_selfsfn │20    │2     │W   │SFN of this sf_entry, used to speed     │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_tstamp  │22    │1     │B   │update time stamp flags; see ST_ equs   │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_type    │23    │2     │W   │file/device/named-pipe/FCB              │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │pPVDBFil    │25    │4     │D   │performance counter data block pointer  │
    ├────────────┼──────┼──────┼────┼────────────────────────────────────────┤
    │sfi_DOSattr │29    │1     │B   │DOS attributes of file(sys,hid,r/o,arch │
    └────────────┴──────┴──────┴────┴────────────────────────────────────────┘
    

    sfi_type flag definitions.

    ┌──────────────┬───────────┬────────────────────────────────────────┐
    │Name          │Bit Mask   │Description                             │
    ├──────────────┼───────────┼────────────────────────────────────────┤
    │STYPE_FILE    │0x0000     │file                                    │
    ├──────────────┼───────────┼────────────────────────────────────────┤
    │STYPE_DEVICE  │0x0001     │device                                  │
    ├──────────────┼───────────┼────────────────────────────────────────┤
    │STYPE_NMPIPE  │0x0002     │named pipe                              │
    ├──────────────┼───────────┼────────────────────────────────────────┤
    │STYPE_FCB     │0x0004     │SFT is for an FCB                       │
    └──────────────┴───────────┴────────────────────────────────────────┘
    


    [Back] [Next]