Commit Graph

15880 Commits

Author SHA1 Message Date
Brian Behlendorf 702a78ed33 Merge branch 'linux-have-libdiskmgt' into refs/top-bases/linux-zfs-branch 2009-10-15 09:38:51 -07:00
Brian Behlendorf 172ca0a7f1 Remove topic branch linux-have-libdiskmgt 2009-10-15 09:34:17 -07:00
Brian Behlendorf 553e366ce5 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2009-10-14 16:54:42 -07:00
Brian Behlendorf 22925be29c Add in missing header required by libefi. 2009-10-14 16:50:26 -07:00
Brian Behlendorf c4726e7ad2 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2009-10-14 16:32:16 -07:00
Brian Behlendorf ef2618aff8 Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2009-10-14 16:32:15 -07:00
Brian Behlendorf 992be351d5 Changes required to integrate libefi in to Linux.
The major change here is to fix up libefi to be linux aware.  For
the most part this wasn't too hard but there were a few major issues.

First off I needed to handle the DKIOCGMEDIAINFO and DKIOCINFO ioctls.
There is no direct equivilant for these ioctls under linux.  To handle
this I added wrapper functions which under Solaris simple call the ioctls.
But under Linux dig around the system a little bit getting the needed
info to fill in the requested structures.

Secondly the efi_ioctl() call was adapted such that under linux it directly
read or writes out the partition table.  Under Solaris this work was
handed off to the kernel via an ioctl.  In the efi_write() case we also
ensure we prompt the kernel via BLKRRPART to re-scan the new partition
table.  The libefi generated partition tables are correct but older
versions of ~parted-1.8.1 can not read them without a small patch.
The kernel and fdisk are able to read them just fine.

Thirdly efi_alloc_and_init() which is used by zpool to determine if a
device is a 'wholedisk' was updated to be linux aware.  This check is
performed by using the partition number for the device, which the
partition number is 0 on linux it is a 'wholedisk'.  However, certain
device type such as the loopback and ram disks needed to be excluded
because they do not support partitioning.

