4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * High Sierra filesystem internal routine definitions.
25 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
29 #ifndef _SYS_FS_HSFS_IMPL_H
30 #define _SYS_FS_HSFS_IMPL_H
42 extern int hsfs_putapage(vnode_t
*, page_t
*, uoff_t
*, size_t *, int,
45 extern int hs_readsector(struct vnode
*vp
, uint_t secno
, uchar_t
*ptr
);
46 /* lookup/construct an hsnode/vnode */
47 extern struct vnode
*hs_makenode(struct hs_direntry
*dp
,
48 uint_t lbn
, uint_t off
, struct vfs
*vfsp
);
49 /* make hsnode from directory lbn/off */
50 extern int hs_remakenode(uint_t lbn
, uint_t off
, struct vfs
*vfsp
,
52 /* lookup name in directory */
53 extern int hs_dirlook(struct vnode
*dvp
, char *name
, int namlen
,
54 struct vnode
**vpp
, struct cred
*cred
);
55 /* find an hsnode in the hash list */
56 extern struct vnode
*hs_findhash(ino64_t nodeid
, uint_t lbn
, uint_t off
,
58 /* destroy an hsnode */
59 extern void hs_freenode(vnode_t
*vp
, struct hsfs
*fsp
, int nopage
);
60 /* parse a directory entry */
61 extern int hs_parsedir(struct hsfs
*fsp
, uchar_t
*dirp
,
62 struct hs_direntry
*hdp
, char *dnp
, int *dnlen
, int last_offset
);
63 /* convert d-characters */
64 extern int hs_namecopy(char *from
, char *to
, int size
, ulong_t flags
);
65 extern int hs_jnamecopy(char *from
, char *to
, int size
, int maxsize
,
67 extern int hs_joliet_cp(char *from
, char *to
, int size
);
68 /* destroy the incore hnode table */
69 extern void hs_filldirent(struct vnode
*vp
, struct hs_direntry
*hdp
);
70 /* check vnode protection */
71 extern int hs_access(struct vnode
*vp
, mode_t m
, struct cred
*cred
);
73 extern int hs_synchash(struct vfs
*vfsp
);
75 extern void hs_parse_dirdate(uchar_t
*dp
, struct timeval
*tvp
);
76 extern void hs_parse_longdate(uchar_t
*dp
, struct timeval
*tvp
);
77 extern int hs_uppercase_copy(char *from
, char *to
, int size
);
78 extern void hs_log_bogus_disk_warning(struct hsfs
*fsp
, int errtype
,
80 extern int hsfs_valid_dir(struct hs_direntry
*hd
);
81 extern void hs_init_hsnode_cache(void);
82 extern void hs_fini_hsnode_cache(void);
85 * Global data structures
87 extern const struct vnodeops hsfs_vnodeops
;
88 extern kmutex_t hs_mounttab_lock
;
89 extern struct hsfs
*hs_mounttab
;
95 #endif /* _SYS_FS_HSFS_IMPL_H */