NetBSD/libexec/lfs_cleanerd/fdfs.h
perseant 9c75397609 A new version of the cleaner. In general, works about as well as the old
cleaner, but with more legible code.

Includes code for reading and writing to the raw disk device (so that an
unmounted fs could be cleaned), for the use of a single daemon to clean
multiple filesystems to save on resources, and for recording the old
contents of cleaned segments to offline storage for regression testing of
the LFS system as a whole; though these new features are not properly
tested at this point.
2006-03-30 19:10:13 +00:00

25 lines
831 B
C

struct fd_buf {
char *buf; /* The buffer itself */
daddr_t start; /* Start of this buffer */
daddr_t end; /* End of this buffer */
};
struct fdfs {
int fd_fd; /* The file descriptor */
int fd_bufc; /* Number of segment buffers */
int fd_bufi; /* Index to next segment buffer */
struct fd_buf *fd_bufp; /* The buffers */
off_t fd_bsize; /* block size */
off_t fd_ssize; /* segment size */
};
struct uvnode * fd_vget(int, int, int, int);
int fd_preload(struct uvnode *, daddr_t);
int fd_vop_strategy(struct ubuf *);
int fd_vop_bwrite(struct ubuf *);
int fd_vop_bmap(struct uvnode *, daddr_t, daddr_t *);
char *fd_ptrget(struct uvnode *, daddr_t);
void fd_reclaim(struct uvnode *);
void fd_release(struct uvnode *);
void fd_release_all(struct uvnode *);