zfs/lib/libzpool
Ricardo M. Correia 2c79a2fa6a Fix a few zdb bugs when trying to open a pool
Specifically, the following bugs are fixed in this patch:

1) zdb wasn't getting the correct device size when the vdev is a
block device.  In Solaris, fstat64() returns the device size but
in Linux an ioctl() is needed.

2) We were opening block devices with O_DIRECT, which caused pread64()
to fail with EINVAL due to memory alignment issues.  This was fixed by
the previous umem cache alignment fix in stub implementation to align
objects correctly.  But we still needed to add a check for the error here.

3) We also make sure that we don't try to open a block device in write
mode in userspace.  This shouldn't happen, because zdb opens devices
in read-only mode, and ztest only uses files.
2010-03-10 12:03:48 -08:00
..
include Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-03-09 12:30:18 -08:00
Makefile.am Build system and packaging (RPM support) (Part 2) 2009-03-10 21:13:30 -07:00
kernel.c Fix a few zdb bugs when trying to open a pool 2010-03-10 12:03:48 -08:00
taskq.c Clean up emulation of kernel threads in userspace. 2010-03-09 12:25:28 -08:00
util.c Merge branch 'gcc-shadow' into refs/top-bases/gcc-branch 2008-12-17 11:36:16 -08:00