mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Illumos #3742
3742 zfs comments need cleaner, more consistent style Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Eric Schrock <eric.schrock@delphix.com> Approved by: Christopher Siden <christopher.siden@delphix.com> References: https://www.illumos.org/issues/3742 illumos/illumos-gate@f717074149 Ported-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #1775 Porting notes: 1. The change to zfs_vfsops.c was dropped because it involves zfs_mount_label_policy, which does not exist in the Linux port.
This commit is contained in:
committed by
Brian Behlendorf
parent
e49f1e20a0
commit
d3cc8b152e
+18
-19
@@ -150,6 +150,7 @@ struct sa_os {
|
||||
|
||||
/*
|
||||
* header for all bonus and spill buffers.
|
||||
*
|
||||
* The header has a fixed portion with a variable number
|
||||
* of "lengths" depending on the number of variable sized
|
||||
* attribues which are determined by the "layout number"
|
||||
@@ -158,29 +159,27 @@ struct sa_os {
|
||||
#define SA_MAGIC 0x2F505A /* ZFS SA */
|
||||
typedef struct sa_hdr_phys {
|
||||
uint32_t sa_magic;
|
||||
uint16_t sa_layout_info; /* Encoded with hdrsize and layout number */
|
||||
/*
|
||||
* Encoded with hdrsize and layout number as follows:
|
||||
* 16 10 0
|
||||
* +--------+-------+
|
||||
* | hdrsz |layout |
|
||||
* +--------+-------+
|
||||
*
|
||||
* Bits 0-10 are the layout number
|
||||
* Bits 11-16 are the size of the header.
|
||||
* The hdrsize is the number * 8
|
||||
*
|
||||
* For example.
|
||||
* hdrsz of 1 ==> 8 byte header
|
||||
* 2 ==> 16 byte header
|
||||
*
|
||||
*/
|
||||
uint16_t sa_layout_info;
|
||||
uint16_t sa_lengths[1]; /* optional sizes for variable length attrs */
|
||||
/* ... Data follows the lengths. */
|
||||
} sa_hdr_phys_t;
|
||||
|
||||
/*
|
||||
* sa_hdr_phys -> sa_layout_info
|
||||
*
|
||||
* 16 10 0
|
||||
* +--------+-------+
|
||||
* | hdrsz |layout |
|
||||
* +--------+-------+
|
||||
*
|
||||
* Bits 0-10 are the layout number
|
||||
* Bits 11-16 are the size of the header.
|
||||
* The hdrsize is the number * 8
|
||||
*
|
||||
* For example.
|
||||
* hdrsz of 1 ==> 8 byte header
|
||||
* 2 ==> 16 byte header
|
||||
*
|
||||
*/
|
||||
|
||||
#define SA_HDR_LAYOUT_NUM(hdr) BF32_GET(hdr->sa_layout_info, 0, 10)
|
||||
#define SA_HDR_SIZE(hdr) BF32_GET_SB(hdr->sa_layout_info, 10, 6, 3, 0)
|
||||
#define SA_HDR_LAYOUT_INFO_ENCODE(x, num, size) \
|
||||
|
||||
Reference in New Issue
Block a user