Linux raw device 裸设备
┌────────────────────────────────────────────────────────── RAW driver (/dev/raw/rawN)
│ The raw driver permits block devices to be bound to /dev/raw/rawN.
│ Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O.
│ See the raw(8) manpage for more details. │
│ Applications should preferably open the device (eg /dev/hda1)
│ with the O_DIRECT flag.
- Once bound to a block device, a raw device can be opened, read and
written, just like the block device it is bound to. However, the raw
device does not behave exactly like the block device. In particular,
access to the raw device bypasses the kernel's block buffer cache
entirely: all I/O is done directly to and from the address space of the
process performing the I/O. If the underlying block device driver can
support DMA, then no data copying at all is required to complete the
Because raw I/O involves direct hardware access to a process's memory,
a few extra restrictions must be observed. All I/Os must be correctly
aligned in memory and on disk: they must start at a sector offset on
disk, they must be an exact number of sectors long, and the data buffer
in virtual memory must also be aligned to a multiple of the sector
size. The sector size is 512 bytes for most devices. 
- Starting with the Linux 2.6 kernel, raw devices are being ph