public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland <devzero@web.de>
To: Hannes Reinecke <hare@suse.de>,
	Reindl Harald <h.reindl@thelounge.net>,
	linux-raid@vger.kernel.org
Subject: Re: status of bugzilla #99171 - mdraid broken for O_DIRECT
Date: Thu, 10 Oct 2024 09:29:59 +0200	[thread overview]
Message-ID: <24498365-34bb-4296-a725-2bd80e226bdd@web.de> (raw)
In-Reply-To: <ca607ec6-708c-4340-b8b1-05576b92dd88@suse.de>

thank you for clearing things up.

 >Which means that the test case is actually invalid; you either would
need drop O_DIRECT or modify the buffer
 >after write() to arrive with a valid example.

ok, but what about running virtual machines in O_DIRECT mode on top of
mdraid then ?

https://forum.proxmox.com/threads/zfs-on-debian-or-mdadm-softraid-stability-and-reliability-of-zfs.116871/post-505697

i have not seen any report of broken/inconsistent mdraid caused by
virtual machines, so is this just a "theoretical" issue ?

i'm curious why we can use zfs software raid with virtual machines but
not md software raid.     shouldn't that have the same problem  (
https://www.phoronix.com/news/OpenZFS-Direct-IO ) , at least from now on ?

regards
Roland


Am 10.10.24 um 08:53 schrieb Hannes Reinecke:
> On 10/9/24 23:38, Reindl Harald wrote:
>>
>> Am 09.10.24 um 22:08 schrieb Roland:
>>> as proxmox hypervisor does not offer mdadm software raid at
>>> installation
>>> time because of this bugticket
>>>
>>> "MD RAID or DRBD can be broken from userspace when using O_DIRECT"
>>> https://bugzilla.kernel.org/show_bug.cgi?id=99171
>>>
>>> ps:
>>> also see "qemu cache=none should not be used with mdadm"
>>> https://bugzilla.proxmox.com/show_bug.cgi?id=5235
>> that all sounds like terrible nosense
>>
>> if "Yes. O_DIRECT is really fundamentally broken. There's just no way
>> to fix it sanely. Except by teaching people not to use it, and making
>> the normal paths fast enough" it has to go away
>>
>> it's not acceptable that userspace can break the integrity of the
>> underlying RAID - period
>>
> Take deep breath everyone.
> Nothing has happened, nothing has been broken.
> All systems continue to operate as normal.
>
> If you look closely at the mentioned bug, you'll find that it does
> modify the buffer at random times, in particular while it's being
> written to disk.
> Now, the boilerplate text for O_DIRECT says: the application is in
> control of the data, and the data will be written without any caching.
> Applying that to our testcase it means that the application _can_ modify
> the data, even if it's in the process of being written to disk (zero
> copy and all that).
> We do guarantee that data is consistent once I/O is completed (here:
> once 'write' returns), but we do not (and, in fact, cannot) guarantee
> that data is consistent while write() is running.
>
> Which means that the test case is actually invalid; you either would
> need drop O_DIRECT or modify the buffer after write() to arrive with
> a valid example.
>
> That doesn't mean that I don't agree with the comments about O_DIRECT.
>
> Cheers,
>
> Hannes

  reply	other threads:[~2024-10-10  7:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 20:08 status of bugzilla #99171 - mdraid broken for O_DIRECT Roland
2024-10-09 21:38 ` Reindl Harald
2024-10-10  6:53   ` Hannes Reinecke
2024-10-10  7:29     ` Roland [this message]
2024-10-10  8:34       ` Hannes Reinecke
2025-10-11 19:25         ` Roland
2025-10-13  6:48           ` Hannes Reinecke
2025-10-13 19:06             ` Roland
     [not found]             ` <6fb3e2cb-8eeb-4e76-9364-16348d807784@web.de>
2025-10-14  6:31               ` Hannes Reinecke
     [not found] <A4168F21-4CDF-4BAD-8754-30BAA1315C6F@web.de>
2025-10-14 20:14 ` Roland
2025-10-15  6:56   ` Hannes Reinecke
2025-10-15 23:09     ` Roland
2025-10-16  6:02       ` Hannes Reinecke
2025-10-17 20:18         ` Roland
2025-10-20  6:44           ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=24498365-34bb-4296-a725-2bd80e226bdd@web.de \
    --to=devzero@web.de \
    --cc=h.reindl@thelounge.net \
    --cc=hare@suse.de \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox