Subject: afs/fs/cachefs rootdir.c,1.17,1.18 replay.c,1.3,1.4 dump-journal.c,1.16,1.17 cachetest-main.c,1.12,1.13 cachefs-layout.h,1.33,1.34 cachefs-int.h,1.40,1.41 aops.c,1.44,1.45

From: [email-masked]
Date: Wed, 13 Aug 2003 11:05:31 +0100

Update of /home/cvs/afs/fs/cachefs
In directory phoenix.infradead.org:/tmp/cvs-serv701/fs/cachefs

Modified Files:
	rootdir.c replay.c dump-journal.c cachetest-main.c 
	cachefs-layout.h cachefs-int.h aops.c 
Log Message:
changed u_intXX_t to uintXX_t

Index: rootdir.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/rootdir.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- rootdir.c	18 Jul 2003 15:16:20 -0000	1.17
+++ rootdir.c	13 Aug 2003 10:05:28 -0000	1.18
@@ -45,18 +45,18 @@
 	void		*cookie;
 	filldir_t	filldir;
 	char		*scratch;	/* scratch page for name construction */
-	u_int16_t	dsize;		/* data size */
-	u_int16_t	esize;		/* entry size */
-	u_int16_t	epp;		/* entries per page */
-	u_int16_t	keys[4];	/* key description */
+	uint16_t	dsize;		/* data size */
+	uint16_t	esize;		/* entry size */
+	uint16_t	epp;		/* entries per page */
+	uint16_t	keys[4];	/* key description */
 	unsigned	dpos_off;	/* directory position offset */
 };
 
 struct cachefs_lookup_record {
 	char		*key;
-	u_int16_t	esize;
-	u_int16_t	ksize;
-	u_int16_t	keys[4];	/* key description */
+	uint16_t	esize;
+	uint16_t	ksize;
+	uint16_t	keys[4];	/* key description */
 	unsigned	ino;
 };

Index: replay.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/replay.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- replay.c	18 Jul 2003 08:54:58 -0000	1.3
+++ replay.c	13 Aug 2003 10:05:28 -0000	1.4
@@ -20,7 +20,7 @@
 #define UJNL_WRAP(X) ((X) & (CACHEFS_ONDISC_UJNL_NUMENTS - 1))
 #define BLOCK_VALID(BLOCK,PAGE,JENTRY) \
 	((BLOCK) && \
-	 (u_int16_t) (unsigned long) (BLOCK)->ref <= (JENTRY)->serial && \
+	 (uint16_t) (unsigned long) (BLOCK)->ref <= (JENTRY)->serial && \
 	 (wait_on_page_locked((PAGE)), 1) \
 	)
 
@@ -120,7 +120,7 @@
 	struct cachefs_ondisc_update_journal *jentry;
 	struct cachefs_super *super = (struct cachefs_super *) _desc->buf;
 	unsigned short slot;
