1/*
2 * Copyright 2004-2008, François Revol, <revol@free.fr>.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _VNIDPOOL_H
6#define _VNIDPOOL_H
7
8#include "googlefs.h"
9
10typedef struct vnidpool {
11	lock lock;
12	ino_t nextvnid;
13	uint32 *bitmap;
14	size_t bmsize;
15} vnidpool;
16
17status_t vnidpool_alloc(struct vnidpool **pool, size_t size);
18status_t vnidpool_free(struct vnidpool *pool);
19status_t vnidpool_get(struct vnidpool *pool, ino_t *vnid);
20status_t vnidpool_put(struct vnidpool *pool, ino_t vnid);
21
22#endif /* _VNIDPOOL_H */
23