diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_imeta.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_imeta.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_imeta.h b/fs/xfs/libxfs/xfs_imeta.h index f180664537b6..1eb1b10fedde 100644 --- a/fs/xfs/libxfs/xfs_imeta.h +++ b/fs/xfs/libxfs/xfs_imeta.h @@ -6,10 +6,23 @@ #ifndef __XFS_IMETA_H__ #define __XFS_IMETA_H__ +/* How deep can we nest metadata dirs? */ +#define XFS_IMETA_MAX_DEPTH 64 + +/* Form an imeta path from a simple array of strings. */ +#define XFS_IMETA_DEFINE_PATH(name, path) \ +const struct xfs_imeta_path name = { \ + .im_path = (path), \ + .im_depth = ARRAY_SIZE(path), \ +} + /* Key for looking up metadata inodes. */ struct xfs_imeta_path { - /* Temporary: integer to keep the static imeta definitions unique */ - int bogus; + /* Array of string pointers. */ + const char **im_path; + + /* Number of strings in path. */ + unsigned int im_depth; }; /* Cleanup widget for metadata inode creation and deletion. */ |