All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW_DM libdm/ioctl/libdm-iface.c
Date: Fri, 16 Sep 2011 13:07:58 +0100	[thread overview]
Message-ID: <20110916120758.GB16890@agk-dp.fab.redhat.com> (raw)
In-Reply-To: <20110913151342.26443.qmail@sourceware.org>

On Tue, Sep 13, 2011 at 03:13:42PM -0000, prajnoha at sourceware.org wrote:
> 	Let's use this until we have a proper solution.

That patch is unsuitable for general release and needs to be reverted in my
opinion.

There is a fallacy in assuming that the udev problem is the only reason for the
detected failure and then installing the defensive action on unaffected code
paths.  There are cases in which repeating the remove ioctl will make no
difference and the code will continue to see EBUSY and an enforced 5 second
delay risks causing some people new problems.  But with just a little more
effort, you can obtain the best of both worlds.


Please update the patch to address the following points:

1. Currently the ioctl buffer contents are 'undefined' when the ioctl returns
an error.  I'm not happy to assume the buffer will always be unchanged if
there's an error - it should be repopulated before reuse.  (This basically
means I want the repeat loop in a higher layer of the code, or a new flag
defining...
  - Hmmm.  Mikulas - Have we just broken the BUFFER_FULL logic with
dm-ioctl-forbid-multiple-device-specifiers.patch?  Might have to revert
that kernel patch or update it only to complain if the multiple
specifiers don't all point to the same device...)

2. The repeat must be made conditional, so it only occurs in potential problem
cases i.e. filter out as many 'OK' cases as you possibly can.
- if udev is not involved (which we already know from other variables) skip
this code (easy)
- consider any other easy tests that can narrow the filtering

3. 'dmsetup remove' must not use the new behaviour by default, or you risk
affecting some people's existing scripts adversely.  Add a new cmdline switch
to enable this.  I do not think it should be enabled by default.  Keep sight of
the fact that the cases you're trying to improve involve specific *sequences*
of commands run in quick succession and there are no grounds for removing
functionality from dmsetup/libdevmapper by denying users the ability to run
individual ioctls and allowing them to handle the failures as *they* see fit.

4. We can't rule out unanticipated side-effects on the lvm2 side either,
so, while enabled by default when udev is in use, it must still be possible to
turn off the feature at run time, using an lvm.conf setting.

5. I've seen no empirical evidence yet to justify the selection of the number
of retries and the sleep time.  E.g. Please provide some base data on the length
of a typical delay/number of repeated attempts caused by a common problematic
udev rule firing to back up the numbers chosen, and consider whether 'one size
fits all' is suitable or if it needs to be tunable (is 5 seconds long enough on
a slow and loaded system?), or could it itself be triggered by something else?

Alasdair



  reply	other threads:[~2011-09-16 12:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 15:13 LVM2 ./WHATS_NEW_DM libdm/ioctl/libdm-iface.c prajnoha
2011-09-16 12:07 ` Alasdair G Kergon [this message]
2011-09-17 19:34   ` Mikulas Patocka
  -- strict thread matches above, loose matches on Subject: below --
2012-03-01 10:07 zkabelac
2012-02-15 12:17 prajnoha
2012-02-08 12:59 zkabelac
2012-02-08 11:25 zkabelac
2011-11-08 17:32 snitzer
2011-10-20 10:38 zkabelac
2011-08-11 20:49 zkabelac
2011-07-24 23:59 agk
2011-07-02  1:17 agk
2011-06-09 15:07 mbroz
2011-03-25 23:50 agk
2011-03-08 22:43 zkabelac
2011-03-01 23:27 agk
2011-02-21 16:26 snitzer
2010-08-18 13:11 prajnoha
2010-05-13 13:31 mbroz

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=20110916120758.GB16890@agk-dp.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=lvm-devel@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 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.