#ifndef __LIB_UFS_H__
#define __LIB_UFS_H__

struct _ufsinfo_t {
    int swaplog_fd;
    int l1;
    int l2;
    fileMap *map;
    int suggest;
};

typedef struct _ufsinfo_t ufsinfo_t;

extern char * libufs_StoreDirFullPath(SwapDir *, ufsinfo_t *, sfileno, char *);
extern int libufs_ValidFileno(SwapDir *, ufsinfo_t *, sfileno, int);
extern int libufs_VerifyDirectory(const char *);
extern char * libufs_SwapSubDir(SwapDir *, ufsinfo_t *, int);
extern int libufs_VerifyCacheDirs(SwapDir *, ufsinfo_t *);

extern int libufs_DirMapBitTest(SwapDir *, ufsinfo_t *, int);
extern void libufs_DirMapBitSet(SwapDir *, ufsinfo_t *, int);
extern void libufs_DirMapBitReset(SwapDir *, ufsinfo_t *, int);
extern int libufs_DirMapBitAllocate(SwapDir *, ufsinfo_t *);
extern void libufs_DirInitBitmap(SwapDir *, ufsinfo_t *);
extern int libufs_FilenoBelongsHere(ufsinfo_t *, int, int, int, int);
extern void libufs_FreeMemory(SwapDir *, ufsinfo_t *);

extern void libufs_DirStats(SwapDir *, ufsinfo_t *, StoreEntry *);

extern int libufs_CreateDirectory(const char *, int);
extern void libufs_CreateSwapSubDirs(SwapDir *, ufsinfo_t *);


#endif


