From 5c749d35eb79a57a767e86b2b5b1b9201b5cc931 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 14 Dec 1999 01:14:17 +0000 Subject: [PATCH] snap/snap.c, class/obdcontrol: added support for snapshot restores 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 | 2 +- lustre/include/linux/obd_snap_support.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 lustre/include/linux/obd_snap_support.h diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index 259d031..76b746c 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -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 index 0000000..3fc8b42 --- /dev/null +++ b/lustre/include/linux/obd_snap_support.h @@ -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 -- 1.8.3.1