/* SPDX-License-Identifier: GPL-2.0-or-later */ /* AFS fileserver XDR types * * Copyright (C) 2018 Red Hat, Inc. All Rights Reserved. * Written by David Howells ([email protected]) */ #ifndef XDR_FS_H #define XDR_FS_H struct afs_xdr_AFSFetchStatus { … } __packed; #define AFS_DIR_HASHTBL_SIZE … #define AFS_DIR_DIRENT_SIZE … #define AFS_DIR_SLOTS_PER_BLOCK … #define AFS_DIR_BLOCK_SIZE … #define AFS_DIR_BLOCKS_PER_PAGE … #define AFS_DIR_MAX_SLOTS … #define AFS_DIR_BLOCKS_WITH_CTR … #define AFS_DIR_MAX_BLOCKS … #define AFS_DIR_RESV_BLOCKS … #define AFS_DIR_RESV_BLOCKS0 … /* * Directory entry structure. */ afs_xdr_dirent __packed; /* * Directory block header (one at the beginning of every 2048-byte block). */ struct afs_xdr_dir_hdr { … } __packed; /* * Directory block layout */ afs_xdr_dir_block __packed; /* * Directory layout on a linux VM page. */ struct afs_xdr_dir_page { … }; /* * Calculate the number of dirent slots required for any given name length. * The calculation is made assuming the part of the name in the first slot is * 16 bytes, rather than 20, but this miscalculation is now standardised. */ static inline unsigned int afs_dir_calc_slots(size_t name_len) { … } #endif /* XDR_FS_H */