tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DISKLABEL_EI option for system with MBR



I don't really have any objections, but I would like to clarify the scope of what is being proposed.

1. Does this allow only processing of disk labels that are (a) already
   written in opposite-endian format?  Or does it also (b) provide a
   mechanism to write _new_ labels in opposite-endian format, too?

   If the answer is (a), is this sufficient?  Or would (b) be a
   desirable feature?

2. Does this affect (c) only the disklabel(8) stuff?  Or does it also
   (d) affect the MBR itself (the stuff handled by fdisk(8))?

   Again, is (c) sufficient, or should we also do (d)?

3. Do wedges still work?  Does the patch allow opposite-endian for
   the wedge configuration data?


And a couple of side questions:

4. Where on the physical device is the wedge configuration saved,
   anyway?)

5. Does the current FFS_EI allow for creation of opposite-endian
   file systems?  I don't see any endian option for newfs(8).




On Sun, 12 Feb 2017, Rin Okuyama wrote:

Hi,

I'd like to add DISKLABEL_EI kernel option, cf tech-kern/51208:

 http://gnats.netbsd.org/51208

Currently, we have FFS_EI and LFS_EI kernel options, that enable us to
mount UFS partitions written in the different byte order. However,
unfortunately, the system does not recognize disklabels written in the
different byte order.

The patch attached to tech-kern/51208 adds DISKLABEL_EI option for ports
using MBR. By this option, the system can mount the disk (image) written
in the different byte order. This should be useful for cross building.
For bi-endian architectures, like evbarm, the little and big endian
partitions can share a same disk by this option.

The patch seems almost trivial; if we encounter the disklabel written in
the different byte order, swap its order. The main patch is only ~250
lines including the manpage (The PR is very long since it also contains
the patch for kernel configuration files; it adds DISKLABEL_EI option
commented out except for ALL on amd64 and i386). Currently, this option
is restricted to ports with MBR. However, porting it to other ports may
also be trivial if someone needs.

I'd like to commit this patch if there's no objection (and enable it for
GENERIC kernels on i386 and amd64). Any comments?

Thanks,
rin

!DSPAM:589fc752228511883645587!



+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index