Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017



biomodified - check if a buffer is modified


#include <sys/ddi.h>
#include <sys/sunddi.h>

int biomodified(struct buf *bp);

Interface Level

Solaris DDI specific (Solaris DDI).



Pointer to the buffer header structure.


The biomodified() function returns status to indicate if the memory associated with a buf(9S) structure is modified. The biomodified () function may only be supported for some types of buf structures (like a paged-I/O request). If called on an unsupported buf structure, —1 is returned. The biomodified() function will check the memory pages associated with a buffer and determine whether the Virtual Memory system's modification bit is set. If at least one of these pages is modified, the buffer is indicated as modified. A filesystem will mark the pages unmodified when it writes the pages to the backing store. The biomodified() function can be used to detect any modifications to the memory pages while I/O is in progress.

A device driver can use biomodified() for disk mirroring. An application is allowed to mmap a file which can reside on a disk which is mirrored by multiple submirrors. If the file system writes the file to the backing store, it is written to all submirrors in parallel. It must be ensured that the copies on all submirrors are identical. The biomodified() function can be used in the device driver to detect any modifications to the buffer by the user program during the time the buffer is written to multiple submirrors.

Return Values

The biomodified() function returns the following values:


Buffer is modified.


Buffer is not modified.


Unknown whether buffer is modifiedt.


biomodified() can be called from any context.

See Also

bioaligned(9F), bp_mapin(9F), buf(9S)

Writing Device Drivers for Oracle Solaris 11.3