[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH] Fix RHBZ 754198 (multiple dmeventd snapshot extensions)

Dne 18.11.2011 20:46, Petr Rockai napsal(a):
Zdenek Kabelac<zkabelac redhat com>  writes:

The formula above should be placed inside lvresize

And still completely besides the point.

The problem:

- to check whether anything needs to happen, lvextend needs to be
    executed (this is *expensive*, even if it decides no action needs to

- if nothing needed to happen, we don't need to call lvextend until the
    utilisation has grown; *but* we don't know whether anything happened
    (without ENO_ACTION_NEEDED that is)

But you still call dmeventd_lvm2_run() - which is the most expensive
operation here - so I do not exactly see what do you actually safe here
i.e. if the resize will not happen because according to policy it's not
yet needed - then I do not see any difference ?

Well, what can I say. I have already tried to explain how this works
(twice?), and it's also quite obvious from the code. Well, once more: we
do *not* call dmeventd_lvm2_run *if* the last lvconvert decided that
nothing needs to be done *and* the snapshot utilisation did not change
(more than 5%).

To implement that, we need to: 1) know that snapshot utilisation grew
(we know this already in the existing code) and 2) that lvconvert did
not change anything. We don't know 2 and wrongly assume that nothing
changes, ever (that's the bug).

Were we to assume every time that lvconvert might have changed
something, we would have to call it *every time* (every 10 seconds).

Is it clear now?

Well my assumption is:

while  {
  read percentage
  if converted && current_percent < last_time_percent
        last_time_percent = current_percent
        converted = 0
  else if current_percent >= (last_time_percent + 5%)
        converted = 1
	wait 10sec


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]