Forthly the zpool command was made symlink aware so it can correctly
resolve udev entries such as /dev/disk/by-*/*.  This symlinks are
fully expanded ensuring all block devices are recognized.  When a
when a 'wholedisk' block device is detected we now properly write
out an efi label and place zfs in the first partition (0th slice).
This partition is created 1MiB in to the disk to ensure it is aligned
nicely with all high end block devices I'm aware of.

This all works for me now but it did take quite a bit of work to get
it all sorted out.  It would not surprise me if certain special cases
were missed so we should keep any eye of for any odd behavior.
2009-10-14 16:07:48 -07:00
Brian Behlendorf 18eee5d03f Fix sector size and capacity calculation.
Remove the hard coded 512 byte SECTOR_SIZE and replace it with
bdev_hardsect_size() to get the correct hardware sector size.

Usage of get_capacity() was incorrect.  We the block_device
references a partition we need to return bdev->part->nr_sects.
If get_capacity() is used the entire device size will be returned
ignoring partition information.  This is however the correct thing
to do when the block device in question has not partition table.
2009-10-14 16:02:51 -07:00
Brian Behlendorf a09b94a91b Merge branch 'linux-have-idmap' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:43 -07:00
Brian Behlendorf a5761f04b8 Merge commit 'refs/top-bases/linux-have-idmap' into linux-have-idmap 2009-10-14 15:59:42 -07:00
Brian Behlendorf bb33ac4da0 Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:36 -07:00
Brian Behlendorf 2bd515bc2d Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2009-10-14 15:59:34 -07:00
Brian Behlendorf d8fbc78d5c Merge branch 'linux-have-zpl' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:28 -07:00
Brian Behlendorf c56b485f66 Merge commit 'refs/top-bases/linux-have-zpl' into linux-have-zpl 2009-10-14 15:59:26 -07:00
Brian Behlendorf 3c721bdb5c Merge branch 'linux-unused' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:20 -07:00
Brian Behlendorf 9e729be801 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2009-10-14 15:59:18 -07:00
Brian Behlendorf f4f805a70e Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:13 -07:00
Brian Behlendorf 84ed1fee34 Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2009-10-14 15:59:11 -07:00
Brian Behlendorf 94a5685acf Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2009-10-14 15:59:05 -07:00
Brian Behlendorf 1e5d0220d0 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-14 15:59:03 -07:00
Brian Behlendorf 3123078236 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:57 -07:00
Brian Behlendorf 245e7692f7 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2009-10-14 15:58:55 -07:00
Brian Behlendorf b180dca0dd Merge branch 'linux-symbol-collisions' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:49 -07:00
Brian Behlendorf b93439e1b0 Merge commit 'refs/top-bases/linux-symbol-collisions' into linux-symbol-collisions 2009-10-14 15:58:47 -07:00
Brian Behlendorf 406570c631 Merge branch 'linux-legacy' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:41 -07:00
Brian Behlendorf b75b8901fe Merge commit 'refs/top-bases/linux-legacy' into linux-legacy 2009-10-14 15:58:39 -07:00
Brian Behlendorf c1d9ed33ed Merge branch 'linux-kernel-mem' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:33 -07:00
Brian Behlendorf 1c4a603c81 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2009-10-14 15:58:31 -07:00
Brian Behlendorf 09881de4cf Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:25 -07:00
Brian Behlendorf 772839efe9 Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2009-10-14 15:58:23 -07:00
Brian Behlendorf c7fbdc94ce Merge branch 'linux-have-zvol' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:18 -07:00
Brian Behlendorf 3cbe396819 Merge commit 'refs/top-bases/linux-have-zvol' into linux-have-zvol 2009-10-14 15:58:16 -07:00
Brian Behlendorf 217e2a5d12 Merge branch 'linux-have-uio-rw' into refs/top-bases/linux-zfs-branch 2009-10-14 15:58:10 -07:00
Brian Behlendorf 2780404133 Merge commit 'refs/top-bases/linux-have-uio-rw' into linux-have-uio-rw 2009-10-14 15:58:08 -07:00
Brian Behlendorf e675e57f26 Merge commit 'refs/top-bases/linux-debug-zerocopy' into linux-debug-zerocopy 2009-10-14 15:58:07 -07:00
Brian Behlendorf 2490638a83 Merge branch 'linux-have-sysevent' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:57 -07:00
Brian Behlendorf 35e54ecb43 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2009-10-14 15:57:55 -07:00
Brian Behlendorf ae4e1bef0f Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-10-14 15:57:54 -07:00
Brian Behlendorf ee650bf43e Merge branch 'linux-have-spl-debug' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:44 -07:00
Brian Behlendorf 85e24818d4 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2009-10-14 15:57:42 -07:00
Brian Behlendorf 01744f9ee5 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:36 -07:00
Brian Behlendorf db77dd0e60 Merge commit 'refs/top-bases/linux-have-mntent' into linux-have-mntent 2009-10-14 15:57:34 -07:00
Brian Behlendorf 5a3aae2aa8 Merge branch 'linux-have-libdiskmgt' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:29 -07:00
Brian Behlendorf 293fe80262 Merge commit 'refs/top-bases/linux-have-libdiskmgt' into linux-have-libdiskmgt 2009-10-14 15:57:27 -07:00
Brian Behlendorf 0524e50889 Merge branch 'linux-have-fm' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:21 -07:00
Brian Behlendorf b368c0b19e Merge commit 'refs/top-bases/linux-have-fm' into linux-have-fm 2009-10-14 15:57:19 -07:00
Brian Behlendorf aa587c8437 Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2009-10-14 15:57:13 -07:00
Brian Behlendorf 5c86e9cad6 Merge commit 'refs/top-bases/linux-docs' into linux-docs 2009-10-14 15:57:11 -07:00
Brian Behlendorf 085ed9fe82 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-10-14 15:57:10 -07:00
Brian Behlendorf cb678c0b31 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-10-14 15:57:09 -07:00