summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/glfs-fuse-bridge.h
blob: 98085b83df5102bdb72f653f1d98768b3256310d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
   Copyright (c) 2006-2012 Red Hat, Inc. <http://www.redhat.com>
   This file is part of GlusterFS.

   This file is licensed to you under your choice of the GNU Lesser
   General Public License, version 3 or any later version (LGPLv3 or
   later), or the GNU General Public License, version 2 (GPLv2), in all
   cases as published by the Free Software Foundation.
*/

#ifndef _GLFS_FUSE_BRIDGE_H
#define _GLFS_FUSE_BRIDGE_H

#define UUID_CANONICAL_FORM_LEN 36

#define GF_FUSE_AUX_GFID_NEWFILE "glusterfs.gfid.newfile"
#define GF_FUSE_AUX_GFID_HEAL    "glusterfs.gfid.heal"

struct auxfuse_symlink_in {
        char     *linkpath;
} __attribute__ ((__packed__));

struct auxfuse_mknod_in {
	unsigned int mode;
	unsigned int rdev;
	unsigned int umask;
} __attribute__ ((__packed__));

struct auxfuse_mkdir_in {
	unsigned int mode;
	unsigned int umask;
} __attribute__ ((__packed__));

typedef struct {
        unsigned int  uid;
        unsigned int  gid;
        char          gfid[UUID_CANONICAL_FORM_LEN + 1];
        unsigned int  st_mode;
        char         *bname;

        union {
                struct auxfuse_mkdir_in   mkdir;
                struct auxfuse_mknod_in   mknod;
                struct auxfuse_symlink_in symlink;
        } __attribute__ ((__packed__)) args;
} __attribute__((__packed__)) fuse_auxgfid_newfile_args_t;

typedef struct {
        char      gfid[UUID_CANONICAL_FORM_LEN + 1];
        char     *bname; /* a null terminated basename */
} __attribute__((__packed__)) fuse_auxgfid_heal_args_t;

#endif