DragonFly bugs List (threaded) for 2009-02
DragonFly BSD
DragonFly bugs List (threaded) for 2009-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue998] Unconfiguring a vn while it is mounted


From: "Stathis Kamperis \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 02 Feb 2009 04:59:19 +0000

Stathis Kamperis <ekamperi@gmail.com> added the comment:

On second thoughts, this kind of check should be done in the level of vn(4)
driver itself, under the detach ioctl. By the way, I've been stumbling through
freebsd's repository and they have deprecated vn(4)/vnconfig(8) in favor of
md/mdconfig. md seems to do the right thing:

	case MDIOCDETACH:
		if (mdio->md_mediasize != 0 ||
		    (mdio->md_options & ~MD_FORCE) != 0)
			return (EINVAL);

		sc = mdfind(mdio->md_unit);
		if (sc == NULL)
			return (ENOENT);
		if (sc->opencount != 0 && !(sc->flags & MD_FORCE) &&
		    !(mdio->md_options & MD_FORCE))
			return (EBUSY);
		return (mddestroy(sc, td));

Where do we stand ?

Best regads,
Stathis Kamperis

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue998>
_____________________________________________________



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