[ENBD] /proc/nbdinfo
Peter T. Breuer
ptb at it.uc3m.es
Thu Jan 8 01:52:31 MST 2004
"Also sprach Julien Rennard:"
> On Wed, 2004-01-07 at 17:53, Peter T. Breuer wrote:
> > write_lock(&lo->meta_lock);
> > if (atomic_read(&lo->refcnt) > 0) {
> > write_unlock(&lo->meta_lock);
> > return;
> > }
> >
> > lo->nslot = 0;
> > atomic_set(&lo->flags, 0)
> > write_unlock(&lo->meta_lock);
> Great !
> this version "work" too I'll use it as it's more secure.
OK I suspect it might also be necessary to reset the device size and
buffer size, but perhaps it doesn't matter ... with the flags zeroed,
all that kind of info will get rewritten at the next connect.
> Thank you !
> Is there still reason to not had this function in a new release ?
I have been adding the code to my development version. If you tell me
it works, I see no reason not to leave it in there!
> (I hope this is not useful only for myself :-) )
> > and see how that goes. I suspect it will make things LOOK the way you
> > want them to look. If not quite, we can get there in a couple more
> > iterations.
> I think I'll have problems with the device number limitation but for now
We'll deal with that problem when you encounter it.
> I want to see if I can use enbd the same way to "export" Cdrom drive !
Peter
More information about the ENBD
mailing list