summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_ffs/fsck.h
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2000-07-06 02:03:11 +0000
committermckusick <mckusick@FreeBSD.org>2000-07-06 02:03:11 +0000
commit61ae57db5644ea213c5f6e71034a210758481548 (patch)
tree5bfded644e81cd5a948de9bc77c23fea5fb4c941 /sbin/fsck_ffs/fsck.h
parentfc37193d7575813e332e1faffa470fe104a69c99 (diff)
downloadFreeBSD-src-61ae57db5644ea213c5f6e71034a210758481548.zip
FreeBSD-src-61ae57db5644ea213c5f6e71034a210758481548.tar.gz
Teach fsck about snapshot files. These changes should have no
effect on operation of fsck on filesystems without snapshots. If you get compilation errors, be sure that you have copies of /usr/include/sys/mount.h (1.94), /usr/include/sys/stat.h (1.21), and /usr/include/ufs/ffs/fs.h (1.16) as of July 4, 2000 or later.
Diffstat (limited to 'sbin/fsck_ffs/fsck.h')
-rw-r--r--sbin/fsck_ffs/fsck.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/fsck.h b/sbin/fsck_ffs/fsck.h
index 9d59c8f..f0280fe 100644
--- a/sbin/fsck_ffs/fsck.h
+++ b/sbin/fsck_ffs/fsck.h
@@ -114,12 +114,14 @@ struct bufarea *pbp; /* current inode block */
#define cgrp (*cgblk.b_un.b_cg)
enum fixstate {DONTKNOW, NOFIX, FIX, IGNORE};
+ino_t cursnapshot;
struct inodesc {
enum fixstate id_fix; /* policy on fixing errors */
int (*id_func)(); /* function to be applied to blocks of inode */
ino_t id_number; /* inode number described */
ino_t id_parent; /* for DATA nodes, their parent */
+ int id_lbn; /* logical block number of current block */
ufs_daddr_t id_blkno; /* current block number being examined */
int id_numfrags; /* number of frags contained in block */
quad_t id_filesize; /* for DATA nodes, the size of the directory */
@@ -130,8 +132,9 @@ struct inodesc {
char id_type; /* type of descriptor, DATA or ADDR */
};
/* file types */
-#define DATA 1
-#define ADDR 2
+#define DATA 1 /* a directory */
+#define SNAP 2 /* a snapshot */
+#define ADDR 3 /* anything but a directory or a snapshot */
/*
* Linked list of duplicate blocks.
OpenPOWER on IntegriCloud