lkml.org 
[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] md: make devices disappear when they are no longer needed.
On Mon, Nov 24, 2008 at 03:47:51PM +1100, Neil Brown wrote:

> > What lifetime rules do you really want? I never liked the tricks pulled
> > by md wrt gendisk lifetimes and that might be a good time to sort that
> > out for good...
>
> I'm not sure what 'tricks' you are referring to. Can you elaborate?
>
> I want the gendisk to appear as soon as it is needed (not because I
> think that is necessarily a good idea, but it is legacy functionality that I
> don't think we can easily discard). And I want them to disappear when
> they contain no information and have nothing referring to them.

"Tricks" are about md_probe() and weird allocation time for these suckers.
But OK, legacy API is a good argument.

So you want the rules of the same nature as for module refcount? Then
the natural place to do that would be in failure exit of __blkdev_get()
and in normal path in blkdev_put() (for the final opener going away).

However, let's try to do it right - there's a *lot* of drivers where
we do no work in ->release() until it's the final one. It would be
nice to accomodate them as well while we are at it...


\
 
 \ /
  Last update: 2008-11-24 07:41    [W:0.053 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site