From 46137e17a8da872430785836fc270a05649a93ce Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Wed, 25 Nov 2015 22:46:57 +0900 Subject: [PATCH] hammer: Change u_int{8,16,32,64}_t to uint{8,16,32,64}_t in the following directories and/or files. * sys/vfs/hammer * sbin/hammer * sbin/newfs_hammer * sbin/mount_hammer * usr.bin/fstat/hammer.c * usr.bin/undo --- sbin/hammer/cmd_cleanup.c | 4 +- sbin/hammer/cmd_dedup.c | 46 +++++------ sbin/hammer/cmd_history.c | 4 +- sbin/hammer/cmd_mirror.c | 22 +++--- sbin/hammer/cmd_pseudofs.c | 2 +- sbin/hammer/cmd_show.c | 8 +- sbin/hammer/cmd_snapshot.c | 2 +- sbin/hammer/hammer.c | 10 +-- sbin/hammer/hammer.h | 6 +- sbin/hammer/ondisk.c | 2 +- sbin/hammer/test_dupkey.c | 18 ++--- sbin/newfs_hammer/newfs_hammer.c | 14 ++-- sys/vfs/hammer/hammer.h | 62 +++++++-------- sys/vfs/hammer/hammer_btree.c | 6 +- sys/vfs/hammer/hammer_btree.h | 32 ++++---- sys/vfs/hammer/hammer_disk.h | 116 ++++++++++++++-------------- sys/vfs/hammer/hammer_inode.c | 20 ++--- sys/vfs/hammer/hammer_ioctl.h | 42 +++++----- sys/vfs/hammer/hammer_mirror.c | 24 +++--- sys/vfs/hammer/hammer_mount.h | 4 +- sys/vfs/hammer/hammer_object.c | 8 +- sys/vfs/hammer/hammer_ondisk.c | 2 +- sys/vfs/hammer/hammer_pfs.c | 28 +++---- sys/vfs/hammer/hammer_prune.c | 2 +- sys/vfs/hammer/hammer_rebalance.c | 6 +- sys/vfs/hammer/hammer_reblock.c | 2 +- sys/vfs/hammer/hammer_recover.c | 12 +-- sys/vfs/hammer/hammer_redo.c | 2 +- sys/vfs/hammer/hammer_subs.c | 28 +++---- sys/vfs/hammer/hammer_transaction.c | 16 ++-- sys/vfs/hammer/hammer_undo.c | 4 +- sys/vfs/hammer/hammer_vfsops.c | 6 +- sys/vfs/hammer/hammer_vnops.c | 18 ++--- usr.bin/fstat/hammer.c | 4 +- 34 files changed, 291 insertions(+), 291 deletions(-) diff --git a/sbin/hammer/cmd_cleanup.c b/sbin/hammer/cmd_cleanup.c index 682c0476c3..0844ede7a8 100644 --- a/sbin/hammer/cmd_cleanup.c +++ b/sbin/hammer/cmd_cleanup.c @@ -677,7 +677,7 @@ migrate_one_snapshot(int fd, const char *fpath, snap = &snapshot->snaps[snapshot->count]; bzero(snap, sizeof(*snap)); snap->tid = tid; - snap->ts = (u_int64_t)t * 1000000ULL; + snap->ts = (uint64_t)t * 1000000ULL; snprintf(snap->label, sizeof(snap->label), "migrated"); ++snapshot->count; @@ -943,7 +943,7 @@ cleanup_softlinks(int fd, int new_config, time_t t; time_t dt; char snapts[32]; - u_int32_t i; + uint32_t i; bzero(&snapshot, sizeof(snapshot)); bzero(&dsnapshot, sizeof(dsnapshot)); diff --git a/sbin/hammer/cmd_dedup.c b/sbin/hammer/cmd_dedup.c index cab98f9f7d..309c4df3d5 100644 --- a/sbin/hammer/cmd_dedup.c +++ b/sbin/hammer/cmd_dedup.c @@ -48,8 +48,8 @@ RB_PROTOTYPE2(sim_dedup_entry_rb_tree, sim_dedup_entry, rb_entry, struct sim_dedup_entry { hammer_crc_t crc; - u_int64_t ref_blks; /* number of blocks referenced */ - u_int64_t ref_size; /* size of data referenced */ + uint64_t ref_blks; /* number of blocks referenced */ + uint64_t ref_size; /* size of data referenced */ RB_ENTRY(sim_dedup_entry) rb_entry; }; @@ -57,12 +57,12 @@ struct dedup_entry { struct hammer_btree_leaf_elm leaf; union { struct { - u_int64_t ref_blks; - u_int64_t ref_size; + uint64_t ref_blks; + uint64_t ref_size; } de; RB_HEAD(sha_dedup_entry_rb_tree, sha_dedup_entry) fict_root; } u; - u_int8_t flags; + uint8_t flags; RB_ENTRY(dedup_entry) rb_entry; }; @@ -70,9 +70,9 @@ struct dedup_entry { struct sha_dedup_entry { struct hammer_btree_leaf_elm leaf; - u_int64_t ref_blks; - u_int64_t ref_size; - u_int8_t sha_hash[SHA256_DIGEST_LENGTH]; + uint64_t ref_blks; + uint64_t ref_size; + uint8_t sha_hash[SHA256_DIGEST_LENGTH]; RB_ENTRY(sha_dedup_entry) fict_entry; }; @@ -106,9 +106,9 @@ static int SigAlrmFlag; static int64_t DedupDataReads; static int64_t DedupCurrentRecords; static int64_t DedupTotalRecords; -static u_int32_t DedupCrcStart; -static u_int32_t DedupCrcEnd; -static u_int64_t MemoryUse; +static uint32_t DedupCrcStart; +static uint32_t DedupCrcEnd; +static uint64_t MemoryUse; /* PFS global ids - we deal with just one PFS at a run */ int glob_fd; @@ -119,14 +119,14 @@ struct hammer_ioc_pseudofs_rw glob_pfs; * * Last three don't have to be 64-bit, just to be safe.. */ -u_int64_t dedup_alloc_size = 0; -u_int64_t dedup_ref_size = 0; -u_int64_t dedup_skipped_size = 0; -u_int64_t dedup_crc_failures = 0; -u_int64_t dedup_sha_failures = 0; -u_int64_t dedup_underflows = 0; -u_int64_t dedup_successes_count = 0; -u_int64_t dedup_successes_bytes = 0; +uint64_t dedup_alloc_size = 0; +uint64_t dedup_ref_size = 0; +uint64_t dedup_skipped_size = 0; +uint64_t dedup_crc_failures = 0; +uint64_t dedup_sha_failures = 0; +uint64_t dedup_underflows = 0; +uint64_t dedup_successes_count = 0; +uint64_t dedup_successes_bytes = 0; static int rb_sim_dedup_entry_compare(struct sim_dedup_entry *sim_de1, struct sim_dedup_entry *sim_de2); @@ -139,7 +139,7 @@ static void scan_pfs(char *filesystem, scan_pfs_cb_t func, const char *id); static int collect_btree_elm(hammer_btree_leaf_elm_t scan_leaf, int flags); static int count_btree_elm(hammer_btree_leaf_elm_t scan_leaf, int flags); static int process_btree_elm(hammer_btree_leaf_elm_t scan_leaf, int flags); -static int upgrade_chksum(hammer_btree_leaf_elm_t leaf, u_int8_t *sha_hash); +static int upgrade_chksum(hammer_btree_leaf_elm_t leaf, uint8_t *sha_hash); static void dump_simulated_dedup(void); static void dump_real_dedup(void); static void dedup_usage(int code); @@ -404,7 +404,7 @@ collect_btree_elm(hammer_btree_leaf_elm_t scan_leaf, int flags __unused) */ if (MemoryUse > MemoryLimit) { DedupCrcEnd = DedupCrcStart + - (u_int32_t)(DedupCrcEnd - DedupCrcStart - 1) / 2; + (uint32_t)(DedupCrcEnd - DedupCrcStart - 1) / 2; if (VerboseOpt) { printf("memory limit crc-range %08x-%08x\n", DedupCrcStart, DedupCrcEnd); @@ -517,7 +517,7 @@ process_btree_elm(hammer_btree_leaf_elm_t scan_leaf, int flags) */ while (MemoryUse > MemoryLimit) { DedupCrcEnd = DedupCrcStart + - (u_int32_t)(DedupCrcEnd - DedupCrcStart - 1) / 2; + (uint32_t)(DedupCrcEnd - DedupCrcStart - 1) / 2; if (VerboseOpt) { printf("memory limit crc-range %08x-%08x\n", DedupCrcStart, DedupCrcEnd); @@ -806,7 +806,7 @@ terminate_early: } static int -upgrade_chksum(hammer_btree_leaf_elm_t leaf, u_int8_t *sha_hash) +upgrade_chksum(hammer_btree_leaf_elm_t leaf, uint8_t *sha_hash) { struct hammer_ioc_data data; char *buf = malloc(DEDUP_BUF); diff --git a/sbin/hammer/cmd_history.c b/sbin/hammer/cmd_history.c index 13bdc9a87d..9c338cb21f 100644 --- a/sbin/hammer/cmd_history.c +++ b/sbin/hammer/cmd_history.c @@ -46,7 +46,7 @@ static void hammer_do_history(const char *path, off_t off, int len); static int parse_attr(const char *s, cmd_attr_t *ca); static int parse_attr_path(const char *s, cmd_attr_t *ca); static void dumpat(const char *path, off_t off, int len); -static const char *timestr32(u_int32_t time32); +static const char *timestr32(uint32_t time32); static __inline int test_strtol(int res, long val); static __inline int test_strtoll(int res, long long val); @@ -239,7 +239,7 @@ dumpat(const char *path, off_t off, int len) * Return a human-readable timestamp */ static const char * -timestr32(u_int32_t time32) +timestr32(uint32_t time32) { static char timebuf[64]; time_t t = (time_t)time32; diff --git a/sbin/hammer/cmd_mirror.c b/sbin/hammer/cmd_mirror.c index 578c6d2393..ce8d9f10b6 100644 --- a/sbin/hammer/cmd_mirror.c +++ b/sbin/hammer/cmd_mirror.c @@ -42,7 +42,7 @@ typedef struct histogram { hammer_tid_t tid; - u_int64_t bytes; + uint64_t bytes; } *histogram_t; static int read_mrecords(int fd, char *buf, u_int size, @@ -53,7 +53,7 @@ static int generate_histogram(int fd, const char *filesystem, int *repeatp); static hammer_ioc_mrecord_any_t read_mrecord(int fdin, int *errorp, hammer_ioc_mrecord_head_t pickup); -static void write_mrecord(int fdout, u_int32_t type, +static void write_mrecord(int fdout, uint32_t type, hammer_ioc_mrecord_any_t mrec, int bytes); static void generate_mrec_header(int fd, int pfs_id, union hammer_ioc_mrecord_any *mrec_tmp); @@ -62,7 +62,7 @@ static int validate_mrec_header(int fd, int fdin, int is_target, int pfs_id, hammer_tid_t *tid_begp, hammer_tid_t *tid_endp); static void update_pfs_snapshot(int fd, hammer_tid_t snapshot_tid, int pfs_id); static ssize_t writebw(int fd, const void *buf, size_t nbytes, - u_int64_t *bwcount, struct timeval *tv1); + uint64_t *bwcount, struct timeval *tv1); static int getyn(void); static void mirror_usage(int code); @@ -102,8 +102,8 @@ hammer_cmd_mirror_read(char **av, int ac, int streaming) int64_t total_bytes; time_t base_t = time(NULL); struct timeval bwtv; - u_int64_t bwcount; - u_int64_t estbytes; + uint64_t bwcount; + uint64_t estbytes; if (ac == 0 || ac > 2) mirror_usage(1); @@ -509,9 +509,9 @@ generate_histogram(int fd, const char *filesystem, hammer_tid_t tid_end; hammer_tid_t tid; hammer_tid_t tidx; - u_int64_t *tid_bytes; - u_int64_t total; - u_int64_t accum; + uint64_t *tid_bytes; + uint64_t total; + uint64_t accum; int chunkno; int i; int res; @@ -713,7 +713,7 @@ create_pfs(const char *filesystem, uuid_t *s_uuid) } } - u_int32_t status; + uint32_t status; char *shared_uuid = NULL; uuid_to_string(s_uuid, &shared_uuid, &status); @@ -1475,7 +1475,7 @@ read_mrecord(int fdin, int *errorp, hammer_ioc_mrecord_head_t pickup) static void -write_mrecord(int fdout, u_int32_t type, hammer_ioc_mrecord_any_t mrec, +write_mrecord(int fdout, uint32_t type, hammer_ioc_mrecord_any_t mrec, int bytes) { char zbuf[HAMMER_HEAD_ALIGN]; @@ -1650,7 +1650,7 @@ update_pfs_snapshot(int fd, hammer_tid_t snapshot_tid, int pfs_id) static ssize_t writebw(int fd, const void *buf, size_t nbytes, - u_int64_t *bwcount, struct timeval *tv1) + uint64_t *bwcount, struct timeval *tv1) { struct timeval tv2; size_t n; diff --git a/sbin/hammer/cmd_pseudofs.c b/sbin/hammer/cmd_pseudofs.c index 0f427fa5e5..5bd5968727 100644 --- a/sbin/hammer/cmd_pseudofs.c +++ b/sbin/hammer/cmd_pseudofs.c @@ -561,7 +561,7 @@ void dump_pfsd(hammer_pseudofs_data_t pfsd, int fd) { struct hammer_ioc_version version; - u_int32_t status; + uint32_t status; char *str = NULL; printf(" sync-beg-tid=0x%016jx\n", (uintmax_t)pfsd->sync_beg_tid); diff --git a/sbin/hammer/cmd_show.c b/sbin/hammer/cmd_show.c index 9f3e53b3d9..c31140bb18 100644 --- a/sbin/hammer/cmd_show.c +++ b/sbin/hammer/cmd_show.c @@ -267,7 +267,7 @@ print_btree_node(hammer_off_t node_offset, btree_search_t search, static __inline int -is_root_btree_beg(u_int8_t type, int i, hammer_btree_elm_t elm) +is_root_btree_beg(uint8_t type, int i, hammer_btree_elm_t elm) { /* * elm->base.btype depends on what the original node had @@ -287,7 +287,7 @@ is_root_btree_beg(u_int8_t type, int i, hammer_btree_elm_t elm) static __inline int -is_root_btree_end(u_int8_t type, int i, hammer_btree_elm_t elm) +is_root_btree_end(uint8_t type, int i, hammer_btree_elm_t elm) { return (type == HAMMER_BTREE_TYPE_INTERNAL && i != 0 && @@ -564,7 +564,7 @@ check_data_crc(hammer_btree_elm_t elm) hammer_off_t data_offset; int32_t data_len; int32_t len; - u_int32_t crc; + uint32_t crc; int error; char *ptr; @@ -645,7 +645,7 @@ print_record(hammer_btree_elm_t elm) hammer_off_t data_offset; int32_t data_len; hammer_data_ondisk_t data; - u_int32_t status; + uint32_t status; char *str1 = NULL; char *str2 = NULL; diff --git a/sbin/hammer/cmd_snapshot.c b/sbin/hammer/cmd_snapshot.c index b038d8a4c7..050bd4f0e8 100644 --- a/sbin/hammer/cmd_snapshot.c +++ b/sbin/hammer/cmd_snapshot.c @@ -485,7 +485,7 @@ snapshot_ls(const char *path) struct hammer_snapshot_data *snap; struct tm *tp; time_t t; - u_int32_t i; + uint32_t i; int fd; char snapts[64]; char *mntpoint; diff --git a/sbin/hammer/hammer.c b/sbin/hammer/hammer.c index 6f4706d0fa..4b61c7147a 100644 --- a/sbin/hammer/hammer.c +++ b/sbin/hammer/hammer.c @@ -54,9 +54,9 @@ int RunningIoctl; int DidInterrupt; int BulkOpt; int AllPFS; -u_int64_t BandwidthOpt; -u_int64_t SplitupOpt = 4ULL * 1024ULL * 1024ULL * 1024ULL; -u_int64_t MemoryLimit = 1024LLU * 1024 * 1024; +uint64_t BandwidthOpt; +uint64_t SplitupOpt = 4ULL * 1024ULL * 1024ULL * 1024ULL; +uint64_t MemoryLimit = 1024LLU * 1024 * 1024; const char *SplitupOptStr; const char *CyclePath; const char *RestrictTarget; @@ -67,7 +67,7 @@ main(int ac, char **av) char *blkdevs = NULL; char *ptr; char *restrictcmd = NULL; - u_int32_t status; + uint32_t status; int ch; int cacheSize = 0; @@ -295,7 +295,7 @@ main(int ac, char **av) if (aname == NULL) usage(1); len = strlen(aname); - key = (u_int32_t)crc32(aname, len) & 0xFFFFFFFEU; + key = (uint32_t)crc32(aname, len) & 0xFFFFFFFEU; switch(len) { default: diff --git a/sbin/hammer/hammer.h b/sbin/hammer/hammer.h index 66beb024b5..fdd3e8e2de 100644 --- a/sbin/hammer/hammer.h +++ b/sbin/hammer/hammer.h @@ -77,9 +77,9 @@ extern int DidInterrupt; extern int ForceOpt; extern int BulkOpt; extern int AllPFS; -extern u_int64_t BandwidthOpt; -extern u_int64_t SplitupOpt; -extern u_int64_t MemoryLimit; +extern uint64_t BandwidthOpt; +extern uint64_t SplitupOpt; +extern uint64_t MemoryLimit; extern const char *SplitupOptStr; extern const char *CyclePath; diff --git a/sbin/hammer/ondisk.c b/sbin/hammer/ondisk.c index fa3b14ebca..2f315df405 100644 --- a/sbin/hammer/ondisk.c +++ b/sbin/hammer/ondisk.c @@ -697,7 +697,7 @@ format_undomap(struct volume_info *root_vol) hammer_off_t scan; int n; int limit_index; - u_int32_t seqno; + uint32_t seqno; /* Only root volume needs formatting */ assert(root_vol->vol_no == RootVolNo); diff --git a/sbin/hammer/test_dupkey.c b/sbin/hammer/test_dupkey.c index c38c35666e..97b710a007 100644 --- a/sbin/hammer/test_dupkey.c +++ b/sbin/hammer/test_dupkey.c @@ -10,20 +10,20 @@ #include "hammer_util.h" -static u_int32_t namekey(const char *name); +static uint32_t namekey(const char *name); static void randomname(char *name); -u_int32_t bitmap[0x80000000U / 32]; +uint32_t bitmap[0x80000000U / 32]; int main(int ac, char **av) { char name[32]; - u_int32_t key; - u_int32_t *ptr; - u_int32_t mask; - u_int32_t count; - u_int32_t saved; + uint32_t key; + uint32_t *ptr; + uint32_t mask; + uint32_t count; + uint32_t saved; srandom(0); /* reproducable random sequence number */ count = 0; @@ -55,10 +55,10 @@ main(int ac, char **av) } static -u_int32_t +uint32_t namekey(const char *name) { - u_int32_t key; + uint32_t key; key = crc32(name, strlen(name)) & 0x7FFFFFFF; if (key == 0) diff --git a/sbin/newfs_hammer/newfs_hammer.c b/sbin/newfs_hammer/newfs_hammer.c index 0b0600ec56..877b6d7ba8 100644 --- a/sbin/newfs_hammer/newfs_hammer.c +++ b/sbin/newfs_hammer/newfs_hammer.c @@ -43,7 +43,7 @@ static void trim_volume(struct volume_info *vol); static void format_volume(struct volume_info *vol, int nvols,const char *label, off_t total_size); static hammer_off_t format_root(const char *label); -static u_int64_t nowtime(void); +static uint64_t nowtime(void); static void usage(void); static int ForceOpt = 0; @@ -54,7 +54,7 @@ static int HammerVersion = -1; int main(int ac, char **av) { - u_int32_t status; + uint32_t status; off_t total; off_t avg_vol_size; int ch; @@ -408,11 +408,11 @@ createtid(void) return(lasttid++); } -static u_int64_t +static uint64_t nowtime(void) { struct timeval tv; - u_int64_t xtime; + uint64_t xtime; gettimeofday(&tv, NULL); xtime = tv.tv_sec * 1000000LL + tv.tv_usec; @@ -582,7 +582,7 @@ format_root(const char *label) struct buffer_info *data_buffer1 = NULL; struct buffer_info *data_buffer2 = NULL; hammer_btree_elm_t elm; - u_int64_t xtime; + uint64_t xtime; /* * Allocate zero-filled root btree node, inode and pfs @@ -635,7 +635,7 @@ format_root(const char *label) elm->leaf.base.delete_tid = 0; elm->leaf.base.rec_type = HAMMER_RECTYPE_INODE; elm->leaf.base.obj_type = HAMMER_OBJTYPE_DIRECTORY; - elm->leaf.create_ts = (u_int32_t)time(NULL); + elm->leaf.create_ts = (uint32_t)time(NULL); elm->leaf.data_offset = data_off; elm->leaf.data_len = sizeof(*idata); @@ -651,7 +651,7 @@ format_root(const char *label) elm->leaf.base.delete_tid = 0; elm->leaf.base.rec_type = HAMMER_RECTYPE_PFS; elm->leaf.base.obj_type = 0; - elm->leaf.create_ts = (u_int32_t)time(NULL); + elm->leaf.create_ts = (uint32_t)time(NULL); elm->leaf.data_offset = pfsd_off; elm->leaf.data_len = sizeof(*pfsd); diff --git a/sys/vfs/hammer/hammer.h b/sys/vfs/hammer/hammer.h index 054a60d8e1..f143094195 100644 --- a/sys/vfs/hammer/hammer.h +++ b/sys/vfs/hammer/hammer.h @@ -101,7 +101,7 @@ struct hammer_io; typedef struct hammer_inode_info { int64_t obj_id; /* (key) object identifier */ hammer_tid_t obj_asof; /* (key) snapshot transid or 0 */ - u_int32_t obj_localization; /* (key) pseudo-fs */ + uint32_t obj_localization; /* (key) pseudo-fs */ union { struct hammer_btree_leaf_elm *leaf; } u; @@ -120,8 +120,8 @@ struct hammer_transaction { hammer_transaction_type_t type; struct hammer_mount *hmp; hammer_tid_t tid; - u_int64_t time; - u_int32_t time32; + uint64_t time; + uint32_t time32; int sync_lock_refs; int flags; struct hammer_volume *rootvol; @@ -227,12 +227,12 @@ typedef enum hammer_inode_state { struct hammer_pseudofs_inmem; RB_HEAD(hammer_pfs_rb_tree, hammer_pseudofs_inmem); RB_PROTOTYPE2(hammer_pfs_rb_tree, hammer_pseudofs_inmem, rb_node, - hammer_pfs_rb_compare, u_int32_t); + hammer_pfs_rb_compare, uint32_t); struct hammer_pseudofs_inmem { RB_ENTRY(hammer_pseudofs_inmem) rb_node; struct hammer_lock lock; - u_int32_t localization; + uint32_t localization; hammer_tid_t create_tid; int flags; udev_t fsid_udev; @@ -253,15 +253,15 @@ typedef struct hammer_pseudofs_inmem *hammer_pseudofs_inmem_t; #define OBJID_CACHE_BULK_BITS 10 /* 10 bits (1024) */ #define OBJID_CACHE_BULK (32 * 32) /* two level (1024) */ #define OBJID_CACHE_BULK_MASK (OBJID_CACHE_BULK - 1) -#define OBJID_CACHE_BULK_MASK64 ((u_int64_t)(OBJID_CACHE_BULK - 1)) +#define OBJID_CACHE_BULK_MASK64 ((uint64_t)(OBJID_CACHE_BULK - 1)) typedef struct hammer_objid_cache { TAILQ_ENTRY(hammer_objid_cache) entry; struct hammer_inode *dip; hammer_tid_t base_tid; int count; - u_int32_t bm0; - u_int32_t bm1[32]; + uint32_t bm0; + uint32_t bm1[32]; } *hammer_objid_cache_t; /* @@ -295,7 +295,7 @@ typedef struct hammer_dedup_cache { TAILQ_ENTRY(hammer_dedup_cache) lru_entry; struct hammer_mount *hmp; int64_t obj_id; - u_int32_t localization; + uint32_t localization; off_t file_offset; int bytes; hammer_off_t data_offset; @@ -367,7 +367,7 @@ struct hammer_inode { struct hammer_record_list target_list; /* target of dependant recs */ int64_t obj_id; /* (key) object identifier */ hammer_tid_t obj_asof; /* (key) snapshot or 0 */ - u_int32_t obj_localization; /* (key) pseudo-fs */ + uint32_t obj_localization; /* (key) pseudo-fs */ struct hammer_mount *hmp; hammer_objid_cache_t objid_cache; int flags; @@ -917,8 +917,8 @@ struct hammer_mount { hammer_tid_t flush_tid1; /* flusher tid sequencing */ hammer_tid_t flush_tid2; /* flusher tid sequencing */ int64_t copy_stat_freebigblocks; /* number of free big-blocks */ - u_int32_t undo_seqno; /* UNDO/REDO FIFO seqno */ - u_int32_t recover_stage2_seqno; /* REDO recovery seqno */ + uint32_t undo_seqno; /* UNDO/REDO FIFO seqno */ + uint32_t recover_stage2_seqno; /* REDO recovery seqno */ hammer_off_t recover_stage2_offset; /* REDO recovery offset */ struct netexport export; @@ -1081,15 +1081,15 @@ int hammer_vop_reclaim(struct vop_reclaim_args *); int hammer_get_vnode(struct hammer_inode *ip, struct vnode **vpp); struct hammer_inode *hammer_get_inode(hammer_transaction_t trans, hammer_inode_t dip, int64_t obj_id, - hammer_tid_t asof, u_int32_t localization, + hammer_tid_t asof, uint32_t localization, int flags, int *errorp); struct hammer_inode *hammer_get_dummy_inode(hammer_transaction_t trans, hammer_inode_t dip, int64_t obj_id, - hammer_tid_t asof, u_int32_t localization, + hammer_tid_t asof, uint32_t localization, int flags, int *errorp); struct hammer_inode *hammer_find_inode(hammer_transaction_t trans, int64_t obj_id, hammer_tid_t asof, - u_int32_t localization); + uint32_t localization); void hammer_scan_inode_snapshots(hammer_mount_t hmp, hammer_inode_info_t iinfo, int (*callback)(hammer_inode_t ip, void *data), @@ -1118,7 +1118,7 @@ int hammer_ip_delete_record(hammer_cursor_t cursor, hammer_inode_t ip, int hammer_create_at_cursor(hammer_cursor_t cursor, hammer_btree_leaf_elm_t leaf, void *udata, int mode); int hammer_delete_at_cursor(hammer_cursor_t cursor, int delete_flags, - hammer_tid_t delete_tid, u_int32_t delete_ts, + hammer_tid_t delete_tid, uint32_t delete_ts, int track, int64_t *stat_bytes); int hammer_ip_check_directory_empty(hammer_transaction_t trans, hammer_inode_t ip); @@ -1165,12 +1165,12 @@ void hammer_sync_lock_sh(hammer_transaction_t trans); int hammer_sync_lock_sh_try(hammer_transaction_t trans); void hammer_sync_unlock(hammer_transaction_t trans); -u_int32_t hammer_to_unix_xid(uuid_t *uuid); -void hammer_guid_to_uuid(uuid_t *uuid, u_int32_t guid); -void hammer_time_to_timespec(u_int64_t xtime, struct timespec *ts); -u_int64_t hammer_timespec_to_time(struct timespec *ts); +uint32_t hammer_to_unix_xid(uuid_t *uuid); +void hammer_guid_to_uuid(uuid_t *uuid, uint32_t guid); +void hammer_time_to_timespec(uint64_t xtime, struct timespec *ts); +uint64_t hammer_timespec_to_time(struct timespec *ts); int hammer_str_to_tid(const char *str, int *ispfsp, - hammer_tid_t *tidp, u_int32_t *localizationp); + hammer_tid_t *tidp, uint32_t *localizationp); hammer_tid_t hammer_alloc_objid(hammer_mount_t hmp, hammer_inode_t dip, int64_t namekey); void hammer_clear_objid(hammer_inode_t dip); @@ -1193,11 +1193,11 @@ int hammer_dedup_validate(hammer_dedup_cache_t dcp, int zone, int bytes, int hammer_enter_undo_history(hammer_mount_t hmp, hammer_off_t offset, int bytes); void hammer_clear_undo_history(hammer_mount_t hmp); -enum vtype hammer_get_vnode_type(u_int8_t obj_type); -int hammer_get_dtype(u_int8_t obj_type); -u_int8_t hammer_get_obj_type(enum vtype vtype); +enum vtype hammer_get_vnode_type(uint8_t obj_type); +int hammer_get_dtype(uint8_t obj_type); +uint8_t hammer_get_obj_type(enum vtype vtype); int64_t hammer_directory_namekey(hammer_inode_t dip, const void *name, int len, - u_int32_t *max_iterationsp); + uint32_t *max_iterationsp); int hammer_nohistory(hammer_inode_t ip); int hammer_init_cursor(hammer_transaction_t trans, hammer_cursor_t cursor, @@ -1315,20 +1315,20 @@ void hammer_dup_buffer(struct hammer_buffer **bufferp, hammer_node_t hammer_alloc_btree(hammer_transaction_t trans, hammer_off_t hint, int *errorp); void *hammer_alloc_data(hammer_transaction_t trans, int32_t data_len, - u_int16_t rec_type, hammer_off_t *data_offsetp, + uint16_t rec_type, hammer_off_t *data_offsetp, struct hammer_buffer **data_bufferp, hammer_off_t hint, int *errorp); int hammer_generate_undo(hammer_transaction_t trans, hammer_off_t zone_offset, void *base, int len); int hammer_generate_redo(hammer_transaction_t trans, hammer_inode_t ip, - hammer_off_t file_offset, u_int32_t flags, + hammer_off_t file_offset, uint32_t flags, void *base, int len); void hammer_generate_redo_sync(hammer_transaction_t trans); void hammer_redo_fifo_start_flush(hammer_inode_t ip); void hammer_redo_fifo_end_flush(hammer_inode_t ip); -void hammer_format_undo(void *base, u_int32_t seqno); +void hammer_format_undo(void *base, uint32_t seqno); int hammer_upgrade_undo_4(hammer_transaction_t trans); void hammer_put_volume(struct hammer_volume *volume, int flush); @@ -1417,12 +1417,12 @@ int hammer_ip_sync_data(hammer_cursor_t cursor, hammer_inode_t ip, int64_t offset, void *data, int bytes); int hammer_ip_sync_record_cursor(hammer_cursor_t cursor, hammer_record_t rec); hammer_pseudofs_inmem_t hammer_load_pseudofs(hammer_transaction_t trans, - u_int32_t localization, int *errorp); + uint32_t localization, int *errorp); int hammer_mkroot_pseudofs(hammer_transaction_t trans, struct ucred *cred, hammer_pseudofs_inmem_t pfsm); int hammer_save_pseudofs(hammer_transaction_t trans, hammer_pseudofs_inmem_t pfsm); -int hammer_unload_pseudofs(hammer_transaction_t trans, u_int32_t localization); +int hammer_unload_pseudofs(hammer_transaction_t trans, uint32_t localization); void hammer_rel_pseudofs(hammer_mount_t hmp, hammer_pseudofs_inmem_t pfsm); int hammer_ioctl(hammer_inode_t ip, u_long com, caddr_t data, int fflag, struct ucred *cred); @@ -1669,7 +1669,7 @@ hammer_blockmap_lookup(hammer_mount_t hmp, hammer_off_t zone_offset, * This greatly improves localization between directory entries and * inodes */ -static __inline u_int32_t +static __inline uint32_t hammer_dir_localization(hammer_inode_t dip) { return(HAMMER_DIR_INODE_LOCALIZATION(&dip->ino_data)); diff --git a/sys/vfs/hammer/hammer_btree.c b/sys/vfs/hammer/hammer_btree.c index 62b1f4f67a..29fa6d2c53 100644 --- a/sys/vfs/hammer/hammer_btree.c +++ b/sys/vfs/hammer/hammer_btree.c @@ -85,7 +85,7 @@ static int btree_split_internal(hammer_cursor_t cursor); static int btree_split_leaf(hammer_cursor_t cursor); static int btree_remove(hammer_cursor_t cursor, int *ndelete); static __inline int btree_node_is_full(hammer_node_ondisk_t node); -static __inline int btree_max_elements(u_int8_t type); +static __inline int btree_max_elements(uint8_t type); static int hammer_btree_mirror_propagate(hammer_cursor_t cursor, hammer_tid_t mirror_tid); static void hammer_make_separator(hammer_base_elm_t key1, @@ -1124,7 +1124,7 @@ btree_search(hammer_cursor_t cursor, int flags) * left_boundary but to the RIGHT of the parent's left * boundary. */ - u_int8_t save; + uint8_t save; elm = &node->elms[0]; @@ -2945,7 +2945,7 @@ btree_node_is_full(hammer_node_ondisk_t node) static __inline int -btree_max_elements(u_int8_t type) +btree_max_elements(uint8_t type) { int n; diff --git a/sys/vfs/hammer/hammer_btree.h b/sys/vfs/hammer/hammer_btree.h index 11ae8bca0e..b754b9fa37 100644 --- a/sys/vfs/hammer/hammer_btree.h +++ b/sys/vfs/hammer/hammer_btree.h @@ -95,10 +95,10 @@ struct hammer_base_elm { hammer_tid_t create_tid; /* 10 transaction id for record creation */ hammer_tid_t delete_tid; /* 18 transaction id for record update/del */ - u_int16_t rec_type; /* 20 _RECTYPE_ */ - u_int8_t obj_type; /* 22 _OBJTYPE_ (restricted) */ - u_int8_t btype; /* 23 B-Tree element type */ - u_int32_t localization; /* 24 B-Tree localization parameter */ + uint16_t rec_type; /* 20 _RECTYPE_ */ + uint8_t obj_type; /* 22 _OBJTYPE_ (restricted) */ + uint8_t btype; /* 23 B-Tree element type */ + uint32_t localization; /* 24 B-Tree localization parameter */ /* 28 */ }; @@ -153,8 +153,8 @@ typedef struct hammer_btree_internal_elm *hammer_btree_internal_elm_t; */ struct hammer_btree_leaf_elm { struct hammer_base_elm base; - u_int32_t create_ts; - u_int32_t delete_ts; + uint32_t create_ts; + uint32_t delete_ts; hammer_off_t data_offset; int32_t data_len; hammer_crc_t data_crc; @@ -197,11 +197,11 @@ typedef union hammer_btree_elm *hammer_btree_elm_t; #define HAMMER_BTREE_LEAF_ELMS 63 #define HAMMER_BTREE_INT_ELMS (HAMMER_BTREE_LEAF_ELMS - 1) -#define HAMMER_BTREE_TYPE_INTERNAL ((u_int8_t)'I') -#define HAMMER_BTREE_TYPE_LEAF ((u_int8_t)'L') -#define HAMMER_BTREE_TYPE_RECORD ((u_int8_t)'R') -#define HAMMER_BTREE_TYPE_DELETED ((u_int8_t)'D') -#define HAMMER_BTREE_TYPE_NONE ((u_int8_t)0) +#define HAMMER_BTREE_TYPE_INTERNAL ((uint8_t)'I') +#define HAMMER_BTREE_TYPE_LEAF ((uint8_t)'L') +#define HAMMER_BTREE_TYPE_RECORD ((uint8_t)'R') +#define HAMMER_BTREE_TYPE_DELETED ((uint8_t)'D') +#define HAMMER_BTREE_TYPE_NONE ((uint8_t)0) /* * Return 1 if elm is a node element of an internal node, @@ -236,7 +236,7 @@ hammer_is_leaf_node_elm(hammer_btree_elm_t elm) static __inline int -hammer_node_max_elements(u_int8_t type) +hammer_node_max_elements(uint8_t type) { switch (type) { case HAMMER_BTREE_TYPE_LEAF: @@ -269,12 +269,12 @@ struct hammer_node_ondisk { * B-Tree node header (64 bytes) */ hammer_crc_t crc; /* MUST BE FIRST FIELD OF STRUCTURE */ - u_int32_t reserved00; + uint32_t reserved00; hammer_off_t parent; /* 0 if at root of B-Tree */ int32_t count; - u_int8_t type; - u_int8_t reserved01; - u_int16_t reserved02; + uint8_t type; + uint8_t reserved01; + uint16_t reserved02; hammer_off_t reserved03; /* future link_left */ hammer_off_t reserved04; /* future link_right */ hammer_off_t reserved05; diff --git a/sys/vfs/hammer/hammer_disk.h b/sys/vfs/hammer/hammer_disk.h index 279d202b74..b402d5de20 100644 --- a/sys/vfs/hammer/hammer_disk.h +++ b/sys/vfs/hammer/hammer_disk.h @@ -71,11 +71,11 @@ #define HAMMER_BUFMASK (HAMMER_BUFSIZE - 1) #define HAMMER_XBUFMASK (HAMMER_XBUFSIZE - 1) -#define HAMMER_BUFSIZE64 ((u_int64_t)HAMMER_BUFSIZE) -#define HAMMER_BUFMASK64 ((u_int64_t)HAMMER_BUFMASK) +#define HAMMER_BUFSIZE64 ((uint64_t)HAMMER_BUFSIZE) +#define HAMMER_BUFMASK64 ((uint64_t)HAMMER_BUFMASK) -#define HAMMER_XBUFSIZE64 ((u_int64_t)HAMMER_XBUFSIZE) -#define HAMMER_XBUFMASK64 ((u_int64_t)HAMMER_XBUFMASK) +#define HAMMER_XBUFSIZE64 ((uint64_t)HAMMER_XBUFSIZE) +#define HAMMER_XBUFMASK64 ((uint64_t)HAMMER_XBUFMASK) #define HAMMER_OFF_ZONE_MASK 0xF000000000000000ULL /* zone portion */ #define HAMMER_OFF_VOL_MASK 0x0FF0000000000000ULL /* volume portion */ @@ -97,9 +97,9 @@ * and volume number in addition to the offset. Most offsets are required * to be 16 KB aligned. */ -typedef u_int64_t hammer_tid_t; -typedef u_int64_t hammer_off_t; -typedef u_int32_t hammer_crc_t; +typedef uint64_t hammer_tid_t; +typedef uint64_t hammer_off_t; +typedef uint32_t hammer_crc_t; #define HAMMER_MIN_TID 0ULL /* unsigned */ #define HAMMER_MAX_TID 0xFFFFFFFFFFFFFFFFULL /* unsigned */ @@ -222,12 +222,12 @@ typedef u_int32_t hammer_crc_t; * HINTBLOCK is a heuristic. */ #define HAMMER_HINTBLOCK_SIZE (HAMMER_BIGBLOCK_SIZE * 4) -#define HAMMER_HINTBLOCK_MASK64 ((u_int64_t)HAMMER_HINTBLOCK_SIZE - 1) +#define HAMMER_HINTBLOCK_MASK64 ((uint64_t)HAMMER_HINTBLOCK_SIZE - 1) #define HAMMER_BIGBLOCK_SIZE (8192 * 1024) #define HAMMER_BIGBLOCK_OVERFILL (6144 * 1024) -#define HAMMER_BIGBLOCK_SIZE64 ((u_int64_t)HAMMER_BIGBLOCK_SIZE) +#define HAMMER_BIGBLOCK_SIZE64 ((uint64_t)HAMMER_BIGBLOCK_SIZE) #define HAMMER_BIGBLOCK_MASK (HAMMER_BIGBLOCK_SIZE - 1) -#define HAMMER_BIGBLOCK_MASK64 ((u_int64_t)HAMMER_BIGBLOCK_SIZE - 1) +#define HAMMER_BIGBLOCK_MASK64 ((uint64_t)HAMMER_BIGBLOCK_SIZE - 1) #define HAMMER_BIGBLOCK_BITS 23 #if (1 << HAMMER_BIGBLOCK_BITS) != HAMMER_BIGBLOCK_SIZE #error "HAMMER_BIGBLOCK_BITS BROKEN" @@ -263,7 +263,7 @@ struct hammer_blockmap { hammer_off_t first_offset; /* zone-X logical offset (zone 3) */ hammer_off_t next_offset; /* zone-X logical offset */ hammer_off_t alloc_offset; /* zone-X logical offset */ - u_int32_t reserved01; + uint32_t reserved01; hammer_crc_t entry_crc; }; @@ -311,10 +311,10 @@ typedef struct hammer_blockmap_layer1 *hammer_blockmap_layer1_t; * the big-block is completely free. */ struct hammer_blockmap_layer2 { - u_int8_t zone; /* typed allocation zone */ - u_int8_t unused01; - u_int16_t unused02; - u_int32_t append_off; /* allocatable space index */ + uint8_t zone; /* typed allocation zone */ + uint8_t unused01; + uint16_t unused02; + uint32_t append_off; /* allocatable space index */ int32_t bytes_free; /* bytes free within this big-block */ hammer_crc_t entry_crc; }; @@ -432,24 +432,24 @@ typedef struct hammer_blockmap_layer2 *hammer_blockmap_layer2_t; (((bytes) + HAMMER_HEAD_ALIGN_MASK) & ~HAMMER_HEAD_ALIGN_MASK) #define HAMMER_UNDO_ALIGN 512 -#define HAMMER_UNDO_ALIGN64 ((u_int64_t)512) +#define HAMMER_UNDO_ALIGN64 ((uint64_t)512) #define HAMMER_UNDO_MASK (HAMMER_UNDO_ALIGN - 1) #define HAMMER_UNDO_MASK64 (HAMMER_UNDO_ALIGN64 - 1) struct hammer_fifo_head { - u_int16_t hdr_signature; - u_int16_t hdr_type; - u_int32_t hdr_size; /* Aligned size of the whole mess */ - u_int32_t hdr_seq; /* Sequence number */ + uint16_t hdr_signature; + uint16_t hdr_type; + uint32_t hdr_size; /* Aligned size of the whole mess */ + uint32_t hdr_seq; /* Sequence number */ hammer_crc_t hdr_crc; /* XOR crc up to field w/ crc after field */ }; #define HAMMER_FIFO_HEAD_CRCOFF offsetof(struct hammer_fifo_head, hdr_crc) struct hammer_fifo_tail { - u_int16_t tail_signature; - u_int16_t tail_type; - u_int32_t tail_size; /* aligned size of the whole mess */ + uint16_t tail_signature; + uint16_t tail_type; + uint32_t tail_size; /* aligned size of the whole mess */ }; typedef struct hammer_fifo_head *hammer_fifo_head_t; @@ -526,10 +526,10 @@ struct hammer_fifo_redo { int64_t redo_objid; /* file being written */ hammer_off_t redo_offset; /* logical offset in file */ int32_t redo_data_bytes; - u_int32_t redo_flags; - u_int32_t redo_localization; - u_int32_t redo_reserved; - u_int64_t redo_mtime; /* set mtime */ + uint32_t redo_flags; + uint32_t redo_localization; + uint32_t redo_reserved; + uint64_t redo_mtime; /* set mtime */ }; #define HAMMER_REDO_WRITE 0x00000001 @@ -589,7 +589,7 @@ typedef union hammer_fifo_any *hammer_fifo_any_t; #define HAMMER_MEM_MAXBYTES (64LL*1024*1024*1024) struct hammer_volume_ondisk { - u_int64_t vol_signature;/* Signature */ + uint64_t vol_signature; /* Signature */ int64_t vol_bot_beg; /* byte offset of boot area or 0 */ int64_t vol_mem_beg; /* byte offset of memory log or 0 */ @@ -604,15 +604,15 @@ struct hammer_volume_ondisk { int32_t vol_no; /* volume number within filesystem */ int32_t vol_count; /* number of volumes making up FS */ - u_int32_t vol_version; /* version control information */ + uint32_t vol_version; /* version control information */ hammer_crc_t vol_crc; /* header crc */ - u_int32_t vol_flags; /* volume flags */ - u_int32_t vol_rootvol; /* which volume is the root volume? */ + uint32_t vol_flags; /* volume flags */ + uint32_t vol_rootvol; /* which volume is the root volume? */ int32_t vol_reserved04; int32_t vol_reserved05; - u_int32_t vol_reserved06; - u_int32_t vol_reserved07; + uint32_t vol_reserved06; + uint32_t vol_reserved07; int32_t vol_blocksize; /* for statfs only */ int32_t vol_reserved08; @@ -720,32 +720,32 @@ typedef struct hammer_volume_ondisk *hammer_volume_ondisk_t; * which allows us to point to multiple parent directories. */ struct hammer_inode_data { - u_int16_t version; /* inode data version */ - u_int16_t mode; /* basic unix permissions */ - u_int32_t uflags; /* chflags */ - u_int32_t rmajor; /* used by device nodes */ - u_int32_t rminor; /* used by device nodes */ - u_int64_t ctime; + uint16_t version; /* inode data version */ + uint16_t mode; /* basic unix permissions */ + uint32_t uflags; /* chflags */ + uint32_t rmajor; /* used by device nodes */ + uint32_t rminor; /* used by device nodes */ + uint64_t ctime; int64_t parent_obj_id; /* parent directory obj_id */ uuid_t uid; uuid_t gid; - u_int8_t obj_type; - u_int8_t cap_flags; /* capability support flags (extension) */ - u_int16_t reserved02; - u_int32_t reserved03; /* RESERVED FOR POSSIBLE FUTURE BIRTHTIME */ - u_int64_t nlinks; /* hard links */ - u_int64_t size; /* filesystem object size */ + uint8_t obj_type; + uint8_t cap_flags; /* capability support flags (extension) */ + uint16_t reserved02; + uint32_t reserved03; /* RESERVED FOR POSSIBLE FUTURE BIRTHTIME */ + uint64_t nlinks; /* hard links */ + uint64_t size; /* filesystem object size */ union { struct { char reserved06[16]; - u_int32_t parent_obj_localization; - u_int32_t integrity_crc; + uint32_t parent_obj_localization; + uint32_t integrity_crc; } obj; char symlink[24]; /* HAMMER_INODE_BASESYMLEN */ } ext; - u_int64_t mtime; /* mtime must be second-to-last */ - u_int64_t atime; /* atime must be last */ + uint64_t mtime; /* mtime must be second-to-last */ + uint64_t atime; /* atime must be last */ }; /* @@ -753,7 +753,7 @@ struct hammer_inode_data { * mtime updates have UNDO, atime updates do not. */ #define HAMMER_ITIMES_BASE(ino_data) (&(ino_data)->mtime) -#define HAMMER_ITIMES_BYTES (sizeof(u_int64_t) * 2) +#define HAMMER_ITIMES_BYTES (sizeof(uint64_t) * 2) #define HAMMER_INODE_CRCSIZE \ offsetof(struct hammer_inode_data, mtime) @@ -794,8 +794,8 @@ struct hammer_inode_data { */ struct hammer_entry_data { int64_t obj_id; /* object being referenced */ - u_int32_t localization; /* identify pseudo-filesystem */ - u_int32_t reserved02; + uint32_t localization; /* identify pseudo-filesystem */ + uint32_t reserved02; char name[16]; /* name (extended) */ }; @@ -839,8 +839,8 @@ struct hammer_pseudofs_data { hammer_tid_t sync_low_tid; /* full history beyond this point */ hammer_tid_t sync_beg_tid; /* earliest tid w/ full history avail */ hammer_tid_t sync_end_tid; /* current synchronizatoin point */ - u_int64_t sync_beg_ts; /* real-time of last completed sync */ - u_int64_t sync_end_ts; /* initiation of current sync cycle */ + uint64_t sync_beg_ts; /* real-time of last completed sync */ + uint64_t sync_end_ts; /* initiation of current sync cycle */ uuid_t shared_uuid; /* shared uuid (match required) */ uuid_t unique_uuid; /* unique uuid of this master/slave */ int32_t reserved01; /* reserved for future master_id */ @@ -876,11 +876,11 @@ typedef struct hammer_pseudofs_data *hammer_pseudofs_data_t; */ struct hammer_snapshot_data { hammer_tid_t tid; /* the snapshot TID itself (== key) */ - u_int64_t ts; /* real-time when snapshot was made */ - u_int64_t reserved01; - u_int64_t reserved02; + uint64_t ts; /* real-time when snapshot was made */ + uint64_t reserved01; + uint64_t reserved02; char label[64]; /* user-supplied description */ - u_int64_t reserved03[4]; + uint64_t reserved03[4]; }; /* diff --git a/sys/vfs/hammer/hammer_inode.c b/sys/vfs/hammer/hammer_inode.c index 639e9be8ec..d657c04a98 100644 --- a/sys/vfs/hammer/hammer_inode.c +++ b/sys/vfs/hammer/hammer_inode.c @@ -138,7 +138,7 @@ hammer_inode_info_cmp_all_history(hammer_inode_t ip, void *data) static int hammer_inode_pfs_cmp(hammer_inode_t ip, void *data) { - u_int32_t localization = *(u_int32_t *)data; + uint32_t localization = *(uint32_t *)data; if (ip->obj_localization > localization) return(1); if (ip->obj_localization < localization) @@ -164,7 +164,7 @@ RB_GENERATE(hammer_ino_rb_tree, hammer_inode, rb_node, hammer_ino_rb_compare); RB_GENERATE_XLOOKUP(hammer_ino_rb_tree, INFO, hammer_inode, rb_node, hammer_inode_info_cmp, hammer_inode_info_t); RB_GENERATE2(hammer_pfs_rb_tree, hammer_pseudofs_inmem, rb_node, - hammer_pfs_rb_compare, u_int32_t, localization); + hammer_pfs_rb_compare, uint32_t, localization); /* * The kernel is not actively referencing this vnode but is still holding @@ -284,7 +284,7 @@ hammer_get_vnode(struct hammer_inode *ip, struct vnode **vpp) hammer_mount_t hmp; struct vnode *vp; int error = 0; - u_int8_t obj_type; + uint8_t obj_type; hmp = ip->hmp; @@ -417,7 +417,7 @@ hammer_scan_inode_snapshots(hammer_mount_t hmp, hammer_inode_info_t iinfo, */ struct hammer_inode * hammer_get_inode(hammer_transaction_t trans, hammer_inode_t dip, - int64_t obj_id, hammer_tid_t asof, u_int32_t localization, + int64_t obj_id, hammer_tid_t asof, uint32_t localization, int flags, int *errorp) { hammer_mount_t hmp = trans->hmp; @@ -610,7 +610,7 @@ retry: */ struct hammer_inode * hammer_get_dummy_inode(hammer_transaction_t trans, hammer_inode_t dip, - int64_t obj_id, hammer_tid_t asof, u_int32_t localization, + int64_t obj_id, hammer_tid_t asof, uint32_t localization, int flags, int *errorp) { hammer_mount_t hmp = trans->hmp; @@ -722,7 +722,7 @@ loop: */ struct hammer_inode * hammer_find_inode(hammer_transaction_t trans, int64_t obj_id, - hammer_tid_t asof, u_int32_t localization) + hammer_tid_t asof, uint32_t localization) { hammer_mount_t hmp = trans->hmp; struct hammer_inode_info iinfo; @@ -760,7 +760,7 @@ hammer_create_inode(hammer_transaction_t trans, struct vattr *vap, uid_t xuid; int error; int64_t namekey; - u_int32_t dummy; + uint32_t dummy; hmp = trans->hmp; @@ -977,7 +977,7 @@ hammer_free_inode(hammer_inode_t ip) */ hammer_pseudofs_inmem_t hammer_load_pseudofs(hammer_transaction_t trans, - u_int32_t localization, int *errorp) + uint32_t localization, int *errorp) { hammer_mount_t hmp = trans->hmp; hammer_inode_t ip; @@ -1192,7 +1192,7 @@ hammer_unload_pseudofs_callback(hammer_inode_t ip, void *data) } int -hammer_unload_pseudofs(hammer_transaction_t trans, u_int32_t localization) +hammer_unload_pseudofs(hammer_transaction_t trans, uint32_t localization) { int res; int try; @@ -2911,7 +2911,7 @@ hammer_sync_inode(hammer_transaction_t trans, hammer_inode_t ip) hammer_record_t depend; hammer_record_t next; int error, tmp_error; - u_int64_t nlinks; + uint64_t nlinks; if ((ip->sync_flags & HAMMER_INODE_MODMASK) == 0) return(0); diff --git a/sys/vfs/hammer/hammer_ioctl.h b/sys/vfs/hammer/hammer_ioctl.h index 3cc3f49442..c06d338b06 100644 --- a/sys/vfs/hammer/hammer_ioctl.h +++ b/sys/vfs/hammer/hammer_ioctl.h @@ -155,8 +155,8 @@ struct hammer_ioc_rebalance { typedef struct hammer_ioc_hist_entry { hammer_tid_t tid; - u_int32_t time32; - u_int32_t unused; + uint32_t time32; + uint32_t unused; } *hammer_ioc_hist_entry_t; struct hammer_ioc_history { @@ -184,7 +184,7 @@ struct hammer_ioc_history { struct hammer_ioc_reblock { struct hammer_ioc_head head; int32_t free_level; /* 0 for maximum compaction */ - u_int32_t reserved01; + uint32_t reserved01; struct hammer_base_elm key_beg; /* start forward scan */ struct hammer_base_elm key_end; /* stop forward scan */ @@ -260,9 +260,9 @@ struct hammer_ioc_pfs_iterate { struct hammer_ioc_pseudofs_rw { struct hammer_ioc_head head; int pfs_id; - u_int32_t bytes; - u_int32_t version; - u_int32_t flags; + uint32_t bytes; + uint32_t version; + uint32_t flags; struct hammer_pseudofs_data *ondisk; }; @@ -303,10 +303,10 @@ struct hammer_ioc_mirror_rw { * data[] array. */ struct hammer_ioc_mrecord_head { - u_int32_t signature; /* signature for byte order */ - u_int32_t rec_crc; - u_int32_t rec_size; - u_int32_t type; + uint32_t signature; /* signature for byte order */ + uint32_t rec_crc; + uint32_t rec_size; + uint32_t type; /* extended */ }; @@ -335,17 +335,17 @@ struct hammer_ioc_mrecord_sync { struct hammer_ioc_mrecord_pfs { struct hammer_ioc_mrecord_head head; - u_int32_t version; - u_int32_t reserved01; + uint32_t version; + uint32_t reserved01; struct hammer_pseudofs_data pfsd; }; struct hammer_ioc_version { struct hammer_ioc_head head; - u_int32_t cur_version; - u_int32_t min_version; - u_int32_t wip_version; - u_int32_t max_version; + uint32_t cur_version; + uint32_t min_version; + uint32_t wip_version; + uint32_t max_version; char description[64]; }; @@ -431,8 +431,8 @@ typedef union hammer_ioc_mrecord_any *hammer_ioc_mrecord_any_t; struct hammer_ioc_snapshot { struct hammer_ioc_head head; int unused01; - u_int32_t index; - u_int32_t count; + uint32_t index; + uint32_t count; struct hammer_snapshot_data snaps[HAMMER_SNAPS_PER_IOCTL]; }; @@ -448,9 +448,9 @@ struct hammer_ioc_snapshot { */ struct hammer_ioc_config { struct hammer_ioc_head head; - u_int32_t reserved01; - u_int32_t reserved02; - u_int64_t reserved03[4]; + uint32_t reserved01; + uint32_t reserved02; + uint64_t reserved03[4]; struct hammer_config_data config; }; diff --git a/sys/vfs/hammer/hammer_mirror.c b/sys/vfs/hammer/hammer_mirror.c index c7816aab79..79c552c213 100644 --- a/sys/vfs/hammer/hammer_mirror.c +++ b/sys/vfs/hammer/hammer_mirror.c @@ -45,16 +45,16 @@ static int hammer_mirror_update(hammer_cursor_t cursor, static int hammer_ioc_mirror_write_rec(hammer_cursor_t cursor, struct hammer_ioc_mrecord_rec *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization, + uint32_t localization, char *uptr); static int hammer_ioc_mirror_write_pass(hammer_cursor_t cursor, struct hammer_ioc_mrecord_rec *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization); + uint32_t localization); static int hammer_ioc_mirror_write_skip(hammer_cursor_t cursor, struct hammer_ioc_mrecord_skip *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization); + uint32_t localization); static int hammer_mirror_delete_to(hammer_cursor_t cursor, struct hammer_ioc_mirror_rw *mirror); static int hammer_mirror_nomirror(struct hammer_base_elm *base); @@ -84,10 +84,10 @@ hammer_ioc_mirror_read(hammer_transaction_t trans, hammer_inode_t ip, int bytes; int eatdisk; int mrec_flags; - u_int32_t localization; - u_int32_t rec_crc; + uint32_t localization; + uint32_t rec_crc; - localization = (u_int32_t)mirror->pfs_id << 16; + localization = (uint32_t)mirror->pfs_id << 16; if ((mirror->key_beg.localization | mirror->key_end.localization) & HAMMER_LOCALIZE_PSEUDOFS_MASK) { @@ -337,14 +337,14 @@ hammer_ioc_mirror_write(hammer_transaction_t trans, hammer_inode_t ip, { union hammer_ioc_mrecord_any mrec; struct hammer_cursor cursor; - u_int32_t localization; + uint32_t localization; int checkspace_count = 0; int error; int bytes; char *uptr; int seq; - localization = (u_int32_t)mirror->pfs_id << 16; + localization = (uint32_t)mirror->pfs_id << 16; seq = trans->hmp->flusher.done; /* @@ -516,7 +516,7 @@ static int hammer_ioc_mirror_write_skip(hammer_cursor_t cursor, struct hammer_ioc_mrecord_skip *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization) + uint32_t localization) { int error; @@ -572,7 +572,7 @@ static int hammer_ioc_mirror_write_rec(hammer_cursor_t cursor, struct hammer_ioc_mrecord_rec *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization, + uint32_t localization, char *uptr) { int error; @@ -660,7 +660,7 @@ int hammer_ioc_mirror_write_pass(hammer_cursor_t cursor, struct hammer_ioc_mrecord_rec *mrec, struct hammer_ioc_mirror_rw *mirror, - u_int32_t localization) + uint32_t localization) { int error; @@ -980,7 +980,7 @@ int hammer_mirror_localize_data(hammer_data_ondisk_t data, hammer_btree_leaf_elm_t leaf) { - u_int32_t localization; + uint32_t localization; if (leaf->base.rec_type == HAMMER_RECTYPE_DIRENTRY) { localization = leaf->base.localization & diff --git a/sys/vfs/hammer/hammer_mount.h b/sys/vfs/hammer/hammer_mount.h index 3b6fd37eda..688c0932e1 100644 --- a/sys/vfs/hammer/hammer_mount.h +++ b/sys/vfs/hammer/hammer_mount.h @@ -53,9 +53,9 @@ struct hammer_mount_info { int nvolumes; /* number of devices */ int hflags; /* extended hammer mount flags */ int master_id; /* -1=no-mirror mode, or 0-15 */ - u_int64_t asof; /* asof - HAMMER_MAX_TID is current */ + uint64_t asof; /* asof - HAMMER_MAX_TID is current */ char reserved1[136]; /* was struct export_args */ - u_int64_t reserved2[15]; + uint64_t reserved2[15]; }; #define HMNT_NOHISTORY 0x00000001 diff --git a/sys/vfs/hammer/hammer_object.c b/sys/vfs/hammer/hammer_object.c index da1b5f7b3b..16599c68ca 100644 --- a/sys/vfs/hammer/hammer_object.c +++ b/sys/vfs/hammer/hammer_object.c @@ -46,7 +46,7 @@ static int hammer_cursor_localize_data(hammer_data_ondisk_t data, hammer_btree_leaf_elm_t leaf); struct rec_trunc_info { - u_int16_t rec_type; + uint16_t rec_type; int64_t trunc_off; }; @@ -663,7 +663,7 @@ hammer_ip_add_directory(struct hammer_transaction *trans, struct hammer_cursor cursor; hammer_record_t record; int error; - u_int32_t max_iterations; + uint32_t max_iterations; KKASSERT(dip->ino_data.obj_type == HAMMER_OBJTYPE_DIRECTORY); @@ -2450,7 +2450,7 @@ failed: */ int hammer_delete_at_cursor(hammer_cursor_t cursor, int delete_flags, - hammer_tid_t delete_tid, u_int32_t delete_ts, + hammer_tid_t delete_tid, uint32_t delete_ts, int track, int64_t *stat_bytes) { struct hammer_btree_leaf_elm save_leaf; @@ -2676,7 +2676,7 @@ int hammer_cursor_localize_data(hammer_data_ondisk_t data, hammer_btree_leaf_elm_t leaf) { - u_int32_t localization; + uint32_t localization; if (leaf->base.rec_type == HAMMER_RECTYPE_DIRENTRY) { localization = leaf->base.localization & diff --git a/sys/vfs/hammer/hammer_ondisk.c b/sys/vfs/hammer/hammer_ondisk.c index 00d21c9de8..25365493be 100644 --- a/sys/vfs/hammer/hammer_ondisk.c +++ b/sys/vfs/hammer/hammer_ondisk.c @@ -1699,7 +1699,7 @@ hammer_alloc_btree(hammer_transaction_t trans, hammer_off_t hint, int *errorp) */ void * hammer_alloc_data(hammer_transaction_t trans, int32_t data_len, - u_int16_t rec_type, hammer_off_t *data_offsetp, + uint16_t rec_type, hammer_off_t *data_offsetp, struct hammer_buffer **data_bufferp, hammer_off_t hint, int *errorp) { diff --git a/sys/vfs/hammer/hammer_pfs.c b/sys/vfs/hammer/hammer_pfs.c index 9d8ca523e8..1e4fb73180 100644 --- a/sys/vfs/hammer/hammer_pfs.c +++ b/sys/vfs/hammer/hammer_pfs.c @@ -56,12 +56,12 @@ hammer_ioc_get_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, struct hammer_ioc_pseudofs_rw *pfs) { hammer_pseudofs_inmem_t pfsm; - u_int32_t localization; + uint32_t localization; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; pfs->bytes = sizeof(struct hammer_pseudofs_data); pfs->version = HAMMER_IOC_PSEUDOFS_VERSION; @@ -104,12 +104,12 @@ hammer_ioc_set_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, struct ucred *cred, struct hammer_ioc_pseudofs_rw *pfs) { hammer_pseudofs_inmem_t pfsm; - u_int32_t localization; + uint32_t localization; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; if (pfs->version != HAMMER_IOC_PSEUDOFS_VERSION) error = EINVAL; @@ -159,12 +159,12 @@ hammer_ioc_upgrade_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, struct hammer_ioc_pseudofs_rw *pfs) { hammer_pseudofs_inmem_t pfsm; - u_int32_t localization; + uint32_t localization; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; if ((error = hammer_unload_pseudofs(trans, localization)) != 0) return(error); @@ -209,12 +209,12 @@ hammer_ioc_downgrade_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, { hammer_mount_t hmp = trans->hmp; hammer_pseudofs_inmem_t pfsm; - u_int32_t localization; + uint32_t localization; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; if ((error = hammer_unload_pseudofs(trans, localization)) != 0) return(error); @@ -246,12 +246,12 @@ hammer_ioc_destroy_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, struct hammer_ioc_pseudofs_rw *pfs) { hammer_pseudofs_inmem_t pfsm; - u_int32_t localization; + uint32_t localization; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; if ((error = hammer_unload_pseudofs(trans, localization)) != 0) return(error); @@ -281,14 +281,14 @@ hammer_ioc_wait_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, { hammer_pseudofs_inmem_t pfsm; struct hammer_pseudofs_data pfsd; - u_int32_t localization; + uint32_t localization; hammer_tid_t tid; void *waitp; int error; if ((error = hammer_pfs_autodetect(pfs, ip)) != 0) return(error); - localization = (u_int32_t)pfs->pfs_id << 16; + localization = (uint32_t)pfs->pfs_id << 16; if ((error = copyin(pfs->ondisk, &pfsd, sizeof(pfsd))) != 0) return(error); @@ -328,7 +328,7 @@ hammer_ioc_iterate_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, struct hammer_cursor cursor; struct hammer_ioc_pseudofs_rw pfs; hammer_inode_t dip; - u_int32_t localization; + uint32_t localization; int error; /* @@ -343,7 +343,7 @@ hammer_ioc_iterate_pseudofs(hammer_transaction_t trans, hammer_inode_t ip, if ((error = hammer_pfs_autodetect(&pfs, ip)) != 0) return(error); pi->pos = pfs.pfs_id; - localization = (u_int32_t)pi->pos << 16; + localization = (uint32_t)pi->pos << 16; dip = hammer_get_inode(trans, NULL, HAMMER_OBJID_ROOT, HAMMER_MAX_TID, HAMMER_DEF_LOCALIZATION, 0, &error); diff --git a/sys/vfs/hammer/hammer_prune.c b/sys/vfs/hammer/hammer_prune.c index 5711c3af42..a19396597f 100644 --- a/sys/vfs/hammer/hammer_prune.c +++ b/sys/vfs/hammer/hammer_prune.c @@ -62,7 +62,7 @@ hammer_ioc_prune(hammer_transaction_t trans, hammer_inode_t ip, int elm_array_size; int seq; int64_t bytes; - u_int32_t key_beg_localization; + uint32_t key_beg_localization; if (prune->nelms < 0 || prune->nelms > HAMMER_MAX_PRUNE_ELMS) return(EINVAL); diff --git a/sys/vfs/hammer/hammer_rebalance.c b/sys/vfs/hammer/hammer_rebalance.c index 3518cc9e6a..5ba7af0021 100644 --- a/sys/vfs/hammer/hammer_rebalance.c +++ b/sys/vfs/hammer/hammer_rebalance.c @@ -59,7 +59,7 @@ hammer_ioc_rebalance(hammer_transaction_t trans, hammer_inode_t ip, hammer_btree_leaf_elm_t elm; int error; int seq; - u_int32_t key_end_localization; + uint32_t key_end_localization; if ((rebal->key_beg.localization | rebal->key_end.localization) & HAMMER_LOCALIZE_PSEUDOFS_MASK) { @@ -266,7 +266,7 @@ rebalance_node(struct hammer_ioc_rebalance *rebal, hammer_cursor_t cursor, hammer_btree_elm_t elm; hammer_node_t node; hammer_tid_t tid; - u_int8_t type1 __debugvar; + uint8_t type1 __debugvar; int base_count; int root_count; int avg_elms; @@ -521,7 +521,7 @@ rebalance_closeout(hammer_node_lock_t base_item, int base_count, hammer_node_lock_t parent; hammer_btree_elm_t base_elm; hammer_btree_elm_t rbound_elm; - u_int8_t save; + uint8_t save; /* * Update the count. NOTE: base_count can be 0 for the diff --git a/sys/vfs/hammer/hammer_reblock.c b/sys/vfs/hammer/hammer_reblock.c index 2a22464e44..1c838e2b74 100644 --- a/sys/vfs/hammer/hammer_reblock.c +++ b/sys/vfs/hammer/hammer_reblock.c @@ -65,7 +65,7 @@ hammer_ioc_reblock(hammer_transaction_t trans, hammer_inode_t ip, int error; int seq; int slop; - u_int32_t key_end_localization; + uint32_t key_end_localization; if ((reblock->key_beg.localization | reblock->key_end.localization) & HAMMER_LOCALIZE_PSEUDOFS_MASK) { diff --git a/sys/vfs/hammer/hammer_recover.c b/sys/vfs/hammer/hammer_recover.c index 019c15480d..ac4eb59a5e 100644 --- a/sys/vfs/hammer/hammer_recover.c +++ b/sys/vfs/hammer/hammer_recover.c @@ -146,8 +146,8 @@ typedef struct hammer_rterm_entry { typedef struct hammer_rterm { RB_ENTRY(hammer_rterm) rb_node; int64_t redo_objid; - u_int32_t redo_localization; - u_int32_t redo_flags; + uint32_t redo_localization; + uint32_t redo_flags; hammer_off_t redo_offset; hammer_rterm_entry_t term_list; } *hammer_rterm_t; @@ -214,7 +214,7 @@ hammer_recover_stage1(hammer_mount_t hmp, hammer_volume_t root_volume) hammer_fifo_any_t head; hammer_off_t first_offset; hammer_off_t last_offset; - u_int32_t seqno; + uint32_t seqno; int error; int degenerate_case = 0; @@ -526,7 +526,7 @@ hammer_recover_stage2(hammer_mount_t hmp, hammer_volume_t root_volume) hammer_off_t last_offset; hammer_off_t ext_offset; struct hammer_rterm_rb_tree rterm_root; - u_int32_t seqno; + uint32_t seqno; int error; int verbose = 0; int dorscan; @@ -877,7 +877,7 @@ _hammer_check_signature(hammer_fifo_head_t head, hammer_fifo_tail_t tail, hammer_off_t beg_off) { hammer_off_t end_off; - u_int32_t crc; + uint32_t crc; int bytes; /* @@ -1039,7 +1039,7 @@ hammer_recover_undo(hammer_mount_t hmp, hammer_volume_t root_volume, int error; int vol_no; int bytes; - u_int32_t offset; + uint32_t offset; /* * Only process UNDO records. Flag if we find other records to diff --git a/sys/vfs/hammer/hammer_redo.c b/sys/vfs/hammer/hammer_redo.c index 3bf27ce030..9a761f3e99 100644 --- a/sys/vfs/hammer/hammer_redo.c +++ b/sys/vfs/hammer/hammer_redo.c @@ -58,7 +58,7 @@ RB_GENERATE2(hammer_redo_rb_tree, hammer_inode, rb_redonode, */ int hammer_generate_redo(hammer_transaction_t trans, hammer_inode_t ip, - hammer_off_t file_off, u_int32_t flags, + hammer_off_t file_off, uint32_t flags, void *base, int len) { hammer_mount_t hmp; diff --git a/sys/vfs/hammer/hammer_subs.c b/sys/vfs/hammer/hammer_subs.c index 0d57792d09..7b98c1a41c 100644 --- a/sys/vfs/hammer/hammer_subs.c +++ b/sys/vfs/hammer/hammer_subs.c @@ -778,30 +778,30 @@ hammer_sync_unlock(hammer_transaction_t trans) /* * Misc */ -u_int32_t +uint32_t hammer_to_unix_xid(uuid_t *uuid) { - return(*(u_int32_t *)&uuid->node[2]); + return(*(uint32_t *)&uuid->node[2]); } void -hammer_guid_to_uuid(uuid_t *uuid, u_int32_t guid) +hammer_guid_to_uuid(uuid_t *uuid, uint32_t guid) { bzero(uuid, sizeof(*uuid)); - *(u_int32_t *)&uuid->node[2] = guid; + *(uint32_t *)&uuid->node[2] = guid; } void -hammer_time_to_timespec(u_int64_t xtime, struct timespec *ts) +hammer_time_to_timespec(uint64_t xtime, struct timespec *ts) { ts->tv_sec = (unsigned long)(xtime / 1000000); ts->tv_nsec = (unsigned int)(xtime % 1000000) * 1000L; } -u_int64_t +uint64_t hammer_timespec_to_time(struct timespec *ts) { - u_int64_t xtime; + uint64_t xtime; xtime = (unsigned)(ts->tv_nsec / 1000) + (unsigned long)ts->tv_sec * 1000000ULL; @@ -813,7 +813,7 @@ hammer_timespec_to_time(struct timespec *ts) * Convert a HAMMER filesystem object type to a vnode type */ enum vtype -hammer_get_vnode_type(u_int8_t obj_type) +hammer_get_vnode_type(uint8_t obj_type) { switch(obj_type) { case HAMMER_OBJTYPE_DIRECTORY: @@ -839,7 +839,7 @@ hammer_get_vnode_type(u_int8_t obj_type) } int -hammer_get_dtype(u_int8_t obj_type) +hammer_get_dtype(uint8_t obj_type) { switch(obj_type) { case HAMMER_OBJTYPE_DIRECTORY: @@ -864,7 +864,7 @@ hammer_get_dtype(u_int8_t obj_type) /* not reached */ } -u_int8_t +uint8_t hammer_get_obj_type(enum vtype vtype) { switch(vtype) { @@ -942,7 +942,7 @@ hammer_nohistory(hammer_inode_t ip) */ int64_t hammer_directory_namekey(hammer_inode_t dip, const void *name, int len, - u_int32_t *max_iterationsp) + uint32_t *max_iterationsp) { const char *aname = name; int32_t crcx; @@ -1043,10 +1043,10 @@ hammer_directory_namekey(hammer_inode_t dip, const void *name, int len, */ int hammer_str_to_tid(const char *str, int *ispfsp, - hammer_tid_t *tidp, u_int32_t *localizationp) + hammer_tid_t *tidp, uint32_t *localizationp) { hammer_tid_t tid; - u_int32_t localization; + uint32_t localization; char *ptr; int ispfs; int n; @@ -1220,7 +1220,7 @@ hammer_blockdemarc(int64_t file_offset1, int64_t file_offset2) udev_t hammer_fsid_to_udev(uuid_t *uuid) { - u_int32_t crc; + uint32_t crc; crc = crc32(uuid, sizeof(*uuid)); return((udev_t)crc); diff --git a/sys/vfs/hammer/hammer_transaction.c b/sys/vfs/hammer/hammer_transaction.c index a9546b9ded..0604e7224a 100644 --- a/sys/vfs/hammer/hammer_transaction.c +++ b/sys/vfs/hammer/hammer_transaction.c @@ -34,7 +34,7 @@ #include "hammer.h" -static u_int32_t ocp_allocbit(hammer_objid_cache_t ocp, u_int32_t n); +static uint32_t ocp_allocbit(hammer_objid_cache_t ocp, uint32_t n); /* @@ -59,7 +59,7 @@ hammer_start_transaction(struct hammer_transaction *trans, getmicrotime(&tv); trans->time = (unsigned long)tv.tv_sec * 1000000ULL + tv.tv_usec; - trans->time32 = (u_int32_t)tv.tv_sec; + trans->time32 = (uint32_t)tv.tv_sec; } /* @@ -84,7 +84,7 @@ hammer_simple_transaction(struct hammer_transaction *trans, getmicrotime(&tv); trans->time = (unsigned long)tv.tv_sec * 1000000ULL + tv.tv_usec; - trans->time32 = (u_int32_t)tv.tv_sec; + trans->time32 = (uint32_t)tv.tv_sec; } /* @@ -114,7 +114,7 @@ hammer_start_transaction_fls(struct hammer_transaction *trans, getmicrotime(&tv); trans->time = (unsigned long)tv.tv_sec * 1000000ULL + tv.tv_usec; - trans->time32 = (u_int32_t)tv.tv_sec; + trans->time32 = (uint32_t)tv.tv_sec; } /* @@ -190,7 +190,7 @@ hammer_alloc_objid(hammer_mount_t hmp, hammer_inode_t dip, int64_t namekey) { hammer_objid_cache_t ocp; hammer_tid_t tid; - u_int32_t n; + uint32_t n; while ((ocp = dip->objid_cache) == NULL) { if (hmp->objid_cache_count < OBJID_CACHE_SIZE) { @@ -265,10 +265,10 @@ hammer_alloc_objid(hammer_mount_t hmp, hammer_inode_t dip, int64_t namekey) * This routine is only ever called if a bit is available somewhere * in the bitmap. */ -static u_int32_t -ocp_allocbit(hammer_objid_cache_t ocp, u_int32_t n) +static uint32_t +ocp_allocbit(hammer_objid_cache_t ocp, uint32_t n) { - u_int32_t n0; + uint32_t n0; n0 = (n >> 5) & 31; n &= 31; diff --git a/sys/vfs/hammer/hammer_undo.c b/sys/vfs/hammer/hammer_undo.c index 8ca353c6b3..671d861d46 100644 --- a/sys/vfs/hammer/hammer_undo.c +++ b/sys/vfs/hammer/hammer_undo.c @@ -305,7 +305,7 @@ hammer_generate_undo(hammer_transaction_t trans, * NOTE: Also used by the REDO code. */ void -hammer_format_undo(void *base, u_int32_t seqno) +hammer_format_undo(void *base, uint32_t seqno) { hammer_fifo_head_t head; hammer_fifo_tail_t tail; @@ -351,7 +351,7 @@ hammer_upgrade_undo_4(hammer_transaction_t trans) hammer_fifo_head_t head; hammer_fifo_tail_t tail; hammer_off_t next_offset; - u_int32_t seqno; + uint32_t seqno; int error; int bytes; diff --git a/sys/vfs/hammer/hammer_vfsops.c b/sys/vfs/hammer/hammer_vfsops.c index feccee24fb..498d97414b 100644 --- a/sys/vfs/hammer/hammer_vfsops.c +++ b/sys/vfs/hammer/hammer_vfsops.c @@ -976,7 +976,7 @@ hammer_vfs_vget(struct mount *mp, struct vnode *dvp, struct hammer_mount *hmp = (void *)mp->mnt_data; struct hammer_inode *ip; int error; - u_int32_t localization; + uint32_t localization; lwkt_gettoken(&hmp->fs_token); hammer_simple_transaction(&trans, hmp); @@ -1158,14 +1158,14 @@ hammer_vfs_fhtovp(struct mount *mp, struct vnode *rootvp, struct hammer_inode *ip; struct hammer_inode_info info; int error; - u_int32_t localization; + uint32_t localization; bcopy(fhp->fid_data + 0, &info.obj_id, sizeof(info.obj_id)); bcopy(fhp->fid_data + 8, &info.obj_asof, sizeof(info.obj_asof)); if (rootvp) localization = VTOI(rootvp)->obj_localization; else - localization = (u_int32_t)fhp->fid_ext << 16; + localization = (uint32_t)fhp->fid_ext << 16; lwkt_gettoken(&hmp->fs_token); hammer_simple_transaction(&trans, hmp); diff --git a/sys/vfs/hammer/hammer_vnops.c b/sys/vfs/hammer/hammer_vnops.c index e239181457..f98e4cc6d9 100644 --- a/sys/vfs/hammer/hammer_vnops.c +++ b/sys/vfs/hammer/hammer_vnops.c @@ -1010,8 +1010,8 @@ hammer_vop_getattr(struct vop_getattr_args *ap) */ ++hammer_stats_file_iopsr; hammer_lock_sh(&ip->lock); - vap->va_fsid = ip->pfsm->fsid_udev ^ (u_int32_t)ip->obj_asof ^ - (u_int32_t)(ip->obj_asof >> 32); + vap->va_fsid = ip->pfsm->fsid_udev ^ (uint32_t)ip->obj_asof ^ + (uint32_t)(ip->obj_asof >> 32); vap->va_fileid = ip->ino_leaf.base.obj_id; vap->va_mode = ip->ino_data.mode; @@ -1113,8 +1113,8 @@ hammer_vop_nresolve(struct vop_nresolve_args *ap) int flags; int ispfs; int64_t obj_id; - u_int32_t localization; - u_int32_t max_iterations; + uint32_t localization; + uint32_t max_iterations; /* * Misc initialization, plus handle as-of name extensions. Look for @@ -1314,7 +1314,7 @@ hammer_vop_nlookupdotdot(struct vop_nlookupdotdot_args *ap) struct hammer_inode *ip; hammer_mount_t hmp; int64_t parent_obj_id; - u_int32_t parent_obj_localization; + uint32_t parent_obj_localization; hammer_tid_t asof; int error; @@ -1786,7 +1786,7 @@ hammer_vop_readlink(struct vop_readlink_args *ap) struct hammer_inode *ip; hammer_mount_t hmp; char buf[32]; - u_int32_t localization; + uint32_t localization; hammer_pseudofs_inmem_t pfsm; int error; @@ -1941,7 +1941,7 @@ hammer_vop_nrename(struct vop_nrename_args *ap) hammer_mount_t hmp; struct hammer_cursor cursor; int64_t namekey; - u_int32_t max_iterations; + uint32_t max_iterations; int nlen, error; if (ap->a_fdvp->v_mount != ap->a_tdvp->v_mount) @@ -2178,7 +2178,7 @@ hammer_vop_setattr(struct vop_setattr_args *ap) #if 0 int64_t aligned_size; #endif - u_int32_t flags; + uint32_t flags; vap = ap->a_vap; ip = ap->a_vp->v_data; @@ -3375,7 +3375,7 @@ hammer_dounlink(hammer_transaction_t trans, struct nchandle *nch, hammer_mount_t hmp; struct hammer_cursor cursor; int64_t namekey; - u_int32_t max_iterations; + uint32_t max_iterations; int nlen, error; /* diff --git a/usr.bin/fstat/hammer.c b/usr.bin/fstat/hammer.c index 32a092abba..0710c2b5b3 100644 --- a/usr.bin/fstat/hammer.c +++ b/usr.bin/fstat/hammer.c @@ -61,8 +61,8 @@ hammer_filestat(struct vnode *vp, struct filestat *fsp) " at %p for pid %d\n", (void *)ino.pfsm, Pid); return 0; } - fsp->fsid = pfsm.fsid_udev ^ (u_int32_t)ino.obj_asof ^ - (u_int32_t)(ino.obj_asof >> 32); + fsp->fsid = pfsm.fsid_udev ^ (uint32_t)ino.obj_asof ^ + (uint32_t)(ino.obj_asof >> 32); fsp->mode = ino.ino_data.mode | mtrans(vp->v_type); fsp->fileid = (long)ino.ino_leaf.base.obj_id; fsp->size = ino.ino_data.size; -- 2.41.0