Olaf Hering <[EMAIL PROTECTED]> wrote: > On Wed, Aug 06, Jim Meyering wrote: > >> Olaf Hering <[EMAIL PROTECTED]> wrote: >> >> > On Wed, Aug 06, Jim Meyering wrote: >> > >> >> I agree wholeheartedly that arch-specific #ifdefs are best >> >> avoided, but am a little leery of removing O_DIRECT altogether. >> >> However, I'm currently leaning towards accepting this. >> >> Has this change been tested much? >> > >> > Its a result of this bug, the patch is used since one year. >> > >> > https://bugzilla.novell.com/show_bug.cgi?id=290087 >> >> Thanks. >> It's reassuring to know it's gotten some exposure. >> >> Can I expect you to adjust your patch to detect >> fsync and close failures? > > How should it handle the failures? > parted cant do anything about the error in practice.
Parted should report the write error, and propagate the failure "up" the call tree. Any time Parted ignores a write failure, that is a potential for serious data loss. An obvious bug. The hard part (given the current implementation) is making a write failure translate to a parted exit status that is nonzero. For now, if you would at least make it diagnose any failure, that'd be enough. For example, _do_fsync detects fsync failure and reports it. Speaking of _do_fsync, the added fsync calls in your patch end up being redundant with the fsync call performed by _do_fsync in some code paths, but that's probably not worth worrying about. _______________________________________________ bug-parted mailing list bug-parted@gnu.org http://lists.gnu.org/mailman/listinfo/bug-parted