FreeBSD ZFS
The Zettabyte File System
Data Fields

zfid_short Struct Reference

File IDs for normal filesystems. More...

#include <zfs_vfsops.h>

Data Fields

uint16_t zf_len
uint8_t zf_object [6]
 obj[i] = obj >> (8 * i)
uint8_t zf_gen [4]
 gen[i] = gen >> (8 * i)

Detailed Description

File IDs for normal filesystems.

Normal filesystems (those not under .zfs/snapshot) have a total file ID size limited to 12 bytes (including the length field) due to NFSv2 protocol's limitation of 32 bytes for a filehandle. For historical reasons, this same limit is being imposed by the Solaris NFSv3 implementation (although the NFSv3 protocol actually permits a maximum of 64 bytes). It is not possible to expand beyond 12 bytes without abandoning support of NFSv2.

For normal filesystems, we partition up the available space as follows: 2 bytes fid length (required) 6 bytes object number (48 bits) 4 bytes generation number (32 bits)

We reserve only 48 bits for the object number, as this is the limit currently defined and imposed by the DMU.

Definition at line 108 of file zfs_vfsops.h.


Field Documentation

uint8_t zfid_short::zf_gen[4]

gen[i] = gen >> (8 * i)

Definition at line 111 of file zfs_vfsops.h.

Definition at line 109 of file zfs_vfsops.h.

obj[i] = obj >> (8 * i)

Definition at line 110 of file zfs_vfsops.h.


The documentation for this struct was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines