A system, a method, and program products for buffering data from a file in
a hierarchical data storage system allocates data buffers and buffer
management structures in memory to optimize performance of no recall
requests. Buffer management structures, such as buffer headers and hash
queue headers, are used to optimize performance of insert, search, and
data buffer reuse operations. Buffer headers are managed in a
least-recently-used queue in accordance with a relative availability
status. Buffer headers are also organized in hash queue structures in
accordance with file-based identifiers to facilitate searching for
requested data in the buffers. Data buffers can be used to buffer
different data blocks within the same file and can be recycled to buffer
data from other data blocks and other files from the secondary storage
device. Data in a data block may be reread by the requesting process or by
other processes as long as the requested data remains valid. Lock fields
are used to coordinate multi-thread and multi-user accesses.