All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jilin Yuan <yuanjilin@cdjrlc.com>,
	Nikos Tsironis <ntsironis@arrikto.com>,
	Shaomin Deng <dengshaomin@cdjrlc.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Nathan Huckleberry <nhuck@google.com>,
	linux-block@vger.kernel.org, dm-devel@redhat.com,
	Mikulas Patocka <mpatocka@redhat.com>,
	Genjian Zhang <zhanggenjian@kylinos.cn>,
	Milan Broz <gmazyland@gmail.com>,
	Alasdair G Kergon <agk@redhat.com>,
	Jiangshan Yi <yijiangshan@kylinos.cn>
Subject: Re: [git pull] device mapper changes for 6.1
Date: Tue, 18 Oct 2022 17:13:09 -0400	[thread overview]
Message-ID: <Y08W5Tj1YC8/BZDM@redhat.com> (raw)
In-Reply-To: <CAHk-=wiE_p66JtpfsM2GMk0ctuLcP+HBuNOEnpZRY0Ees8oFXw@mail.gmail.com>

On Tue, Oct 18 2022 at  3:19P -0400,
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Tue, Oct 18, 2022 at 11:54 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > But no, we absolutely do *not* want to emulate that particular horror
> > anywhere else.
> 
> Side note: if DM people go "Hmm, a lot of our management really does
> have the exact same issues as 'mount()' and friends, and doing the
> same things as mount does with the whole string interface and logging
> sounds like a good idea", I want to nip that in the bud.
> 
> It's most definitely *not* a good idea. The mount thing is nasty, it's
> just that we've always had the odd string interface, and it's just
> grown from "const void *data" to be a whole complicated set of context
> handling.
> 
> So don't even think about duplicating that thing.
> 
> Now, if some "inspired" person then thinks that instead of duplicating
> it, you really would want to do device mapper *as* a filesystem and
> actually using the fsconfig() model directly and natively, that is at
> least conceptually not necessarily wrong. At what point does a
> "translate disk blocks and munge contents" turn from "map devices into
> other devices" to a "map devices into a filesystem"? We've had loop
> devices forever, and they already show how filesystems and block
> devices can be a mixed concept.
> 
> And no, I'm not seriously suggesting that as a "do this instead".
> 
> I'm just saying that from an interface standpoint, we _do_ have an
> interface that is kind of doing this, and that is already an area
> where a lot of people think there is a lot of commonalities (ie a
> number of filesystems end up doing their own device mapping
> internally, and people used to say "layering violation - please use dm
> for that" before they got used/resigned to it because the filesystem
> people really wanted to control the mapping).
> 
> In the absence of that kind of unification, just use 'errno'.

Mikulas touches on why why using errno isn't useful for DM. And for
DM's device stacking it is hard to know which error spewed to dmesg
(via DMERR, DMCRIT, DMINFO, etc) is relevant to a particular admin
interface issuing the DM ioctl.

So the idea to send the (hopefully useful) error string back up to the
relevant userspace consumer was one task that seemed needed (based on
Milan Broz's various complaints against DM.. which sprang from your
regular remainder that DM's version numbers are broken and need to be
removed/replaced).

Making DM errors more useful to the endpoints causing them was dealt
with head-on with a couple small changes in this pull request. I
didn't think sending useful error strings to userspace was such a
contested design point.

All said, we'll have a look at dealing with your suggested fsconfig
unification (but it seems really awkward on the surface, maybe we can
at least distill out some subset that is common).

Mike


WARNING: multiple messages have this Message-ID (diff)
From: Mike Snitzer <snitzer@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-block@vger.kernel.org,
	Shaomin Deng <dengshaomin@cdjrlc.com>,
	Nikos Tsironis <ntsironis@arrikto.com>,
	Mike Snitzer <snitzer@kernel.org>,
	Nathan Huckleberry <nhuck@google.com>,
	Christoph Hellwig <hch@infradead.org>,
	dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Genjian Zhang <zhanggenjian@kylinos.cn>,
	Jilin Yuan <yuanjilin@cdjrlc.com>,
	Milan Broz <gmazyland@gmail.com>,
	Alasdair G Kergon <agk@redhat.com>,
	Jiangshan Yi <yijiangshan@kylinos.cn>
Subject: Re: [dm-devel] [git pull] device mapper changes for 6.1
Date: Tue, 18 Oct 2022 17:13:09 -0400	[thread overview]
Message-ID: <Y08W5Tj1YC8/BZDM@redhat.com> (raw)
In-Reply-To: <CAHk-=wiE_p66JtpfsM2GMk0ctuLcP+HBuNOEnpZRY0Ees8oFXw@mail.gmail.com>

