O que aconteceu com / dev / raw /?

5

Estou lendo um artigo sobre o LWN e tem uma declaração importante:

Raw devices (/dev/raw/rawN) are a special case of O_DIRECT I/O. These devices can be opened without specifying O_DIRECT, but still provide direct I/O semantics. As such, all of the same rules apply to raw devices that apply to files (or devices) opened with O_DIRECT.

Isso se refere ao que hoje é /dev/sda e poucos outros?

    
por ArekBulski 26.10.2015 / 23:39

1 resposta

8

Não, /dev/raw é diferente do dispositivo de bloco convencional /dev/sda . De acordo com O subsistema Linux 2.4 SCSI HOWTO: Capítulo 11. Dispositivos brutos :

A raw device can be bound to an existing block device (e.g. a disk) and be used to perform "raw" IO with that existing block device. Such "raw" IO bypasses the caching that is normally associated with block devices. Hence a raw device offers a more "direct" route to the physical device and allows an application more control over the timing of IO to that physical device. This makes raw devices suitable for complex applications like Database Management Systems that typically do their own caching.

Raw devices are character devices (major number 162). The first minor number (i.e. 0) is reserved as a control interface and is usually found at /dev/rawctl. A utility called raw (see man raw) can be used to bind a raw device to an existing block device. These "existing block devices" may be disks or cdroms/dvds whose underlying interface can be anything supported by Linux (e.g. IDE/ATA or SCSI).

Além das informações no HOWTO, existem outras fontes para ler:

por 26.10.2015 / 23:47

Tags