Commit Graph

15363 Commits

Author SHA1 Message Date
Brian Behlendorf 6d103301db Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2009-10-26 10:48:14 -07:00
Brian Behlendorf 8d572c1231 Merge commit 'refs/top-bases/linux-docs' into linux-docs 2009-10-26 10:48:12 -07:00
Brian Behlendorf 5fbb2c1c4e Test configs for md, dm, and ramdisk style block devices
For the sake of completeness we need to validate everything works
well not just on IDE or SCSI drives.  But we need to verify a
zpool configured on top of the Linux virtual block devices.
These scripts simply that testing process, and have shown that
while everything is good on top of a ram disk.  Right now the
code base panics the kernel when layered on top of either an
md or dm style device.  For the moment don't do that.
2009-10-26 10:41:06 -07:00
Brian Behlendorf 1a42b319f6 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2009-10-23 16:33:22 -07:00
Brian Behlendorf 29c9a2518c Properly handle block devices other the IDE and SCSI disks.
Based on the block device type we can expect a specific naming
convention.  With this in mind update efi_get_info() to be more
aware of the type when parsing out the partition number.  In,
addition be aware that all block device types are not partitionable.
Finally, when attempting to lookup a device partition by appending
the partition number to the whole device take in to account the
kernel naming scheme.  If the last character of the device name
is a digit the partition will always be 'p#' instead of just '#'.
2009-10-23 16:25:16 -07:00
Brian Behlendorf 8e29b5ee40 Merge branch 'linux-have-idmap' into refs/top-bases/linux-zfs-branch 2009-10-23 12:29:23 -07:00
Brian Behlendorf 5abf80d80c Merge commit 'refs/top-bases/linux-have-idmap' into linux-have-idmap 2009-10-23 12:29:21 -07:00
Brian Behlendorf 0606b493b6 Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2009-10-23 12:29:16 -07:00
Brian Behlendorf 74ca5bf341 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2009-10-23 12:29:14 -07:00
Brian Behlendorf dc181aaf0d Merge branch 'linux-have-zpl' into refs/top-bases/linux-zfs-branch 2009-10-23 12:29:09 -07:00
Brian Behlendorf a227047d89 Merge commit 'refs/top-bases/linux-have-zpl' into linux-have-zpl
Conflicts:

	cmd/zfs/zfs_main.c
2009-10-23 12:29:02 -07:00
Brian Behlendorf 9340733eca Merge branch 'linux-unused' into refs/top-bases/linux-zfs-branch 2009-10-23 12:28:35 -07:00
Brian Behlendorf b9106752d0 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2009-10-23 12:28:32 -07:00
Brian Behlendorf 6057cdc6e1 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2009-10-23 12:28:27 -07:00
Brian Behlendorf a37c7f64a0 Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2009-10-23 12:28:25 -07:00
Brian Behlendorf 8668bfb590 Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2009-10-23 12:28:20 -07:00
Brian Behlendorf 0800b2df23 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2009-10-23 12:28:18 -07:00
Brian Behlendorf e8e3a8ae70 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2009-10-23 12:28:12 -07:00
Brian Behlendorf 8a34963bec Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2009-10-23 12:28:10 -07:00
Brian Behlendorf 576d515d07 Merge branch 'linux-symbol-collisions' into refs/top-bases/linux-zfs-branch 2009-10-23 12:28:05 -07:00
Brian Behlendorf 2188dc7f55 Merge commit 'refs/top-bases/linux-symbol-collisions' into linux-symbol-collisions 2009-10-23 12:28:03 -07:00
Brian Behlendorf 1a6c86bffe Merge branch 'linux-legacy' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:58 -07:00
Brian Behlendorf 1c1d1a3fcb Merge commit 'refs/top-bases/linux-legacy' into linux-legacy 2009-10-23 12:27:56 -07:00
Brian Behlendorf 14126e76f0 Merge branch 'linux-kernel-mem' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:50 -07:00
Brian Behlendorf 7c87446ab8 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2009-10-23 12:27:48 -07:00
Brian Behlendorf 12c261e3e3 Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:42 -07:00
Brian Behlendorf 905511438f Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2009-10-23 12:27:41 -07:00
Brian Behlendorf 9b253c7d02 Merge branch 'linux-have-zvol' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:35 -07:00
Brian Behlendorf a80dbfac27 Merge commit 'refs/top-bases/linux-have-zvol' into linux-have-zvol 2009-10-23 12:27:33 -07:00
Brian Behlendorf 035c422869 Merge branch 'linux-have-uio-rw' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:28 -07:00
Brian Behlendorf 96c5798564 Merge commit 'refs/top-bases/linux-have-uio-rw' into linux-have-uio-rw 2009-10-23 12:27:26 -07:00
Brian Behlendorf 3d65c20fa9 Merge commit 'refs/top-bases/linux-debug-zerocopy' into linux-debug-zerocopy 2009-10-23 12:27:25 -07:00
Brian Behlendorf de4b36e469 Merge branch 'linux-have-sysevent' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:16 -07:00
Brian Behlendorf c66219eb6a Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2009-10-23 12:27:14 -07:00
Brian Behlendorf d55c2a6511 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-10-23 12:27:13 -07:00
Brian Behlendorf 2f3b1e0416 Merge branch 'linux-have-spl-debug' into refs/top-bases/linux-zfs-branch 2009-10-23 12:27:04 -07:00
Brian Behlendorf 3c70cf68ca Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2009-10-23 12:27:02 -07:00
Brian Behlendorf ea1f909ba2 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2009-10-23 12:26:56 -07:00
Brian Behlendorf 561015d399 Merge commit 'refs/top-bases/linux-have-mntent' into linux-have-mntent 2009-10-23 12:26:54 -07:00
Brian Behlendorf e61024445b Merge branch 'linux-have-fm' into refs/top-bases/linux-zfs-branch 2009-10-23 12:26:49 -07:00
Brian Behlendorf b84f236a38 Merge commit 'refs/top-bases/linux-have-fm' into linux-have-fm 2009-10-23 12:26:47 -07:00
Brian Behlendorf a56b8d337f Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch
Conflicts:

	cmd/zfs/zfs_main.c
