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

Re: [dm-devel] [patch] dm-mpath pg_init could race with destructor



On 2005-06-15T13:21:34, Mike Christie <michaelc cs wisc edu> wrote:

> >Why send a pg_init request at this point if there are no queued ios?
> >This was in fact my solution, to only send a pg_init io if there are
> >queued ios.
> >
> Are there management situations where some admin wants to manually 
> switch. If he was going to take a controller temporarily offline for 
> maitnenance for example? Will multipath tools and dm-mutlipath be used 
> to do this type of management, or will it be some vendor specific tool 
> that sends a SG_IO directly?

I don't think that's a real problem. We will switch the group, but just
on the first IO.

That had already happened anyway (because otherwise no
process_queued_ios() would have been queued). The only place where this
really makes a difference is the queue_work() in presuspend: here, a
process_queued_ios() would be qeueued even if no IO was pending, which
could lead to a pg_init being issued, and then the object being free'd -
bang.

> It would not be possible to just have dm-multipath increment some 
> refcount like pending so you cannot destroy things while a pg_init IO is 
> in flight would it?

See my other mails.

The problem is indeed that the DM multipath's internal operations are
not accounted for in the top-level struct mapped_device pending field.
However, trying to get at that from within dm-mpath.c is non-trivial and
a major conceptual change, it appears.

It's sort-of related to "try to give a sane log message from within
dm-mpath, which actually mentions the map / dm dev we belong to".  The
trigger_event() "fix" is also very much related.

The layering is pretty well isolated, which is good, but can make such
changes difficult.

Long-term, that fix will be needed: DM personalities need to be more
involved in their reference counting. 


Sincerely,
    Lars Marowsky-Brée <lmb suse de>

-- 
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"


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