tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: write alignment matters?
On Jun 27, 2011, at 10:59 , David Holland wrote:
> On Sat, Jun 25, 2011 at 08:57:30PM +0200, Johnny Billquist wrote:
>> I might be confused here. I thought that if you accessed the block
>> device, you were restricted to blocks. So you can in fact not seek
>> to an arbitrary byte, nor read an arbitrary length, like for a
>> normal file, but instead offsets and sizes must be multiples of the
>> block size.
>>
>> But reading through the man-pages now, I cannot find any references
>> to this, so maybe I just dreamt that whole thing?
>
> That's what I'd thought too... fwiw.
Yes, I'm afraid you've been mislead by the name of the driver type. Through the
block interface to a disk drive, you can seek and read or write any arbitrary
byte within the partition specified by the device node numbers, and the buffer
cache and underlying device driver takes care of reading that block, modifying
the bytes you ask for, and writing it back.
Erik <fair%clock.org@localhost>
Home |
Main Index |
Thread Index |
Old Index