Browse Prior Art Database

Handling of "Fclear" System Call for a Mapped File

IP.com Disclosure Number: IPCOM000062189D
Original Publication Date: 1986-Oct-01
Included in the Prior Art Database: 2005-Mar-09
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Duvall, KE: AUTHOR [+2]

Abstract

By providing special handling of the "fclear" system call in a mapped file environment, efficient handling and relatively transparent implementation of the call is provided. Special handling is required for the UNIX* "fclear" system call when a file is currently mapped (Virtual Memory Manager (VMM) mapping of a virtual memory segment to disk blocks of a file, to let Virtual Resource Manager (VRM) perform required disk I/O). The fclear system call is supposed to "zero" the number of bytes specified starting from the current file position of the file and to return full blocks of zeros to the file system, thereby constructing "holes".

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 69% of the total text.

Page 1 of 1

Handling of "Fclear" System Call for a Mapped File

By providing special handling of the "fclear" system call in a mapped file environment, efficient handling and relatively transparent implementation of the call is provided. Special handling is required for the UNIX* "fclear" system call when a file is currently mapped (Virtual Memory Manager (VMM) mapping of a virtual memory segment to disk blocks of a file, to let Virtual Resource Manager (VRM) perform required disk I/O). The fclear system call is supposed to "zero" the number of bytes specified starting from the current file position of the file and to return full blocks of zeros to the file system, thereby constructing "holes". One restriction which is required when the fclear system call is used with a mapped file is that no Copy-on-Write segments exist for the file, since clearing may, in this case, cause the undesired release of modified Copy-on-Write pages. If one or more Copy-on-Write segments exist for a file, an error message is returned if an fclear system call is invoked. The method used for the handling of the fclear UNIX system call, when the file corresponding to the specified file descriptor is mapped, is as follows: 1. The segment range is unmapped (from the current file position), and rounded up to a 2K (page) boundary to the current position plus the number of bytes specified, thereby unmapping, via UnMap VRM Supervisor Call (SVC) all pages corresponding to disk blocks subject to clearing. 2....