FreeBSD ZFS
The Zettabyte File System
Data Fields

zfid_long Struct Reference

File IDs for snapshot filesystems. More...

#include <zfs_vfsops.h>

Collaboration diagram for zfid_long:
Collaboration graph
[legend]

Data Fields

zfid_short_t z_fid
uint8_t zf_setid [6]
 obj[i] = obj >> (8 * i)
uint8_t zf_setgen [2]
 gen[i] = gen >> (8 * i)

Detailed Description

File IDs for snapshot filesystems.

Filesystems under .zfs/snapshot have a total file ID size of 22 bytes (including the length field). This makes files under .zfs/snapshot accessible by NFSv3 and NFSv4, but not NFSv2.

For files under .zfs/snapshot, 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) 6 bytes objset id (48 bits) 4 bytes currently just zero (32 bits)

We reserve only 48 bits for the object number and objset id, as these are the limits currently defined and imposed by the DMU.

Definition at line 132 of file zfs_vfsops.h.


Field Documentation

Definition at line 133 of file zfs_vfsops.h.

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

Definition at line 135 of file zfs_vfsops.h.

uint8_t zfid_long::zf_setid[6]

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

Definition at line 134 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