Oops, sorry that From: address was different from the first email...

jhb> Instead, it shouldn't be hard to get a list of configured devices
jhb> out of mdconfig via an ioctl on /dev/mdctl.  This would be the
jhb> right fix, as it would fix the general case problem you describe,
jhb> not just one instance of it.

Agreed. We can also detect 'umounted, but configured md devices' with
the output of mount(8) and a list mentioned above.

jhb> mdconfig wont' be able to tell you what file it is attached to by
jhb> filename, but it should be able to ask /dev/mdctl for a list of
jhb> devices and report at least the type of each device (swap, file,
jhb> etc.).

It maybe a stupid question (sorry I have few knowledge about kernel
internal)... Can't we add a space for filename in the structure
of md device?

It would be wonderful if 'mdconfig -l' says:

unit     mounted        type    option
0        /tmp           malloc  -s=65535,reserve
1        none           file    /home/matusita/fdimage
2        none           swap    none

or something like that. If we have a configulation file for mdconfig(8),
this output will be the same of its file format.

-- -
Makoto `MAR' MATSUSHITA


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to