VCache_FindBlock

Looks up data in virtual cache and can create a buffer if one is not found. Always uses EAX, ESI, and flags. If creating a buffer, ECX and EDX are also used.

Location Contents or settings
Carry flag Set if the block is not found. Clear if the block is found.
ESI contains the cache block handle if the block is found or created. Otherwise, ESI contains the value zero.
Zero flag set if the buffer is not locked.
EAX contains the address of the buffer if ESI is nonzero.

When a buffer is created, the value of its FSD private fields are set to zero.

On entry, AL contains one or more of the following options that determine how VCache_FindBlock acts:

Option Description
VCFB_Create create buffer if not found
VCFB_Hold hold buffer if found
VCFB_LowPri low priority create
VCFB_MakeMRU make buffer most recently used
VCFB_MustCreate creation must succeed if there are any clean, unheld buffers (only valid with VCFB_Create)
VCFB_RemoveFromLRU remove buffer from LRU list entirely (for buffers that will be held for a long time). Cannot be used with VCFB_MakeMRU.

Other options are obsolete and ignored.

On entry, AH contains the file system identifier.

On entry, EBX contains key1 information that includes the sector and byte #.

On entry, EDI contains key2 information that includes the volume id and file id.

NOTE: (0, 0) is not a valid key value.