Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2012 14:31:41 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
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>
Subject:   Re: [CFC/CFT] large changes in the loader(8) code
Message-ID:  <5003FB9D.90909@FreeBSD.org>
In-Reply-To: <5003F79E.1060706@FreeBSD.org>
References:  <4FE9B01C.30306@yandex.ru> <5003EBAB.6030507@FreeBSD.org> <5003F39D.6030808@FreeBSD.org> <5003F589.40603@FreeBSD.org> <5003F79E.1060706@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 16/07/2012 14:14 Andrey V. Elsukov said the following:
> On 16.07.2012 15:05, Andriy Gapon wrote:
>>>> 2. I am not sure if I like the approach of moving partition tasting code into
>>>> common ZFS code (zfs.c).  On one hand, it now makes sense because the new
>>>> partition iteration code is machine-independent.  On the other hand, the reason
>>>> that I added arch_zfs_probe method was to give platforms full control over which
>>>> partitions and in what order are probed.  It seems to be important for some of them.
>>>> So, I like how your new partition interface makes it much easier to ZFS-probe
>>>> partitions, but I would prefer to have that code in arch_zfs_probe implementations
>>>> rather than in zfs_probe_dev.
>>>
>>> From the other point of view, ZFS is not a just file system and it works
>>> directly with disks and partitions. And it seems to me this code will be common
>>> for other architectures.
>>
>> Well, it seems that you haven't yet touched sparc64_zfs_probe.
> 
> 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 :-)

> But if Marius can suggest how to change ofw_disk.c to get disk size and sector size,
> then i will be able to break something here :)
> 
>> If you'll find that you don't have to use any ugly hacks there, then good.
>> But my impression is that it would be easier to stick to the previous approach.
> 


-- 
Andriy Gapon





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