Direct I/O; O_Direct - Red Hat ENTERPRISE LINUX 5 - GLOBAL FILE SYSTEM Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - GLOBAL FILE SYSTEM:
Table of Contents

Advertisement

Flag
Parameter
-h
-J
MegaBytes
-j
Number
-T
-q
-V
-v
Table 3.4. GFS-specific Options Available When Adding Journals

3.9. Direct I/O

Direct I/O is a feature of the file system whereby file reads and writes go directly from the applications
to the storage device, bypassing the operating system read and write caches. Direct I/O is used only
by applications (such as databases) that manage their own caches.
An application invokes direct I/O by opening a file with the O_DIRECT flag. Alternatively, GFS can
attach a direct I/O attribute to a file, in which case direct I/O is used regardless of how the file is
opened.
When a file is opened with O_DIRECT, or when a GFS direct I/O attribute is attached to a file, all I/O
operations must be done in block-size multiples of 512 bytes. The memory being read from or written
to must also be 512-byte aligned.
One of the following methods can be used to enable direct I/O on a file:

• O_DIRECT

• GFS file attribute
• GFS directory attribute
3.9.1. O_DIRECT
If an application uses the O_DIRECT flag on an open() system call, direct I/O is used for the opened
file.
Description
Help. Displays short usage message.
Specifies the size of the new journals in megabytes.
Default journal size is 128 megabytes. The minimum
size is 32 megabytes. To add journals of different sizes
to the file system, the gfs_jadd command must be
run for each size journal. The size specified is rounded
down so that it is a multiple of the journal-segment size
that was specified when the file system was created.
Specifies the number of new journals to be added by the
gfs_jadd command. The default value is 1.
Test. Do all calculations, but do not write any data to the
disk and do not add journals to the file system. Enabling
this flag helps discover what the gfs_jadd command
would have done if it were run without this flag. Using
the -v flag with the -T flag turns up the verbosity level
to display more information.
Quiet. Turns down the verbosity level.
Displays command version information.
Turns up the verbosity of messages.
Direct I/O
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Global file system

Table of Contents