summaryrefslogtreecommitdiffstats
path: root/include/linux/coda_fs_i.h
blob: 302a715b9c65d46d7dfc7c00019d11f0cda4a8c9 (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
/*
 *  coda_fs_i.h
 *
 *  Copyright (C) 1998 Carnegie Mellon University
 *
 */

#ifndef _LINUX_CODA_FS_I
#define _LINUX_CODA_FS_I

#ifdef __KERNEL__
#include <linux/types.h>
#include <linux/list.h>
#include <linux/coda.h>



#define CODA_CNODE_MAGIC        0x47114711
/*
 * coda fs inode data
 */
struct coda_inode_info {
        struct ViceFid     c_fid;	/* Coda identifier */
        u_short	           c_flags;     /* flags (see below) */
        u_short	           c_ocount;    /* count of openers */
        u_short            c_owrite;    /* count of open for write */
        u_short            c_mmcount;   /* count of mmappers */
        struct inode      *c_ovp;       /* open inode  pointer */
        struct list_head   c_cnhead;    /* head of cache entries */
	struct list_head   c_volrootlist; /* list of volroot cnoddes */
        struct inode      *c_vnode;     /*  inode associated with cnode */
        int                c_magic;     /* to verify the data structure */
};

/* flags */
#define C_VATTR       0x1   /* Validity of vattr in inode */
#define C_PURGE       0x8
#define C_ZAPDIR      0x10
#define C_DYING       0x4   /* from venus (which died) */
#define C_INITED      0x20
#define C_FLUSH       0x2   /* used after a flush */

struct inode *coda_iget(struct super_block * sb, ViceFid * fid,
                        struct coda_vattr * attr);
int coda_cnode_make(struct inode **, struct ViceFid *, struct super_block *);
int coda_cnode_makectl(struct inode **inode, struct super_block *sb);
struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb);
void coda_replace_fid(struct inode *, ViceFid *, ViceFid *);

#endif
#endif