DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦250bc4a31⟧ TextFile

    Length: 3119 (0xc2f)
    Types: TextFile
    Notes: UNIX file
    Names: »rnode.h«

Derivation

└─⟦a6ab2eb36⟧ Bits:30004042/kconfig3.imd SW95705I 386/ix Multi-user Release 1.2
└─⟦a6ab2eb36⟧ UNIX Filesystem
    └─⟦this⟧ »kc/new/usr/include/sys/fs/nfs/rnode.h« 

TextFile

/*
 * Copyrighted as an unpublished work.
 * (c) Copyright 1988 INTERACTIVE Systems Corporation
 * All rights reserved.
 *
 * RESTRICTED RIGHTS
 *
 * These programs are supplied under a license.  They may be used,
 * disclosed, and/or copied only as permitted under such license
 * agreement.  Any copy must contain the above copyright notice and
 * this restricted rights notice.  Use, copying, and/or disclosure
 * of the programs is strictly prohibited unless otherwise provided
 * in the license agreement.
 */

#ident  "@(#)rnode.h	1.1 - 88/04/26"

/*      @(#)sufstring	3.3 System V NFS  source        */
/*	@(#)rnode.h	1.6 1/19/88		3.3 System V NFS  source        */
/*      @(#)rnode.h	3.2 LAI System V NFS Release 3.0/V3  source        */

/*      @(#)rnode.h 1.10 85/04/30 SMI      */

struct rnode {
	struct rnode	*r_forw;	/* hashed by filehandle or free */
	struct rnode	*r_back;
	fhandle_t	r_fh;		/* file handle */
	short		r_error;	/* async write error */
	ushort		r_flags;	/* flags, see below */
	daddr_t		r_lastr;	/* last block read (read-ahead) */
	struct ucred	r_cred;		/* current credentials */
	struct ucred	r_unlcred;	/* unlinked credentials */
	char		*r_unlname;	/* unlinked file name */
	struct inode	*r_unldip;	/* parent dir of unlinked file */
	struct inode	*r_ip;		/* cooresponding inode */
	struct nfsfattr	r_nfsattr;	/* cached nfs attributes */
	time_t 		r_nfsattrtime;	/* time attributes cached */
};


/*
 * Flags
 */
#define	RLOCKED		0x01		/* rnode is in use */
#define	RWANT		0x02		/* someone wants a wakeup */
#define	RATTRVALID	0x04		/* Attributes in the rnode are valid */
#define	REOF		0x08		/* EOF encountered on read */
#define	RDIRTY		0x10		/* dirty buffers may be in buf cache */
#define ROPEN		0x20		/* the vnode is currently open */
#define RMAPALLOCD	0x40		/* fs_allocmap was called */
#define RSTALE		0x80		/* available for re-use */
#define RRESERVE	0x100		/* Rnode reserved, but not connected to 
					   inode, yet */


/* There is only one 'block' size in this implementation.  It must be
 *	at most the buffer size long, and should be no more than
 *	the 'real' block size of the remote file.
 *
 *	A block number is computed from a byte
 *	offset and the block size found in the private mount
 *	data.
 */

#define NFS_DEV_BITS 8			/* # of bits hidden in device # */
#define NFS_MAX_RNODES ((1<<NFS_DEV_BITS)-1)	/* max # of rnodes */
#define NFS_DEV_POS 0			/* position of rnode # in the device */
#define NFS_DEV_MASK NFS_MAX_RNODES	/* get rnode # */


#define bptorno(bp)	(((bp)->b_dev >> NFS_DEV_POS) & NFS_DEV_MASK)

/* given an 'r-number', find the rnode */
#define rnotor(n)	(&nfs_rnodes[n])

/* find the rnode from the block and device numbers of a buffer */
#define bptor(bp)	rnotor(bptorno(bp))

/* given an rnode pointer, get its number */
#define rtorno(rp)	(rp-nfs_rnodes)

#define	rtofh(rp)	(&(rp)->r_fh)
#define	vtor(ip)	((struct rnode *)((ip)->i_fsptr))
#define	vtofh(ip)	rtofh(vtor(ip))



/* maximum byte number
 *	This is used to limit read-ahead and to detect wild reads */
#define NFS_MAX_BYTENUM ((unsigned long)((1L << (sizeof(off_t)*8 -1)) - 1L))