-	u_int8_t *data;
+	uint8_t *data;
 	int tmp;
 
 	desc = container_of(_desc,
@@ -133,7 +133,7 @@
 	BUG_ON(size != PAGE_SIZE);
 	BUG_ON(offset != 0);
 
-	data = (u_int8_t *) kmap(page);
+	data = (uint8_t *) kmap(page);
 
 	slot = (page->index - super->layout->bix_ujournal);
 	slot *= super->layout->ujnl_recperblk;
@@ -892,7 +892,7 @@
 	struct cachefs_ondisc_metadata *metadata;
 	struct cachefs_block *metameta, *inometa, *indexmeta, *indexdata;
 	struct page *metapage, *inompage, *ixmpage, *ixdatapage;
-	u_int32_t type;
+	uint32_t type;
 	int ret;
 
 	kenter(",{%hd.%hu}", jentry->batch, jentry->serial);
@@ -1280,7 +1280,7 @@
 
 	/* make sure the index data page is initialised */
 	if (BLOCK_VALID(indexdata, datapage, jentry)) {
-		u_int32_t entry, next;
+		uint32_t entry, next;
 		void *content;
 		int loop;
 
@@ -1518,7 +1518,7 @@
 	if (ret < 0)
 		goto error2;
 
-	if (trans->jentry->auxentry == (u_int16_t) ~0) {
+	if (trans->jentry->auxentry == (uint16_t) ~0) {
 		/* block made new node on recycling stack */
 		ret = cachefs_block_read(super, NULL, trans->jentry->block, 0,
 					 &deadblock, &deadpage);

Index: dump-journal.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/dump-journal.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- dump-journal.c	18 Jul 2003 08:54:58 -0000	1.16
+++ dump-journal.c	13 Aug 2003 10:05:28 -0000	1.17
@@ -36,7 +36,7 @@
 
 struct sector {
 	union {
-		u_int8_t				data[512];
+		uint8_t					data[512];
 		struct cachefs_ondisc_update_journal	jentry;
 	};		
 };

Index: cachetest-main.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/cachetest-main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- cachetest-main.c	4 Jul 2003 09:04:44 -0000	1.12
+++ cachetest-main.c	13 Aug 2003 10:05:28 -0000	1.13
@@ -38,14 +38,14 @@
 
 struct afs_volume {
 	char			name[64];	/* [KEY] volume name */
-	u_int32_t		vids[3];	/* volume IDs */
+	uint32_t		vids[3];	/* volume IDs */
 	struct in_addr		fsservers[8];	/* file server IP addresses */
-	u_int8_t		fstypemsks[8];	/* file server volume type masks */
+	uint8_t			fstypemsks[8];	/* file server volume type masks */
 	struct cachefs_cookie	*cache;		/* caching cookie */
 };
 
 struct afs_inode {
-	u_int32_t		fid;		/* [KEY] file ID */
+	uint32_t		fid;		/* [KEY] file ID */
 	struct cachefs_cookie	*cache;		/* caching cookie */
 };
 
@@ -317,7 +317,7 @@
 static cachefs_match_val_t file_match(void *target, const void *entry)
 {
 	struct afs_inode *inode = target;
-	u_int32_t fid = htonl(inode->fid);
+	uint32_t fid = htonl(inode->fid);
 
 	kenter("");
 
@@ -334,7 +334,7 @@
 static void file_update(void *source, void *entry)
 {
 	struct afs_inode *inode = source;
-	u_int32_t fid = htonl(inode->fid);
+	uint32_t fid = htonl(inode->fid);
 
 	kenter("%p,%p", source, entry);

Index: cachefs-layout.h
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/cachefs-layout.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- cachefs-layout.h	18 Jul 2003 08:54:58 -0000	1.33
+++ cachefs-layout.h	13 Aug 2003 10:05:28 -0000	1.34
@@ -27,7 +27,7 @@
 	CACHEFS_INO_STATUS		= 0x80000002,
 };
 
-typedef u_int32_t cachefs_blockix_t;
+typedef uint32_t cachefs_blockix_t;
 
 /*****************************************************************************/
 /*
@@ -38,23 +38,23 @@
  */
 struct cachefs_ondisc_superblock
 {
-	u_int8_t			magic[10];	/* magic number */
+	uint8_t				magic[10];	/* magic number */
 #define CACHEFS_SUPER_MAGIC "cachefsrdy"
 #define CACHEFS_SUPER_MAGIC_NEEDS_INIT "cachefs___"
 #define CACHEFS_SUPER_MAGIC_SIZE 10
 
-	u_int16_t			endian;		/* 0x1234 stored CPU-normal order */
+	uint16_t			endian;		/* 0x1234 stored CPU-normal order */
 #define CACHEFS_SUPER_ENDIAN 0x1234
 
-	u_int32_t			version;	/* format version */
+	uint32_t			version;	/* format version */
 #define CACHEFS_SUPER_VERSION 1
 
 	/* layout */
-	u_int32_t			bsize;		/* cache block size */
-	u_int32_t			metadata_size;	/* cache metadata record size */
-	u_int32_t			metadata_bits;	/* log2 cache metadata record size */
-	u_int32_t			ujnl_rsize;	/* update journal record size */
-	u_int32_t			ujnl_recperblk;	/* u-journal records per block */
+	uint32_t			bsize;		/* cache block size */
+	uint32_t			metadata_size;	/* cache metadata record size */
+	uint32_t			metadata_bits;	/* log2 cache metadata record size */
+	uint32_t			ujnl_rsize;	/* update journal record size */
+	uint32_t			ujnl_recperblk;	/* u-journal records per block */
 	cachefs_blockix_t		bix_ujournal;	/* start of update journal */
 	cachefs_blockix_t		bix_vjournal;	/* start of invalid block journal */
 	cachefs_blockix_t		bix_wbjournal;	/* start of writeback journal */
@@ -69,32 +69,32 @@
  */
 struct cachefs_ondisc_index_entry
 {
-	u_int32_t			state : 7;
+	uint32_t			state : 7;
 #define CACHEFS_ONDISC_INDEX_FREE	0x7e
 #define CACHEFS_ONDISC_INDEX_RECYCLE	0x65
 #define CACHEFS_ONDISC_INDEX_ACTIVE	0x2c
 
-	u_int32_t			type : 1;
+	uint32_t			type : 1;
 #define CACHEFS_ONDISC_INDEX_DATAFILE	0
 #define CACHEFS_ONDISC_INDEX_INDEXFILE	1
 
-	u_int32_t			ino : 24;	/* inode containing catalogue/data */
+	uint32_t			ino : 24;	/* inode containing catalogue/data */
 	union {
-		u_int32_t		freelink[0];	/* next free entry pointer */
-		u_int8_t		data[0];	/* the index data */
+		uint32_t		freelink[0];	/* next free entry pointer */
+		uint8_t			data[0];	/* the index data */
 	};
 };
 
 #define CACHEFS_ONDISC_INDEX_ENTRY_MINSIZE \
-	(sizeof(struct cachefs_ondisc_index_entry) + sizeof(u_int32_t))
+	(sizeof(struct cachefs_ondisc_index_entry) + sizeof(uint32_t))
 
 /* index definition description */
 struct cachefs_ondisc_index_def
 {
-	u_int16_t			dsize;
-	u_int16_t			esize;
-	u_int16_t			keys[4];
-	u_int8_t			type[8];
+	uint16_t			dsize;
+	uint16_t			esize;
+	uint16_t			keys[4];
+	uint8_t				type[8];
 
 #define CACHEFS_ONDISC_INDEXKEY_KLEN	0x0FFF	/* length of key segment */
 #define CACHEFS_ONDISC_INDEXKEY_TYPE	0xF000	/* type of key segment */
@@ -104,7 +104,7 @@
 #define CACHEFS_ONDISC_INDEXKEY_IPV4	0x3000	/* - IPv4 address */
 #define CACHEFS_ONDISC_INDEXKEY_IPV6	0x4000	/* - IPv6 address */
 
-	u_int8_t			data[0];
+	uint8_t				data[0];
 };
 
 /*****************************************************************************/
@@ -122,12 +122,12 @@
 {
 	struct cachefs_ondisc_index_entry header;
 
-	u_int32_t			freelink;	/* head of free entry list (or UINT_MAX) */
-	u_int32_t			atime;		/* last access time */
-	u_int32_t			mtime;		/* last modification time */
-	u_int32_t			pindex;		/* parent index ID (0 for top of tree) */
-	u_int32_t			pindex_entry;	/* parent index entry number */
-	u_int64_t			size;		/* size of file */
+	uint32_t			freelink;	/* head of free entry list (or UINT_MAX) */
+	uint32_t			atime;		/* last access time */
+	uint32_t			mtime;		/* last modification time */
+	uint32_t			pindex;		/* parent index ID (0 for top of tree) */
+	uint32_t			pindex_entry;	/* parent index entry number */
+	uint64_t			size;		/* size of file */
 
 	/* index file definition */
 	struct cachefs_ondisc_index_def	index;
@@ -146,8 +146,8 @@
  */
 struct cachefs_ondisc_fsdef
 {
-	u_int8_t			name[24];	/* name of netfs */
-	u_int32_t			version;	/* version of layout */
+	uint8_t				name[24];	/* name of netfs */
+	uint32_t			version;	/* version of layout */
 };
 
 /*****************************************************************************/
@@ -178,7 +178,7 @@
 struct cachefs_ondisc_free_node
 {
 	cachefs_blockix_t	next;		/* next node in free tree */
-	u_int32_t		count;		/* number of blocks in tree after this one */
+	uint32_t		count;		/* number of blocks in tree after this one */
 	cachefs_blockix_t	leaves[0];	/* free blocks depending from this block */
 };
 
@@ -399,16 +399,16 @@
 
 struct cachefs_ondisc_ujnl_index {
 	struct cachefs_ondisc_index_def	def;
-	u_int32_t			next_ino;	/* next inode entry */
-	u_int32_t			next_index;	/* next index entry */
-	u_int8_t			data[0];
+	uint32_t			next_ino;	/* next inode entry */
+	uint32_t			next_index;	/* next index entry */
+	uint8_t				data[0];
 };
 
 struct cachefs_ondisc_update_journal
 {
 	enum cachefs_ondisc_ujnl_mark	mark;
 
-	u_int32_t			auxmark;
+	uint32_t			auxmark;
 #define CACHEFS_ONDISC_UJNL_SINGLE_0	0		/* single indirect (1 of) */
 #define CACHEFS_ONDISC_UJNL_DOUBLE_0	1		/* double indirect level 0 (1  of) */
 #define CACHEFS_ONDISC_UJNL_DOUBLE_1	2		/* double indirect level 1 (1K of) */
@@ -417,21 +417,21 @@
 #define CACHEFS_ONDISC_UJNL_TRIPLE_2	5		/* triple indirect level 2 (1M of) */
 
 	int16_t				batch;		/* batch number */
-	u_int16_t			serial;		/* serial number of entry in batch */
-	u_int32_t			ino;		/* in-cache inode number */
-	u_int32_t			pgnum;
-	u_int32_t			size;
-	u_int32_t			index;
-	u_int32_t			ixentry;
-	u_int16_t			entry;
-	u_int16_t			auxentry;
-	u_int16_t			upentry;
-	u_int16_t			rcm_ptrnext;	/* next ptr in rcm_block to be reclaimed */
-	u_int16_t			rcm_ptrstop;	/* last ptr in rcm_block + 1 */
-	u_int16_t			count;
-	u_int16_t			alloc_leaf;	/* current alloc point in alloc_cur */
-	u_int16_t			rcm_indirect;	/* indirect block being reclaimed */
-	u_int32_t			rcm_ino;	/* number of inode being reclaimed */
+	uint16_t			serial;		/* serial number of entry in batch */
+	uint32_t			ino;		/* in-cache inode number */
+	uint32_t			pgnum;
+	uint32_t			size;
+	uint32_t			index;
+	uint32_t			ixentry;
+	uint16_t			entry;
+	uint16_t			auxentry;
+	uint16_t			upentry;
+	uint16_t			rcm_ptrnext;	/* next ptr in rcm_block to be reclaimed */
+	uint16_t			rcm_ptrstop;	/* last ptr in rcm_block + 1 */
+	uint16_t			count;
+	uint16_t			alloc_leaf;	/* current alloc point in alloc_cur */
+	uint16_t			rcm_indirect;	/* indirect block being reclaimed */
+	uint32_t			rcm_ino;	/* number of inode being reclaimed */
 	cachefs_blockix_t		block;
 	cachefs_blockix_t		auxblock;
 	cachefs_blockix_t		upblock;
@@ -447,7 +447,7 @@
 		struct cachefs_ondisc_ujnl_index ixdata[0];
 
 		/* miscellaneous data */
-		u_int8_t data[0];
+		uint8_t data[0];
 	};
 };
 
@@ -464,8 +464,8 @@
  */
 struct cachefs_ondisc_validity_journal
 {
-	u_int32_t			ino;		/* inode number */
-	u_int32_t			pgnum;		/* page within inode */
+	uint32_t			ino;		/* inode number */
+	uint32_t			pgnum;		/* page within inode */
 };
 
 #define CACHEFS_ONDISC_VJNL_ENTPERPAGE	\
@@ -483,10 +483,10 @@
  */
 struct cachefs_ondisc_writeback_journal
 {
-	u_int32_t			ino;		/* in-cache inode number */
-	u_int32_t			size;		/* size of changed region */
-	u_int64_t			fpos;		/* start file position */
-	u_int8_t			fsdata[8];	/* FS-specific data */
+	uint32_t			ino;		/* in-cache inode number */
+	uint32_t			size;		/* size of changed region */
+	uint64_t			fpos;		/* start file position */
+	uint8_t				fsdata[8];	/* FS-specific data */
 };
 
 #define CACHEFS_ONDISC_WBJNL_ENTPERPAGE	\

Index: cachefs-int.h
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/cachefs-int.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- cachefs-int.h	18 Jul 2003 08:54:58 -0000	1.40
+++ cachefs-int.h	13 Aug 2003 10:05:28 -0000	1.41
@@ -137,7 +137,7 @@
 
 	unsigned			ujnl_jsof;	/* u-journal start sector */
 	int16_t				ujnl_batch;	/* next batch to be written */
-	u_int16_t			ujnl_serial;	/* next serial to use in batch */
+	uint16_t			ujnl_serial;	/* next serial to use in batch */
 	spinlock_t			ujnl_mk_lock;
 	struct list_head		ujnl_markq;	/* marked transactions */
 	struct list_head		ujnl_commitq;	/* committed transactions */
@@ -504,7 +504,7 @@
 struct cachefs_transaction
 {
 	int16_t				batch;		/* batch this mark belongs to */
-	u_int16_t			serial;		/* serial number within batch */
+	uint16_t			serial;		/* serial number within batch */
 	enum cachefs_trans_phase	phase;		/* current phase of ACK */
 	unsigned short			index;		/* index in u-journal of mark sector */
 
@@ -522,7 +522,7 @@
 
 	/* keep track of special changes that must only take effect under
 	 * certain circumstances */
-	u_int16_t			changed;
+	uint16_t			changed;
 #define CACHEFS_TRANS_CHANGED_ALLOC	0x0001	/* alloc stack/leaf changed */
 #define CACHEFS_TRANS_CHANGED_RECYCLE	0x0002	/* recycle stack changed */
 #define CACHEFS_TRANS_CHANGED_RCMBLOCK	0x0004	/* inode/block being reclaimed changed */

Index: aops.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/aops.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- aops.c	17 Jul 2003 12:02:13 -0000	1.44
+++ aops.c	13 Aug 2003 10:05:28 -0000	1.45
@@ -924,7 +924,7 @@
 	struct cachefs_super *super = sb->s_fs_info;
 	struct cachefs_block *block;
 	cachefs_blockix_t alloc2os = 0;
-	u_int32_t next_count = 0;
+	uint32_t next_count = 0;
 	int ret;
 	u8 *data;
 
@@ -1108,7 +1108,7 @@
 		}
 		else {
 			struct cachefs_ondisc_index_entry *xent;
-			u_int32_t entry, next;
+			uint32_t entry, next;
 			void *content;
 			int loop;