Whamcloud - gitweb
Add missing files, cleanup .cvsignore's
[fs/lustre-release.git] / lustre / include / linux / obd_snap.h
1 #ifndef _OBD_SNAP
2 #define _OBD_SNAP
3 /*
4  * Copyright (C) 2001  Cluster File Systems, Inc.
5  *
6  * This code is issued under the GNU General Public License.
7  * See the file COPYING in this distribution
8  */
9
10 #define OBD_SNAP_MAGIC 0xfffffff3   /* an unlikely block number */
11
12 #ifndef OBD_SNAP_DEVICENAME
13 #define OBD_SNAP_DEVICENAME "obdsnap"
14 #endif
15
16 /* ioctls for manipulating snapshots 40 - 60 */
17 #define OBD_SNAP_SETTABLE       _IOWR('f', 40, long)
18 #define OBD_SNAP_PRINTTABLE     _IOWR('f', 41, long)
19 #define OBD_SNAP_DELETE _IOWR('f', 42, long)
20 #define OBD_SNAP_RESTORE        _IOWR('f', 43, long)
21
22 /* this is the obd device descriptor: 
23  * - current snapshot ends up in first slot of this array
24  */
25 struct snap_obd {
26         unsigned int snap_index;  /* which snapshot index are we accessing */
27         int snap_tableno;
28 };
29
30 void snap_use(int table_no, int snap_index) ;
31 void snap_unuse(int table_no, int snap_index) ;
32 int snap_is_used(int table_no, int snap_index) ;
33 int snap_table_attach(int tableno, int snap_index);
34
35 #endif