+/*
+ * XXX this value needs to be raised - 3893388
+ */
+#define ATTR_MAX_BUFFER 8192
+
+/*
+ * VOL_CAP_FMT_PERSISTENTOBJECTIDS: When set, the volume has object IDs
+ * that are persistent (retain their values even when the volume is
+ * unmounted and remounted), and a file or directory can be looked up
+ * by ID. Volumes that support VolFS and can support Carbon File ID
+ * references should set this bit.
+ *
+ * VOL_CAP_FMT_SYMBOLICLINKS: When set, the volume supports symbolic
+ * links. The symlink(), readlink(), and lstat() calls all use this
+ * symbolic link.
+ *
+ * VOL_CAP_FMT_HARDLINKS: When set, the volume supports hard links.
+ * The link() call creates hard links.
+ *
+ * VOL_CAP_FMT_JOURNAL: When set, the volume is capable of supporting
+ * a journal used to speed recovery in case of unplanned shutdown
+ * (such as a power outage or crash). This bit does not necessarily
+ * mean the volume is actively using a journal for recovery.
+ *
+ * VOL_CAP_FMT_JOURNAL_ACTIVE: When set, the volume is currently using
+ * a journal for use in speeding recovery after an unplanned shutdown.
+ * This bit can be set only if VOL_CAP_FMT_JOURNAL is also set.
+ *
+ * VOL_CAP_FMT_NO_ROOT_TIMES: When set, the volume format does not
+ * store reliable times for the root directory, so you should not
+ * depend on them to detect changes, etc.
+ *
+ * VOL_CAP_FMT_SPARSE_FILES: When set, the volume supports sparse files.
+ * That is, files which can have "holes" that have never been written
+ * to, and are not allocated on disk. Sparse files may have an
+ * allocated size that is less than the file's logical length.
+ *
+ * VOL_CAP_FMT_ZERO_RUNS: For security reasons, parts of a file (runs)
+ * that have never been written to must appear to contain zeroes. When
+ * this bit is set, the volume keeps track of allocated but unwritten
+ * runs of a file so that it can substitute zeroes without actually
+ * writing zeroes to the media. This provides performance similar to
+ * sparse files, but not the space savings.
+ *
+ * VOL_CAP_FMT_CASE_SENSITIVE: When set, file and directory names are
+ * case sensitive (upper and lower case are different). When clear,
+ * an upper case character is equivalent to a lower case character,
+ * and you can't have two names that differ solely in the case of
+ * the characters.
+ *
+ * VOL_CAP_FMT_CASE_PRESERVING: When set, file and directory names
+ * preserve the difference between upper and lower case. If clear,
+ * the volume may change the case of some characters (typically
+ * making them all upper or all lower case). A volume that sets
+ * VOL_CAP_FMT_CASE_SENSITIVE should also set VOL_CAP_FMT_CASE_PRESERVING.
+ *
+ * VOL_CAP_FMT_FAST_STATFS: This bit is used as a hint to upper layers
+ * (especially Carbon) that statfs() is fast enough that its results
+ * need not be cached by those upper layers. A volume that caches
+ * the statfs information in its in-memory structures should set this bit.
+ * A volume that must always read from disk or always perform a network
+ * transaction should not set this bit.
+ *
+ * VOL_CAP_FMT_2TB_FILESIZE: If this bit is set the volume format supports
+ * file sizes larger than 4GB, and potentially up to 2TB; it does not
+ * indicate whether the filesystem supports files larger than that.
+ *
+ * VOL_CAP_FMT_OPENDENYMODES: When set, the volume supports open deny
+ * modes (e.g. "open for read write, deny write"; effectively, mandatory
+ * file locking based on open modes).
+ *
+ * VOL_CAP_FMT_HIDDEN_FILES: When set, the volume supports the UF_HIDDEN
+ * file flag, and the UF_HIDDEN flag is mapped to that volume's native
+ * "hidden" or "invisible" bit (which may be the invisible bit from the
+ * Finder Info extended attribute).
+ *
+ * VOL_CAP_FMT_PATH_FROM_ID: When set, the volume supports the ability
+ * to derive a pathname to the root of the file system given only the
+ * id of an object. This also implies that object ids on this file
+ * system are persistent and not recycled. This is a very specialized
+ * capability and it is assumed that most file systems will not support
+ * it. Its use is for legacy non-posix APIs like ResolveFileIDRef.
+ *
+ * VOL_CAP_FMT_NO_VOLUME_SIZES: When set, the volume does not support
+ * returning values for total data blocks, available blocks, or free blocks
+ * (as in f_blocks, f_bavail, or f_bfree in "struct statfs"). Historically,
+ * those values were set to 0xFFFFFFFF for volumes that did not support them.
+ *
+ * VOL_CAP_FMT_DECMPFS_COMPRESSION: When set, the volume supports transparent
+ * decompression of compressed files using decmpfs.
+ *
+ * VOL_CAP_FMT_64BIT_OBJECT_IDS: When set, the volume uses object IDs that
+ * are 64-bit. This means that ATTR_CMN_FILEID and ATTR_CMN_PARENTID are the
+ * only legitimate attributes for obtaining object IDs from this volume and the
+ * 32-bit fid_objno fields of the fsobj_id_t returned by ATTR_CMN_OBJID,
+ * ATTR_CMN_OBJPERMID, and ATTR_CMN_PAROBJID are undefined.
+ *
+ * VOL_CAP_FMT_DIR_HARDLINKS: When set, the volume supports directory
+ * hard links.
+ *
+ * VOL_CAP_FMT_DOCUMENT_ID: When set, the volume supports document IDs
+ * (an ID which persists across object ID changes) for document revisions.
+ *
+ * VOL_CAP_FMT_WRITE_GENERATION_COUNT: When set, the volume supports write
+ * generation counts (a count of how many times an object has been modified)
+ *
+ * VOL_CAP_FMT_NO_IMMUTABLE_FILES: When set, the volume does not support
+ * setting the UF_IMMUTABLE flag.
+ *
+ * VOL_CAP_FMT_NO_PERMISSIONS: When set, the volume does not support setting
+ * permissions.
+ *
+ * VOL_CAP_FMT_SHARED_SPACE: When set, the volume supports sharing space with
+ * other filesystems i.e. multiple logical filesystems can exist in the same
+ * "partition". An implication of this is that the filesystem which sets
+ * this capability treats waitfor arguments to VFS_SYNC as bit flags.
+ *
+ * VOL_CAP_FMT_VOL_GROUPS: When set, this volume is part of a volume-group
+ * that implies multiple volumes must be mounted in order to boot and root the
+ * operating system. Typically, this means a read-only system volume and a
+ * writable data volume.
+ */
+#define VOL_CAP_FMT_PERSISTENTOBJECTIDS 0x00000001
+#define VOL_CAP_FMT_SYMBOLICLINKS 0x00000002
+#define VOL_CAP_FMT_HARDLINKS 0x00000004
+#define VOL_CAP_FMT_JOURNAL 0x00000008
+#define VOL_CAP_FMT_JOURNAL_ACTIVE 0x00000010
+#define VOL_CAP_FMT_NO_ROOT_TIMES 0x00000020
+#define VOL_CAP_FMT_SPARSE_FILES 0x00000040
+#define VOL_CAP_FMT_ZERO_RUNS 0x00000080
+#define VOL_CAP_FMT_CASE_SENSITIVE 0x00000100
+#define VOL_CAP_FMT_CASE_PRESERVING 0x00000200
+#define VOL_CAP_FMT_FAST_STATFS 0x00000400
+#define VOL_CAP_FMT_2TB_FILESIZE 0x00000800
+#define VOL_CAP_FMT_OPENDENYMODES 0x00001000
+#define VOL_CAP_FMT_HIDDEN_FILES 0x00002000
+#define VOL_CAP_FMT_PATH_FROM_ID 0x00004000
+#define VOL_CAP_FMT_NO_VOLUME_SIZES 0x00008000
+#define VOL_CAP_FMT_DECMPFS_COMPRESSION 0x00010000
+#define VOL_CAP_FMT_64BIT_OBJECT_IDS 0x00020000
+#define VOL_CAP_FMT_DIR_HARDLINKS 0x00040000
+#define VOL_CAP_FMT_DOCUMENT_ID 0x00080000
+#define VOL_CAP_FMT_WRITE_GENERATION_COUNT 0x00100000
+#define VOL_CAP_FMT_NO_IMMUTABLE_FILES 0x00200000
+#define VOL_CAP_FMT_NO_PERMISSIONS 0x00400000
+#define VOL_CAP_FMT_SHARED_SPACE 0x00800000
+#define VOL_CAP_FMT_VOL_GROUPS 0x01000000