[parted-devel] Failure with O_DIRECT
Michael Brennan
brennan.brisad at gmail.com
Thu Jul 5 17:23:09 UTC 2007
Sorry I accidentally mailed you instead of the list first,
I've CC'd this one.
On Thu, Jul 05, 2007 at 01:59:28PM -0300, Otavio Salvador wrote:
> "Michael Brennan" <brennan.brisad at gmail.com> writes:
>
> > On 7/4/07, Otavio Salvador <otavio at debian.org> wrote:
> > > Have you tested with lastest 2.4 series too?
> >
> > 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.
>
> Ok, right.
>
> > I did some research about it and looks like we're not suppose to use
> > O_DIRECT but madvice or posix_fadvice.
> >
> > 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?
>
> Probably to avoid possible corruption due a poweroff and like.
I'm probably missing something, but, if a power failure happens in the
middle of an unbuffered write, wouldn't that do more damage than if
the write is still in the buffers and haven't been synced yet?
>
> > 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.
>
> The only risk I can think is when a freeze or a poweroff happens but
> we might output an warning on those cases and then move to
> posix_fadvice.
Output a warning on which cases?
>
> It need to be checked ...
>
More information about the parted-devel
mailing list