From: Zdenek Kabelac <zkabelac@redhat.com>
To: Khazhy Kumykov <khazhy@chromium.org>,
Mikulas Patocka <mpatocka@redhat.com>
Cc: Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Joe Thornber <thornber@redhat.com>,
Heinz Mauelshagen <heinzm@redhat.com>,
dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] dm ioctl: fix erroneous EINVAL when signaled
Date: Mon, 22 Jul 2024 11:52:14 +0200 [thread overview]
Message-ID: <011a15cb-1f9e-456e-9374-5bca382d4e81@redhat.com> (raw)
In-Reply-To: <CACGdZYKbdyALADEMDV+Vg+eog+UjjgGigEpmJTSKw_64RM8rbA@mail.gmail.com>
Dne 17. 07. 24 v 21:52 Khazhy Kumykov napsal(a):
> On Wed, Jul 17, 2024 at 12:45 PM Mikulas Patocka <mpatocka@redhat.com> wrote:
>> Hi
>>
>> I am wondering why does do_resume need to call dm_suspend at all. Does
>> anyone here remember why is this code path needed?
> In our case, we have a sequence with load_table followed by a resume,
> with no suspend first. The resume path suspends if needed, swaps
> tables, then resumes. Removing the suspend here would break existing
> userspace, I'd imagine. It seems like minimizing the suspended time
> would also be a nice benefit.
lvm2 maintainer POV
Automatic 'suspend' for resume is a kernel 'feature' that should not be
normally used from the userspace. Userspace is supposed to call 'suspend'
- handle error cases - eventually drop preloaded table and resume existing
table that should work.
If userspace is using ONLY 'resume' without calling suspend upfront - there
are some unsolvable error cases.
So no - 'minimizing' suspend time is NOT the main reason here. The only
valid reason to use it is basically if you are admin and you need to reload
table for a device you are running from - in this case calling 'dmsetup
suspend' might leave your system in 'blocked' state since your rootfs will be
'frozen/suspend' and you would have no chance to call 'dmsetup resume'.
lvm2 app is locking itself in the RAM in this critical section so it can
proceed with regular sequence: 'write metadata - preload DM - suspend DM -
commit metadata - resume DM' which basicall all userland apps should be using.
Regards
Zdenek
prev parent reply other threads:[~2024-07-22 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 18:56 Khazhismel Kumykov
2024-07-17 19:44 ` Mikulas Patocka
2024-07-17 19:52 ` Khazhy Kumykov
2024-07-17 23:18 ` [RFC PATCH v2] " Khazhismel Kumykov
2024-07-18 14:25 ` Mike Snitzer
2024-07-23 12:51 ` Mikulas Patocka
2024-07-23 13:11 ` Zdenek Kabelac
2024-07-23 17:17 ` Khazhy Kumykov
2024-07-22 9:52 ` Zdenek Kabelac [this message]
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=011a15cb-1f9e-456e-9374-5bca382d4e81@redhat.com \
--to=zkabelac@redhat.com \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=heinzm@redhat.com \
--cc=khazhy@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
--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®