X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Finclude%2Flinux%2Fobd_snap.h;h=b7641d405fbc07574d8012a272be30e156b17808;hb=18d0a1fd68fada7d71f39ccbe76a28dd55c100c3;hp=b846fab7feacd399a67b5228ca981a2b43667624;hpb=3146d280a803ae5f9749bab8cde36105de43fcb9;p=fs%2Flustre-release.git diff --git a/lustre/include/linux/obd_snap.h b/lustre/include/linux/obd_snap.h index b846fab..b7641d4 100644 --- a/lustre/include/linux/obd_snap.h +++ b/lustre/include/linux/obd_snap.h @@ -1,28 +1,29 @@ -#ifndef _OBD_SIM -#define _OBD_SIM +#ifndef _OBD_SNAP +#define _OBD_SNAP +/* + * Copyright (C) 2001 Cluster File Systems, Inc. + * + * This code is issued under the GNU General Public License. + * See the file COPYING in this distribution + */ -#define OBD_SNAP_MAGIC 0x47224722 +#include -#define SNAP_MAX 8 /* must fit in "u" area of struct inode */ -struct snap_obd_data { - int snap_dev; /* which device contains the data */ - unsigned int snap_no; /* which snapshot are we accessing */ - unsigned int snap_count; /* how many snapshots exist */ - time_t snap_times[SNAP_MAX]; -}; +#define OBD_SNAP_MAGIC 0xfffffff3 /* an unlikely block number */ -struct snap_obd { - unsigned int snap_no; /* which snapshot are we accessing */ - unsigned int snap_count; /* how many snapshots exist */ - time_t snap_times[SNAP_MAX]; -}; - -struct snap_object_data { - int od_magic; - /* id of snaps of object; slot 0 has the current data */ - unsigned long od_ids[SNAP_MAX + 1]; -} +#ifndef OBD_SNAP_DEVICENAME +#define OBD_SNAP_DEVICENAME "obdsnap" +#endif +/* ioctls for manipulating snapshots 40 - 60 */ +#define OBD_SNAP_SETTABLE _IOWR('f', 40, long) +#define OBD_SNAP_PRINTTABLE _IOWR('f', 41, long) +#define OBD_SNAP_DELETE _IOWR('f', 42, long) +#define OBD_SNAP_RESTORE _IOWR('f', 43, long) +void snap_use(int table_no, int snap_index) ; +void snap_unuse(int table_no, int snap_index) ; +int snap_is_used(int table_no, int snap_index) ; +int snap_table_attach(int tableno, int snap_index); #endif