[parted-devel] Failure with O_DIRECT

Jim Meyering jim at meyering.net
Wed Jul 4 14:37:24 UTC 2007


"Leslie P. Polzer" <leslie.polzer at gmx.net> wrote:
>>> sector_size is the drive's logical sector size.
>>
>> This must be a multiple of phys_sector_size, right?
>
> No, the plan is to keep logical sector sizes at 512 for
> compatibility.

Which/whose plan?
For some disks (ipods I think, and some CDs), sector_size
is already being set to 2048.

> And IIRC, ATAPI gives the physical sector size as a multiple of the
> logical.
>
>
>> ...when using a regular file (init_file), sector_size is set
>> to PED_SECTOR_SIZE_DEFAULT unconditionally, regardless of the
>> underlying file system block size.  But here, it matters for
>> O_DIRECT on losing (e.g. 2.4.x) systems.
>
> Yeah, it might be way better to make this the underlying file system's
> block size.  But beware, I don't know how well stuff currently works
> with block sizes (be they physical or logical) != 512.  Especially
> the msdos label format isn't going to take it.

:)
I know that very well.  I'm in the process of fixing it (big job!).
Nearly everything breaks via stack-smashing with sector_size > 512.



More information about the parted-devel mailing list