linux/fs/bcachefs/dirent_format.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_DIRENT_FORMAT_H
#define _BCACHEFS_DIRENT_FORMAT_H

/*
 * Dirents (and xattrs) have to implement string lookups; since our b-tree
 * doesn't support arbitrary length strings for the key, we instead index by a
 * 64 bit hash (currently truncated sha1) of the string, stored in the offset
 * field of the key - using linear probing to resolve hash collisions. This also
 * provides us with the readdir cookie posix requires.
 *
 * Linear probing requires us to use whiteouts for deletions, in the event of a
 * collision:
 */

struct bch_dirent {} __packed __aligned();

#define DT_SUBVOL
#define BCH_DT_MAX

#define BCH_NAME_MAX

#endif /* _BCACHEFS_DIRENT_FORMAT_H */