![IBM Novell 10 SP1 EAL4 Design Manual Download Page 167](http://html1.mh-extra.com/html/ibm/novell-10-sp1-eal4/novell-10-sp1-eal4_design-manual_4190246167.webp)
This extra level of indirection is needed for character devices, but not for block devices, because of the large
variety of character devices and the operations they support. The following diagram illustrates how the kernel
maps the file operations vector of the device file object to the correct set of operations routines for that device.
5.9.3 Block device driver
Block drivers provide access to the block-oriented devices that transfer data in randomly accessible, fixed-size
blocks, such as a disk drive. All I/O-to-block devices are normally buffered by the system (the only exception
is with raw devices); user processes do not perform direct I/O to these devices.
Programs operate on block devices by opening their file system entries. The file system entry contains a
major and a minor number by which the kernel identifies the device. The kernel maintains a hash table,
indexed by major and minor number, of block-device descriptors. One of the fields of the block device
descriptor is
bd_op
, which is pointer to the block_device_operations structure. The
block_device_operations
structure contains methods to
open
,
release
,
llseek
,
read
,
write
,
mmap
,
fsync
, and
ioctl
that control the block device. Each block device driver needs to implement these
block device operations for the device being driven.
The Virtual File System sets up the file object for the device and points the file operations vector to the
appropriate block device operations as follows.
155
Figure 5-77: Setup of
f_op
for character device specific file operations
Summary of Contents for Novell 10 SP1 EAL4
Page 1: ...SUSE Linux Enterprise Server 10 SP1 EAL4 High Level Design Version 1 2 1...
Page 23: ...11...
Page 29: ...17...
Page 43: ...31...
Page 54: ...42 Figure 5 8 New data blocks are allocated and initialized for an ext3 field...
Page 117: ...105 Figure 5 48 Page Address Translation and access control...
Page 125: ...113 Figure 5 54 31 bit Dynamic Address Translation with page table protection...
Page 126: ...114 Figure 5 55 64 bit Dynamic Address Translation with page table protection...
Page 172: ...160 Figure 5 79 System x SLES boot sequence...
Page 214: ...202...