mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 18:11:00 +03:00
ff3510c1a5
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> |
||
---|---|---|
.. | ||
libzfs_changelist.c | ||
libzfs_config.c | ||
libzfs_dataset.c | ||
libzfs_diff.c | ||
libzfs_fru.c | ||
libzfs_graph.c | ||
libzfs_import.c | ||
libzfs_iter.c | ||
libzfs_mount.c | ||
libzfs_pool.c | ||
libzfs_sendrecv.c | ||
libzfs_status.c | ||
libzfs_util.c | ||
Makefile.am |