mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-18 20:45:04 +00:00
56 lines
1.8 KiB
C
56 lines
1.8 KiB
C
/*
|
|
* Copyright (C) 2018 Versity Software, Inc. All rights reserved.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public
|
|
* License v2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*/
|
|
#include <stdio.h>
|
|
#include <errno.h>
|
|
#include <assert.h>
|
|
|
|
#include "sparse.h"
|
|
#include "util.h"
|
|
#include "format.h"
|
|
#include "key.h"
|
|
|
|
char *scoutfs_zone_strings[SCOUTFS_MAX_ZONE] = {
|
|
[SCOUTFS_INODE_INDEX_ZONE] = "ind",
|
|
[SCOUTFS_XATTR_INDEX_ZONE] = "xnd",
|
|
[SCOUTFS_RID_ZONE] = "rid",
|
|
[SCOUTFS_FS_ZONE] = "fs",
|
|
};
|
|
|
|
char *scoutfs_type_strings[SCOUTFS_MAX_ZONE][SCOUTFS_MAX_TYPE] = {
|
|
[SCOUTFS_INODE_INDEX_ZONE][SCOUTFS_INODE_INDEX_META_SEQ_TYPE] = "msq",
|
|
[SCOUTFS_INODE_INDEX_ZONE][SCOUTFS_INODE_INDEX_DATA_SEQ_TYPE] = "dsq",
|
|
[SCOUTFS_XATTR_INDEX_ZONE][SCOUTFS_XATTR_INDEX_NAME_TYPE] = "nam",
|
|
[SCOUTFS_RID_ZONE][SCOUTFS_ORPHAN_TYPE] = "orp",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_INODE_TYPE] = "ino",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_XATTR_TYPE] = "xat",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_DIRENT_TYPE] = "dnt",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_READDIR_TYPE] = "rdr",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_LINK_BACKREF_TYPE] = "lbr",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_SYMLINK_TYPE] = "sym",
|
|
[SCOUTFS_FS_ZONE][SCOUTFS_PACKED_EXTENT_TYPE] = "pex",
|
|
};
|
|
|
|
char scoutfs_unknown_u8_strings[U8_MAX][U8_STR_MAX];
|
|
|
|
static void __attribute__((constructor)) scoutfs_key_init(void)
|
|
{
|
|
int ret;
|
|
int i;
|
|
|
|
for (i = 0; i <= U8_MAX; i++) {
|
|
ret = snprintf(scoutfs_unknown_u8_strings[i], U8_STR_MAX,
|
|
"u%u", i);
|
|
assert(ret > 0 && ret < U8_STR_MAX);
|
|
}
|
|
}
|