Whamcloud - gitweb
LU-5095 hsm: Allow receiving messages to be non-blocking
[fs/lustre-release.git] / lustre / utils / lustre_rsync.h
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; If not, see
18  * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
19  *
20  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
21  * CA 95054 USA or visit www.sun.com if you need additional information or
22  * have any questions.
23  *
24  * GPL HEADER END
25  */
26 /*
27  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
28  * Use is subject to license terms.
29  */
30 /*
31  * This file is part of Lustre, http://www.lustre.org/
32  * Lustre is a trademark of Sun Microsystems, Inc.
33  *
34  * lustre/include/lustre/lustre_rsync.h
35  *
36  */
37
38 #ifndef _LUSTRE_RSYNC_H_
39 #define _LUSTRE_RSYNC_H_
40
41 #define LR_NAME_MAXLEN 64
42 #define LR_FID_STR_LEN 128
43
44 /* Structure used by lustre_rsync. On-disk structures stored in a log
45  * file. This is used to determine the next start record and other
46  * parameters. */
47
48 struct lustre_rsync_status {
49         __u32   ls_version;           /* Version of the log entry */
50         __u32   ls_size;              /* Size of the log entry */
51         __u64   ls_last_recno;        /* Last replicated record no. */
52         char    ls_registration[LR_NAME_MAXLEN + 1]; /* Changelog registration*/
53         char    ls_mdt_device[LR_NAME_MAXLEN + 1]; /* MDT device */
54         char    ls_source_fs[LR_NAME_MAXLEN + 1]; /* Source Lustre FS */
55         char    ls_source[PATH_MAX + 1];/* Source FS path */
56         __u32   ls_num_targets;       /* No of replication targets */
57         char    ls_targets[0][PATH_MAX + 1]; /* Target FS path */
58 };
59
60 struct lr_parent_child_log {
61         char pcl_pfid[LR_FID_STR_LEN];
62         char pcl_tfid[LR_FID_STR_LEN];
63         char pcl_name[PATH_MAX];
64 };
65
66 #endif /* _LUSTRE_RSYNC_H_ */