[parted-devel] Failure with O_DIRECT

Jim Meyering jim at meyering.net
Thu Jul 5 17:05:13 UTC 2007


"Michael Brennan" <brennan.brisad at gmail.com> wrote:
> Yes, I have tried the latest kernels from both 2.4 and 2.6 now and
> I found that 2.4 does not work while 2.6 works fine.
>
> I did some research about it and looks like we're not suppose to use
>> O_DIRECT but madvice or posix_fadvice.

They have problems, too:
  http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9968/focus=9982

I have to admit that O_DIRECT has been a big hassle.

> What is the main reason this non-buffering mechanism is used in parted?
> Is it for performance?  Or something other, like reducing the risk of
> corrupting data?
> The other partitioning tools I've used seem to use normal write operations
> and then sync the disks right afterwards, on the other hand, they only write
> the partition table to disk and does not have the advanced features parted
> has.

I don't know -- I wasn't involved with parted back then.
Maybe Leslie (Cc'd) can say?



More information about the parted-devel mailing list