zfs/lib
Brian Behlendorf ff3510c1a5 Fix zpool_read_label()
The zpool_read_label() function was subtly broken due to a
difference of behavior in fstat64(2) on Solaris vs Linux.

Under Solaris when a block device is stat'ed the st_size
field will contain the size of the device in bytes.  Under
Linux this is only true for regular file and symlinks.  A
compatibility function called fstat64_blk(2) was added
which can be used when the Solaris behavior is required.

This flaw was never noticed because the only time we would
need to use the device size is when the first two labels
are damaged.  I noticed this issue while adding the
zpool_clear_label() function which is similar in design
and does require us to write all the labels.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2013-07-09 16:02:04 -07:00
..
libavl Remove autotools products 2012-08-27 11:47:44 -07:00
libefi Remove autotools products 2012-08-27 11:47:44 -07:00
libnvpair Illumos #2619 and #2747 2013-01-08 10:35:35 -08:00
libshare Add smb_available() sanity checks 2013-04-02 09:27:52 -07:00
libspl Illumos #3006 2013-06-19 15:14:10 -07:00
libunicode Remove autotools products 2012-08-27 11:47:44 -07:00
libuutil Remove autotools products 2012-08-27 11:47:44 -07:00
libzfs Fix zpool_read_label() 2013-07-09 16:02:04 -07:00
libzpool Use taskq for dump_bytes() 2013-05-06 14:05:42 -07:00
Makefile.am Let libnvpair be linked independently of libzfs. 2012-02-07 11:37:15 -08:00