2009-10-23 12:25:33 -07:00
Brian Behlendorf 8d3be9d6b8 Merge commit 'refs/top-bases/linux-docs' into linux-docs 2009-10-23 12:24:39 -07:00
Brian Behlendorf 74b67983f1 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-10-23 12:24:39 -07:00
Brian Behlendorf edb22b6a3e Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-10-23 12:24:38 -07:00
Brian Behlendorf 53fcde4a48 Merge commit 'refs/top-bases/gcc-branch' into gcc-branch 2009-10-23 12:24:37 -07:00
Brian Behlendorf d8d360724d Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2009-10-23 12:24:37 -07:00
Brian Behlendorf 24f3d6e49e Misc fixed based on testing with the dragon config.
In check_disk() we should only check the entire device if it
not a whole disk.  It is a whole disk with an EFI label on it,
it is possible that libblkid will misidentify the device as a
filesystem.  I had a case yesterday where 2 bytes in the EFI
GUID happened we set to the right values such that libblkid
decided there was a minux filesystem there.  If it's a whole
device we look for a EFI label.

If we are able to read the backup EFI label from a device but
the primary is corrupt.  Then don't bother trying to stat
the partitions in /dev/ the kernel will not create devices
using the backup label when the primary is damaged.

Add code to determine if we have a udev path instead of a
normal device path.  In this case use the -part# partition
naming scheme instead of the /dev/disk# scheme.  This is
important because we always want to access devices using
the full path provided at configuration time.

Readded support for zpool_relabel_disk() now that we have
the full libefi library in place we do have access to this
functionality.

Lots of additional paranoia to ensure EFI label are written
correctly.  These changes include:

1) Removing the O_NDELAY flag when opening a file descriptor
for libefi.  This flag should really only be used when you
do not intend to do any file IO.  Under Solaris only ioctl()'s
were performed under linux we do perform reads and writes.

2) Use O_DIRECT to ensure any caching is bypassed while
writing or reading the EFI labels.  This change forces the
use of sector aligned memory buffers which are allocated
using posix_memalign().

3) Add additional efi_debug error messages to efi_ioctl().

4) While doing a fsync is good to ensure the EFI label is on
disk we can, and should go one step futher by issuing the
BLKFLSBUF ioctl().  This signals the kernel to instruct the
drive to flush it's on-disk cache.

5) Because of some initial strangeness I observed in testing
with some flakey drives be extra paranoid in zpool_label_disk().
After we've written the device without error, flushed the drive
caches, correctly detected the new partitions created by the
kernel.  Then additionally read back the EFI label from user
space to make sure it is intact and correct.  I don't think we
can ever be to careful here.

NOTE: The was recently some concern expressed that writing EFI
labels from user space on Linux was not the right way to do this.
That instead two kernel ioctl()s should be used to create and
remove partitions.  After some investigation it's clear to me
using those ioctl() would be a bad idea.  The in fact don't
actually write partition tables to the disk, they only create
the partition devices in the kernel.  So what you really want
to do is write the label out from user space, then prompt the
kernel to re-read the partition from disk to create the partitions.
This is in fact exactly what newer version of parted do.
2009-10-23 11:57:59 -07:00
Brian Behlendorf 5972702242 Add two more possible uninit vars flagged by gcc. 2009-10-23 11:43:09 -07:00
Brian Behlendorf a9db62de88 Merge branch 'linux-have-idmap' into refs/top-bases/linux-zfs-branch 2009-10-21 12:04:40 -07:00