On Mon, Jul 16, 2012 at 04:00:49PM +0400, Andrey V. Elsukov wrote: > On 16.07.2012 15:31, Andriy Gapon wrote: > >> Yes. It should work as before. > > > > Well, but it's obvious that zfs_probe_dev would be attempting to do some > > unneeded > > stuff (trying to treat partitions as disks) for that case. To me this is a > > clear > > indication zfs_probe_dev is not optimal for arch-independent > > implementation. So I > > still think that arch_zfs_probe should decide what disks and partitions to > > probe, > > and zfs_probe_dev should only probe what it's given and not try to be any > > smarter. > > But I've repeated myself three times already :-) > > And we will have the same - several copies of the same code in each > architecture, > which i have deleted... > > Sparc doesn't support DIOCGMEDIASIZE and DIOCGSECTORSIZE ioctls, > so it will not check each partition, only fd that is passed to the > zfs_probe_dev. > > Currently there is only one problem with ZFS tasting, that can affect users - > now we taste each disk and partition, but in the my branch ZFS tastes only > disks and > partitions with type "freebsd" and "freebsd-zfs". So if you have created ZFS > on top > of MBR partition with type "ntfs", then loader will be unable to detect it. >
Sorry, I'm missing the big picture of ZFS support in the loader and currently unfortunately don't have the time to look into it or your patches. I don't think there's a way to determine the media and sector sizes without actually looking at the Sun and/or VTOC8 labels though. As for zfs_probe_dev, some user recently indicated that on sparc64 we should rather look at the disk devices listed in the "boot-device" environment variable in order to mimic what Solaris does rather than trying to probe anything that might be a disk device, mimicking what the FreeBSD/i386 ZFS loader does. Maybe that's a hint whether a arch_zfs_probe should exist. I can test patches once you guys have figures out how things should work though. Marius _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"