7 Jun 2012 01:54
Enabling wedge autodiscovery on vnd disks
Brian Buhrow <buhrow <at> lothlorien.nfbcal.org>
2012-06-06 23:54:50 GMT
2012-06-06 23:54:50 GMT
hello. In researching a recent bug under NetBSD-5, I discovered the desire to make wedges work with vnd disks. While the ability for these devices to deal with wedge ioctls was added by riz some time ago, the ability to have wedges autodiscovered when the vnd is configured was not. The below patch does this. If a gpt disk partition is defined on the vnd file when the vnd is configured, then it will be attached to the dk driver. For example, if I do: vnconfig -c vnd0 testfs Then I see the following from the kernel: vnd0: GPT GUID: ea0f421c-b028-11e1-8bf0-00c04f140374 dk0 at vnd0: ea0f42bc-b028-11e1-8bf0-00c04f140374 dk0: 202685 blocks at 34, type: ffs If I then unconfigure the vnd, I see: dk0 at vnd0 (ea0f42bc-b028-11e1-8bf0-00c04f140374) deleted If there is no gpt partition on a vnd file, then behavior of the vnd is as it was before this change. When the dk driver is active, only the raw partition of the vnd is accessible. Is there any reason I shouldn't commit this change? Would folks be interested in pullups to the NetBSD-6 and NetBSD-5 branches? -thanks -Brian Index: vnd.c =================================================================== RCS file: /cvsroot/src/sys/dev/vnd.c,v retrieving revision 1.220(Continue reading)
RSS Feed