- .dir = "/tmp/adu"
-};
-
-/** The columns of the id table. */
-enum id_table_columns {
- /** The user id. */
- IDT_UID,
- /** The number of bytes of all regular files owned by this id. */
- IDT_BYTES,
- /** The number of regular files owned by this id. */
- IDT_FILES,
- /** The user table for this uid. */
- IDT_TABLE,
- /** Number of columns in this table. */
- NUM_IDT_COLUMNS
-};
-
-static struct osl_column_description id_table_cols[] = {
- [IDT_UID] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE | OSL_UNIQUE,
- .name = "uid",
- .compare_function = uint32_compare,
- .data_size = sizeof(uint32_t)
- },
- [IDT_BYTES] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE,
- .compare_function = size_compare,
- .name = "num_bytes",
- .data_size = sizeof(uint64_t)
- },
- [IDT_FILES] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE,
- .compare_function = size_compare,
- .name = "num_filess",
- .data_size = sizeof(uint64_t)
- },
- [IDT_TABLE] = {
- .storage_type = OSL_NO_STORAGE,
- .storage_flags = OSL_FIXED_SIZE | OSL_UNIQUE,
- .name = "user_table",
- .data_size = sizeof(void *)
- }
-};
-
-static struct osl_table_description id_table_desc = {
- .name = "id_table",
- .num_columns = NUM_IDT_COLUMNS,
- .flags = 0,
- .column_descriptions = id_table_cols,
- .dir = "/tmp/adu"
-};
-
-/** The columns of the id table. */
-enum user_table_columns {
- /** The numer of the directory. */
- UT_DIR_NUM,
- /** The number of bytes of all regular files in this dir owned by this id. */
- UT_BYTES,
- /** The number of files in this dir owned by this id. */
- UT_FILES,
- /** Number of columns in this table. */
- NUM_UT_COLUMNS
-};
-
-static struct osl_column_description user_table_cols[] = {
- [UT_DIR_NUM] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE | OSL_UNIQUE,
- .name = "dir_num",
- .compare_function = uint32_compare,
- .data_size = sizeof(uint32_t)
- },
- [IDT_BYTES] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE,
- .compare_function = size_compare,
- .name = "num_bytes",
- .data_size = sizeof(uint64_t)
- },
- [IDT_FILES] = {
- .storage_type = OSL_MAPPED_STORAGE,
- .storage_flags = OSL_RBTREE | OSL_FIXED_SIZE,
- .compare_function = size_compare,
- .name = "num_files",
- .data_size = sizeof(uint64_t)
- },
-};
-
-static struct osl_table_description user_table_desc = {
- .num_columns = NUM_UT_COLUMNS,
- .flags = 0,
- .column_descriptions = user_table_cols,
- .dir = "/tmp/adu"