Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2012 17:40:32 +0200
From:      Marius Strobl <marius@alchemy.franken.de>
To:        "Andrey V. Elsukov" <ae@FreeBSD.org>
Cc:        freebsd-hackers <freebsd-hackers@FreeBSD.org>, Marius Strobl <marius@FreeBSD.org>, freebsd-current <freebsd-current@FreeBSD.org>, Pawel Jakub Dawidek <pjd@FreeBSD.org>, Andriy Gapon <avg@FreeBSD.org>
Subject:   Re: [CFC/CFT] large changes in the loader(8) code
Message-ID:  <20120716154032.GA63893@alchemy.franken.de>
In-Reply-To: <50040271.5000301@FreeBSD.org>
References:  <4FE9B01C.30306@yandex.ru> <5003EBAB.6030507@FreeBSD.org> <5003F39D.6030808@FreeBSD.org> <5003F589.40603@FreeBSD.org> <5003F79E.1060706@FreeBSD.org> <5003FB9D.90909@FreeBSD.org> <50040271.5000301@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120716154032.GA63893>