On Tue, Oct 18 2022 at  3:19P -0400,
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Tue, Oct 18, 2022 at 11:54 AM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > But no, we absolutely do *not* want to emulate that particular horror
> > anywhere else.
> 
> Side note: if DM people go "Hmm, a lot of our management really does
> have the exact same issues as 'mount()' and friends, and doing the
> same things as mount does with the whole string interface and logging
> sounds like a good idea", I want to nip that in the bud.
> 
> It's most definitely *not* a good idea. The mount thing is nasty, it's
> just that we've always had the odd string interface, and it's just
> grown from "const void *data" to be a whole complicated set of context
> handling.
> 
> So don't even think about duplicating that thing.
> 
> Now, if some "inspired" person then thinks that instead of duplicating
> it, you really would want to do device mapper *as* a filesystem and
> actually using the fsconfig() model directly and natively, that is at
> least conceptually not necessarily wrong. At what point does a
> "translate disk blocks and munge contents" turn from "map devices into
> other devices" to a "map devices into a filesystem"? We've had loop
> devices forever, and they already show how filesystems and block
> devices can be a mixed concept.
> 
> And no, I'm not seriously suggesting that as a "do this instead".
> 
> I'm just saying that from an interface standpoint, we _do_ have an
> interface that is kind of doing this, and that is already an area
> where a lot of people think there is a lot of commonalities (ie a
> number of filesystems end up doing their own device mapping
> internally, and people used to say "layering violation - please use dm
> for that" before they got used/resigned to it because the filesystem
> people really wanted to control the mapping).
> 
> In the absence of that kind of unification, just use 'errno'.

Mikulas touches on why why using errno isn't useful for DM. And for
DM's device stacking it is hard to know which error spewed to dmesg
(via DMERR, DMCRIT, DMINFO, etc) is relevant to a particular admin
interface issuing the DM ioctl.

So the idea to send the (hopefully useful) error string back up to the
relevant userspace consumer was one task that seemed needed (based on
Milan Broz's various complaints against DM.. which sprang from your
regular remainder that DM's version numbers are broken and need to be
removed/replaced).

Making DM errors more useful to the endpoints causing them was dealt
with head-on with a couple small changes in this pull request. I
didn't think sending useful error strings to userspace was such a
contested design point.

All said, we'll have a look at dealing with your suggested fsconfig
unification (but it seems really awkward on the surface, maybe we can
at least distill out some subset that is common).

Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel


  reply	other threads:[~2022-10-18 21:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 16:20 [git pull] device mapper changes for 6.1 Mike Snitzer
2022-10-18 16:20 ` [dm-devel] " Mike Snitzer
2022-10-18 18:17 ` Christoph Hellwig
2022-10-18 18:17   ` [dm-devel] " Christoph Hellwig
2022-10-18 18:48   ` Mike Snitzer
2022-10-18 18:48     ` [dm-devel] " Mike Snitzer
2022-10-20  8:16     ` Christoph Hellwig
2022-10-20  8:16       ` Christoph Hellwig
2022-10-20 11:44       ` Mikulas Patocka
2022-10-20 11:44         ` Mikulas Patocka
2022-10-18 18:54   ` Linus Torvalds
2022-10-18 18:54     ` [dm-devel] " Linus Torvalds
2022-10-18 19:19     ` Linus Torvalds
2022-10-18 19:19       ` [dm-devel] " Linus Torvalds
2022-10-18 21:13       ` Mike Snitzer [this message]
2022-10-18 21:13         ` Mike Snitzer
2022-10-18 22:11         ` Milan Broz
2022-10-18 22:11           ` [dm-devel] " Milan Broz
2022-10-18 22:18           ` Linus Torvalds
2022-10-18 22:18             ` [dm-devel] " Linus Torvalds
2022-10-18 20:28     ` Mikulas Patocka
2022-10-18 20:28       ` [dm-devel] " Mikulas Patocka
2022-10-18 22:17       ` Linus Torvalds
2022-10-18 22:17         ` [dm-devel] " Linus Torvalds
2022-10-19  6:18     ` Jason A. Donenfeld
2022-10-19  6:18       ` [dm-devel] " Jason A. Donenfeld
2022-10-20  8:17     ` Christoph Hellwig
2022-10-20  8:17       ` Christoph Hellwig

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=Y08W5Tj1YC8/BZDM@redhat.com \
    --to=snitzer@redhat.com \
    --cc=agk@redhat.com \
    --cc=dengshaomin@cdjrlc.com \
    --cc=dm-devel@redhat.com \
    --cc=gmazyland@gmail.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=nhuck@google.com \
    --cc=ntsironis@arrikto.com \
    --cc=snitzer@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yijiangshan@kylinos.cn \
    --cc=yuanjilin@cdjrlc.com \
    --cc=zhanggenjian@kylinos.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.