~ubuntu-branches/ubuntu/warty/openafs/warty

« back to all changes in this revision

Viewing changes to src/afs/UKERNEL/osi_vnodeops.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hartman
  • Date: 2004-01-10 16:37:33 UTC
  • Revision ID: james.westby@ubuntu.com-20040110163733-jvr0n1uahshlb1uu
Tags: upstream-1.2.11
ImportĀ upstreamĀ versionĀ 1.2.11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2000, International Business Machines Corporation and others.
 
3
 * All Rights Reserved.
 
4
 * 
 
5
 * This software has been released under the terms of the IBM Public
 
6
 * License.  For details, see the LICENSE file in the top-level source
 
7
 * directory or online at http://www.openafs.org/dl/license10.html
 
8
 */
 
9
 
 
10
#include <afsconfig.h>
 
11
#include "../afs/param.h"
 
12
 
 
13
RCSID("$Header: /afs/sipb.mit.edu/project/openafs/debian/cvs/openafs/src/afs/UKERNEL/osi_vnodeops.c,v 1.1.1.5 2002/05/10 23:44:19 hartmans Exp $");
 
14
 
 
15
#include "../afs/sysincludes.h" /* Standard vendor system headers */
 
16
#include "../afs/afsincludes.h" /* Afs-based standard headers */
 
17
#include "../afs/afs_stats.h"  /* statistics */
 
18
 
 
19
extern int afs_noop();
 
20
extern int afs_badop();
 
21
 
 
22
extern int afs_open();
 
23
extern int afs_close();
 
24
extern int afs_getattr();
 
25
extern int afs_setattr();
 
26
extern int afs_access();
 
27
extern int afs_lookup();
 
28
extern int afs_create();
 
29
extern int afs_remove();
 
30
extern int afs_link();
 
31
extern int afs_rename();
 
32
extern int afs_mkdir();
 
33
extern int afs_rmdir();
 
34
extern int afs_readdir();
 
35
extern int afs_symlink();
 
36
extern int afs_readlink();
 
37
extern int afs_fsync();
 
38
extern int afs_lockctl();
 
39
extern int afs_fid();
 
40
 
 
41
int afs_vrdwr(
 
42
    struct usr_vnode *avc,
 
43
    struct usr_uio *uio,
 
44
    int rw,
 
45
    int io,
 
46
    struct usr_ucred* cred)
 
47
{
 
48
    int rc;
 
49
 
 
50
    if (rw == UIO_WRITE) {
 
51
        rc = afs_write(avc, uio, io, cred, 0);
 
52
    } else {
 
53
        rc = afs_read(avc, uio, cred, 0, 0, 0);
 
54
    }
 
55
 
 
56
    return rc;
 
57
}
 
58
 
 
59
int afs_inactive(struct vcache *avc, struct AFS_UCRED *acred)
 
60
{
 
61
    struct vnode *vp = AFSTOV(avc);
 
62
    if (afs_shuttingdown) return ;
 
63
 
 
64
    usr_assert(avc->vrefCount == 0);
 
65
    afs_InactiveVCache(avc, acred);
 
66
}
 
67
 
 
68
struct usr_vnodeops Afs_vnodeops = {
 
69
        afs_open,
 
70
        afs_close,
 
71
        afs_vrdwr,
 
72
        afs_badop, /* ioctl */
 
73
        afs_noop, /* select */
 
74
        afs_getattr,
 
75
        afs_setattr,
 
76
        afs_access,
 
77
        afs_lookup,
 
78
        afs_create,
 
79
        afs_remove,
 
80
        afs_link,
 
81
        afs_rename,
 
82
        afs_mkdir,
 
83
        afs_rmdir,
 
84
        afs_readdir,
 
85
        afs_symlink,
 
86
        afs_readlink,
 
87
        afs_fsync,
 
88
        afs_inactive,
 
89
        afs_badop, /* bmap */
 
90
        afs_badop, /* strategy */
 
91
        afs_badop, /* bread */
 
92
        afs_badop, /* brelse */
 
93
        afs_lockctl,
 
94
        afs_fid
 
95
};
 
96
 
 
97
struct usr_vnodeops *afs_ops = &Afs_vnodeops;