]> git.saurik.com Git - apple/xnu.git/blame - bsd/miscfs/volfs/volfs.h
xnu-792.24.17.tar.gz
[apple/xnu.git] / bsd / miscfs / volfs / volfs.h
CommitLineData
1c79356b 1/*
5d5c5d0d
A
2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
3 *
6601e61a 4 * @APPLE_LICENSE_HEADER_START@
1c79356b 5 *
6601e61a
A
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
8f6c56a5 11 *
6601e61a
A
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
8f6c56a5
A
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
6601e61a
A
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
8f6c56a5 19 *
6601e61a 20 * @APPLE_LICENSE_HEADER_END@
1c79356b 21 */
91447636 22
9bccf70c
A
23#ifndef __VOLFS_VOLFS_H__
24#define __VOLFS_VOLFS_H__
1c79356b 25
9bccf70c
A
26#include <sys/appleapiopts.h>
27
28#ifdef __APPLE_API_PRIVATE
1c79356b
A
29struct volfs_mntdata
30{
31 struct vnode *volfs_rootvp;
1c79356b
A
32};
33
34/*
35 * Volfs vnodes exist only for the root, which allows for the enumeration
36 * of all volfs accessible filesystems, and for the filesystems which
37 * volfs handles.
38 */
39#define VOLFS_ROOT 1 /* This volfs vnode represents root of volfs */
40#define VOLFS_FSNODE 2 /* This volfs vnode represents a file system */
41
42struct volfs_vndata
43{
44 int vnode_type;
1c79356b
A
45 unsigned int nodeID; /* the dev entry of a file system */
46 struct mount * fs_mount;
91447636 47 fsid_t fs_fsid;
1c79356b
A
48};
49
50#define MAXVLFSNAMLEN 24 /* max length is really 10, pad to 24 since
51 * some of the math depends on VLFSDIRENTLEN
52 * being a power of 2 */
53#define VLFSDIRENTLEN (MAXVLFSNAMLEN + sizeof(u_int32_t) + sizeof(u_int16_t) + sizeof(u_int8_t) + sizeof(u_int8_t))
54
55#define ROOT_DIRID 2
56
55e303ae
A
57#define MAXPLCENTRIES 250
58#define PLCHASHSIZE 128
59
1c79356b
A
60
61#define VTOVL(VP) ((struct volfs_vndata *)((VP)->v_data))
62
63#define PRINTIT kprintf
64
9bccf70c
A
65
66#endif /* __APPLE_API_PRIVATE */
67#endif /* __VOLFS_VOLFS_H__ */