Whamcloud - gitweb
snap/snap.c, class/obdcontrol: added support for snapshot restores
authoradilger <adilger>
Tue, 14 Dec 1999 01:14:17 +0000 (01:14 +0000)
committeradilger <adilger>
Tue, 14 Dec 1999 01:14:17 +0000 (01:14 +0000)
on unmounted OBD filesystems
snap/setup3.sh, snap/cleanup3.sh: scripts to test 3 snapshots
include/linux/obd_snap_support.h: iterator struct/function prototypes

lustre/include/linux/obd_class.h
lustre/include/linux/obd_snap_support.h [new file with mode: 0644]

index 259d031..76b746c 100644 (file)
@@ -96,7 +96,7 @@ struct obd_ops {
        int (*o_migrate)(struct obd_conn *, obdattr *src, obdattr *dst);
        int (*o_copy)(struct obd_conn *dev, obdattr *source, obdattr *target);
        int (*o_iocontrol)(int cmd, struct obd_conn *, int len, void *karg, void *uarg);
-       int (*o_iterate)(struct obd_conn *, objid, int (*)(objid, void *), void *);
+       int (*o_iterate)(struct obd_conn *, int (*)(objid, void *), objid, void *);
 
 };
 
diff --git a/lustre/include/linux/obd_snap_support.h b/lustre/include/linux/obd_snap_support.h
new file mode 100644 (file)
index 0000000..3fc8b42
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef __OBD_SNAP_SUPP_H
+#define __OBD_SNAP_SUPP_H
+
+struct snap_iterdata {
+       struct obd_conn *conn;
+       struct obd_conn *ch_conn;
+       int index;
+       int previndex;
+       int currentindex;
+       int prevslot;
+       time_t prevtime;
+};
+
+
+inline struct obd_conn *child_conn(struct obd_conn *conn);
+int snap_deleteino(objid id, void *data);
+int snap_restoreino(objid id, void *data);
+int snap_iocontrol(int cmd, struct obd_conn *conn, int len, void *karg, void *uarg);
+
+#endif