?? raw.8
字號:
.\" -*- nroff -*-.TH RAW 8 "Aug 1999" "Version 0.1".SH NAMEraw \- bind a Linux raw character device.SH SYNOPSIS.B raw.I /dev/raw/raw<N> <major> <minor>.PP.B raw.I /dev/raw/raw<N> /dev/<blockdev>.PP.B raw.B \-q.I /dev/raw/raw<N>.PP.B raw.B \-qa.SH DESCRIPTION.B rawis used to bind a Linux raw character device to a block device. Anyblock device may be used: at the time of binding, the device driver doesnot even have to be accessible (it may be loaded on demand as a kernelmodule later)..PP.B rawis used in two modes: it either sets raw device bindings, or it queriesexisting bindings. When setting a raw device,.I /dev/raw/raw<N>is the device name of an existing raw device node in the filesystem.The block device to which it is to be bound can be specified either interms of its.I majorand.I minordevice numbers, or as a path name.I /dev/<blockdev>to an existing block device file..PPThe bindings already in existence can be queried with the .I \-qoption, with is used either with a raw device filename to query that onedevice, or with the .I \-aoption to query all bound raw devices..PPUnbinding can be done by specifying major and minor 0..PPOnce bound to a block device, a raw device can be opened, read andwritten, just like the block device it is bound to. However, the rawdevice does not behave exactly like the block device. In particular,access to the raw device bypasses the kernel's block buffer cacheentirely: all I/O is done directly to and from the address space of theprocess performing the I/O. If the underlying block device driver cansupport DMA, then no data copying at all is required to complete theI/O..PPBecause raw I/O involves direct hardware access to a process's memory, afew extra restrictions must be observed. All I/Os must be correctlyaligned in memory and on disk: they must start at a sector offset ondisk, they must be an exact number of sectors long, and the data bufferin virtual memory must also be aligned to a multiple of the sectorsize. The sector size is 512 bytes for most devices..SH OPTIONS.TP.B -qSet query mode..B rawwill query an existing binding instead of setting a new one..TP.B -aWith.B -q, specifies that all bound raw devices should be queried..TP.B -hprovides a usage summary..SH BUGSThe Linux .B dd(1) command does not currently align its buffers correctly, and socannot be used on raw devices..PPRaw I/O devices do not maintain cache coherency with the Linux blockdevice buffer cache. If you use raw I/O to overwrite data already inthe buffer cache, the buffer cache will no longer correspond to thecontents of the actual storage device underneath. This is deliberate,but is regarded either a bug or a feature depending on who you ask!.SH AUTHORStephen Tweedie (sct@redhat.com)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -