udf_inode.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#ifndef _SYS_FS_UDF_INODE_H
#define _SYS_FS_UDF_INODE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define SUN_IMPL_ID "*SUN SOLARIS UDF"
#define SUN_IMPL_ID_LEN 16
#define SUN_OS_CLASS 4
#define SUN_OS_ID 2
/*
* Size of each cluster
* and bits to be shifted
*/
#define CLSTR_SIZE 8
#define CLSTR_MASK 7
/*
* enums
*/
/*
* The following macros optimize certain frequently calculated
* quantities by using shifts and masks in place of divisions
* modulos and multiplications.
*/
struct udf_fid {
};
#define MAXNAMLEN 255
struct ud_part {
/* From part desc */
/* From lvid */
};
/*
* udp_flags
*/
#define UDP_BITMAPS 0x00
#define UDP_SPACETBLS 0x01
/*
* udp_access
*/
#define MAX_SPM 4
struct ud_map {
};
/*
* udm_flags
*/
#define UDM_MAP_NORM 0x00
#define UDM_MAP_VPM 0x01
#define UDM_MAP_SPM 0x02
struct udf_vfs {
char *udf_fsmnt; /* Path name of directory mouted on */
/* from pvd */
/* used in making tags */
/* from lvd */
/* make lbsize to DEV_BSIZE */
/* restricted to 1 till udf 1.50 */
/* from part desc's */
/*
* sum of udp_nfree and udp_nblocks
* from the array udf_parts[0] to udf_parts[udf_nparts - 1]
*/
/* udf_parts[0].udp_nfree == udf_freespace */
/* till udf 1.50 (DVD-R?) */
/* from lvid */
/*
* Have them cached here for fast access
*/
struct pri_vol_desc *udf_pvd;
struct log_vol_desc *udf_lvd;
struct log_vol_int_desc *udf_lvid;
};
#ifndef __lint
#endif
/*
* udf_mtype
*/
/*
* udf_flags
*/
/*
* udf_clean
*/
#define UDF_DIRTY 0x00
#define UDF_CLEAN 0x01
/*
* Size can be a 64-bit value and therefore we sign extend fs_bmask
* to a 64-bit value too so that the higher 32 bits are masked
* properly. Note that the type of fs_bmask has to be signed. Otherwise
* compiler will set the higher 32 bits as zero and we don't want
* this to happen.
*/
#ifdef UNDEF
#endif
/*
* Convert between inode pointers and vnode pointers
*/
struct icb_ext {
/* Direct Entry will go here */
};
/* ib_flags */
/* and not unallocated */
#define IB_MASK 0x3
#define IB_ALLOCATED(flags) \
#define EXT_PER_MALLOC 8
struct ud_inode {
long i_mapcnt; /* number of mappings of pages */
int *i_map; /* block list for the file */
};
#ifndef __lint
#endif
/* i_flag */
/* write operation asynchrously */
/*
* i_char
* Do not change used by MANDLOCK macro in vnode.h
*/
/*
* Setuid --S---------
* Setgid -G----------
* SaveTXT T-----------
*/
/* i_perm */
#define IWRITE 0x0800
#define IREAD 0x1000
#define IATTR 0x2000
#define IDELE 0x4000
#define UP_MASK 0x1CE7
#define VA2UD_PERM(perm) \
#define UD2VA_PERM(perm) \
/*
* Permissions
* Other -----------DARWX
* Group ------DARWX-----
* Owner -DARWX----------
*/
((dperm) & 0x7))
((uperm) & 0x7))
/* specify how the inode info is written in ud_syncip() */
/* only if IATTCHG is set */
#define I_ASYNC 0 /* don't wait for the inode written */
#define UD_HASH_SZ 512
#else
#endif
union ihead {
};
ITIMES_NOLOCK(ip); \
}
if (ud_trace) { \
}
#ifndef __lint
vnode))
tstamp))
#endif
/*
*/
void ud_update_superblock(struct vfs *);
/*
*/
/*
*/
struct cred *);
void ud_itimes_nolock(struct ud_inode *);
void ud_delcache(struct ud_inode *);
void ud_init_inodes(void);
/*
*/
struct cred *);
uint32_t *);
/*
*/
void ud_vfs_add(struct udf_vfs *);
void ud_vfs_remove(struct udf_vfs *);
void ud_sbwrite(struct udf_vfs *);
void ud_update_regid(struct regid *);
int32_t, struct timespec32 *);
struct cred *);
/*
*/
/*
*/
void ud_insert_new_ext(struct ud_inode *,
#ifdef __cplusplus
}
#endif
#endif /* _SYS_FS_UDF_INODE_H */