VirtualBox

source: vbox/trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.h@ 30357

Last change on this file since 30357 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/* $Id: vboxfs_vnode.h 28800 2010-04-27 08:22:32Z vboxsync $ */
2/** @file
3 * VirtualBox File System for Solaris Guests, VNode header.
4 */
5
6/*
7 * Copyright (C) 2009-2010 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___VBoxFS_node_Solaris_h
19#define ___VBoxFS_node_Solaris_h
20
21#include <sys/t_lock.h>
22#include <sys/avl.h>
23#include <vm/seg.h>
24#include <vm/seg_vn.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/*
31 * sfnode is the file system dependent vnode data for vboxsf.
32 * sfnode's also track all files ever accessed, both open and closed.
33 * It duplicates some of the information in vnode, since it holds
34 * information for files that may have been completely closed.
35 *
36 * The sfnode_t's are stored in an AVL tree sorted by:
37 * sf_sffs, sf_path
38 */
39typedef struct sfnode {
40 avl_node_t sf_linkage; /* AVL tree linkage */
41 struct sffs_data *sf_sffs; /* containing mounted file system */
42 char *sf_path; /* full pathname to file or dir */
43 uint64_t sf_ino; /* assigned unique ID number */
44 vnode_t *sf_vnode; /* vnode if active */
45 sfp_file_t *sf_file; /* non NULL if open */
46 struct sfnode *sf_parent; /* parent sfnode of this one */
47 uint16_t sf_children; /* number of children sfnodes */
48 uint8_t sf_type; /* VDIR or VREG */
49 uint8_t sf_is_stale; /* this is stale and should be purged */
50} sfnode_t;
51
52#define VN2SFN(vp) ((sfnode_t *)(vp)->v_data)
53
54#ifdef _KERNEL
55extern int sffs_vnode_init(void);
56extern void sffs_vnode_fini(void);
57extern sfnode_t *sfnode_make(struct sffs_data *, char *, vtype_t, sfp_file_t *,
58 sfnode_t *parent);
59extern vnode_t *sfnode_get_vnode(sfnode_t *);
60
61/*
62 * Purge all cached information about a shared file system at unmount
63 */
64extern int sffs_purge(struct sffs_data *);
65
66extern kmutex_t sffs_lock;
67#endif /* _KERNEL */
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* !___VBoxFS_node_Solaris_h */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette