[parted-devel] Failure with O_DIRECT

Gary L. Greene, Jr. greeneg at tolharadys.net
Wed Jul 4 17:52:42 UTC 2007


On Wednesday 04 July 2007 07:37:24 am Jim Meyering wrote:
> "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 remember: the industry is moving to very large sector sizes, so this 
really DOES need supported.

> > 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.
>
> _______________________________________________
> parted-devel mailing list
> parted-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/parted-devel





More information about the parted-devel mailing list