From: Mikulas Patocka <mpatocka@redhat.com>
To: John Garry <john.g.garry@oracle.com>, Joe Thornber <thornber@redhat.com>
Cc: Mike Snitzer <snitzer@hammerspace.com>,
axboe@kernel.dk, agk@redhat.com, hch@lst.de,
martin.petersen@oracle.com, linux-block@vger.kernel.org,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 0/5] device mapper atomic write support
Date: Tue, 7 Jan 2025 19:56:17 +0100 (CET) [thread overview]
Message-ID: <5a24c8ca-bd0f-6cd0-a3f0-09482a562efe@redhat.com> (raw)
In-Reply-To: <ca18486a-a171-43a9-b0ff-638a8ed3c882@oracle.com>
On Tue, 7 Jan 2025, John Garry wrote:
> On 07/01/2025 17:13, Mikulas Patocka wrote:
> > On Mon, 6 Jan 2025, John Garry wrote:
> >
> > BTW. could it be possible to add dm-mirror support as well? dm-mirror is
> > used when the user moves the logical volume to another physical volume, so
> > it would be nice if this worked without resulting in not-supported errors.
> >
> > dm-mirror uses dm-io to perform the writes on multiple mirror legs (see
> > the function do_write() -> dm_io()), I looked at the code and it seems
> > that the support for atomic writes in dm-mirror and dm-io would be
> > straightforward.
>
> FWIW, we do support atomic writes for md raid1. The key principle is that we
> atomically write to each disk. Obviously we cannot write to multiple disks
> atomically. So the copies in each mirror may be out-of-sync after an
> unexpected power fail, but that is ok as either will have all of old or new
> data, which is what we guarantee.
Yes - something like that can be implemented for dm-mirror too.
> > Another possibility would be dm-snapshot support, assuming that the atomic
> > i/o size <= snapshot chunk size, the support should be easy - i.e. just
> > pass the flag REQ_ATOMIC through. Perhaps it could be supported for
> > dm-thin as well.
>
> Do you think that there will be users for these?
>
> atomic writes provide guarantees for users, and it would be hard to detect
> when these guarantees become broken through software bugs. I would be just
> concerned that we enable atomic writes for many of these more complicated
> personalities, and they are not actively used and break.
>
> Thanks,
> John
dm-snapshot is not much used, but dm-thin is. I added Joe to the
recipients list, so that he can decide whether dm-thin should support
atomic writes or not.
Mikulas
next prev parent reply other threads:[~2025-01-07 18:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 12:41 John Garry
2025-01-06 12:41 ` [PATCH 1/5] block: Ensure start sector is aligned for stacking atomic writes John Garry
2025-01-06 15:36 ` Christoph Hellwig
2025-01-06 12:41 ` [PATCH RFC 2/5] block: Change blk_stack_atomic_writes_limits() unit_min check John Garry
2025-01-06 15:37 ` Christoph Hellwig
2025-01-06 12:41 ` [PATCH RFC 3/5] dm-table: Atomic writes support John Garry
2025-01-06 17:49 ` Mike Snitzer
2025-01-06 18:18 ` John Garry
2025-01-06 12:41 ` [PATCH RFC 4/5] dm: Ensure cloned bio is same length for atomic write John Garry
2025-01-06 12:41 ` [PATCH RFC 5/5] dm-linear: Enable atomic writes John Garry
2025-01-06 17:26 ` [PATCH RFC 0/5] device mapper atomic write support Mike Snitzer
2025-01-06 18:14 ` John Garry
2025-01-07 17:13 ` Mikulas Patocka
2025-01-07 17:58 ` John Garry
2025-01-07 18:56 ` Mikulas Patocka [this message]
2025-01-16 11:28 ` John Garry
2025-01-16 12:59 ` Mikulas Patocka
2025-01-16 13:03 ` John Garry
2025-01-16 14:58 ` Mikulas Patocka
2025-01-16 15:01 ` John Garry
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=5a24c8ca-bd0f-6cd0-a3f0-09482a562efe@redhat.com \
--to=mpatocka@redhat.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=snitzer@hammerspace.com \
--cc=thornber@redhat.com \
/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
all inboxes | Powered by JetHome®