| /freebsd/lib/libc/db/hash/ |
| H A D | hash.c | 101 HTAB *hashp; in __hash_open() local 106 if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) in __hash_open() 108 hashp->fp = -1; in __hash_open() 116 hashp->flags = flags; in __hash_open() 123 if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1) in __hash_open() 125 new_table = _fstat(hashp->fp, &statbuf) == 0 && in __hash_open() 132 if (!(hashp = init_hash(hashp, file, info))) in __hash_open() 137 hashp->hash = info->hash; in __hash_open() 139 hashp->hash = __default_hash; in __hash_open() 141 hdrsize = _read(hashp->fp, &hashp->hdr, sizeof(HASHHDR)); in __hash_open() [all …]
|
| H A D | hash_page.c | 82 ((u_int16_t *)(P))[1] = hashp->BSIZE - 3 * sizeof(u_int16_t); \ 83 ((u_int16_t *)(P))[2] = hashp->BSIZE; \ 122 __delpair(HTAB *hashp, BUFHEAD *bufp, int ndx) in __delpair() argument 131 return (__big_delete(hashp, bufp)); in __delpair() 135 newoff = hashp->BSIZE; in __delpair() 155 if (ndx == hashp->cndx) { in __delpair() 161 hashp->cndx -= 2; in __delpair() 168 hashp->NKEYS--; in __delpair() 179 __split_page(HTAB *hashp, u_int32_t obucket, u_int32_t nbucket) in __split_page() argument 189 copyto = (u_int16_t)hashp->BSIZE; in __split_page() [all …]
|
| H A D | hash_bigkey.c | 82 __big_insert(HTAB *hashp, BUFHEAD *bufp, const DBT *key, const DBT *val) in __big_insert() argument 112 bufp = __add_ovflpage(hashp, bufp); in __big_insert() 168 bufp = __add_ovflpage(hashp, bufp); in __big_insert() 192 __big_delete(HTAB *hashp, BUFHEAD *bufp) in __big_delete() argument 217 rbufp = __get_buf(hashp, pageno, rbufp, 0); in __big_delete() 219 __free_ovflpage(hashp, last_bfp); in __big_delete() 249 FREESPACE(bp) = hashp->BSIZE - PAGE_META(n); in __big_delete() 250 OFFSET(bp) = hashp->BSIZE; in __big_delete() 254 __free_ovflpage(hashp, rbufp); in __big_delete() 256 __free_ovflpage(hashp, last_bfp); in __big_delete() [all …]
|
| H A D | hash_buf.c | 83 #define MRU hashp->bufhead.next 84 #define LRU hashp->bufhead.prev 86 #define MRU_INSERT(B) BUF_INSERT((B), &hashp->bufhead) 99 __get_buf(HTAB *hashp, u_int32_t addr, in __get_buf() argument 118 segment_ndx = addr & (hashp->SGSIZE - 1); in __get_buf() 119 dir_ndx = addr >> hashp->SSHIFT; in __get_buf() 120 if (dir_ndx >= hashp->nsegs) { in __get_buf() 129 segp = hashp->dir[dir_ndx]; in __get_buf() 135 is_disk = is_disk_mask || !hashp->new_file; in __get_buf() 139 bp = newbuf(hashp, addr, prev_bp); in __get_buf() [all …]
|
| H A D | hash.h | 169 (B) + hashp->HDRPAGES + ((B) ? hashp->SPARES[__log2((B)+1)-1] : 0)
|
| /freebsd/crypto/krb5/src/plugins/kdb/db2/libdb2/hash/ |
| H A D | hash.c | 103 HTAB *hashp; in __kdb2_hash_open() local 110 if (!(hashp = (HTAB *)calloc(1, sizeof(HTAB)))) in __kdb2_hash_open() 112 hashp->fp = -1; in __kdb2_hash_open() 119 hashp->flags = flags; in __kdb2_hash_open() 120 hashp->save_file = hashp->flags & O_RDWR; in __kdb2_hash_open() 130 if ((hashp->fp = open(file, flags|O_BINARY, mode)) == -1) in __kdb2_hash_open() 132 (void)fcntl(hashp->fp, F_SETFD, 1); in __kdb2_hash_open() 137 if (!(hashp = init_hash(hashp, file, info))) in __kdb2_hash_open() 142 hashp->hash = info->hash; in __kdb2_hash_open() 144 hashp->hash = __default_hash; in __kdb2_hash_open() [all …]
|
| H A D | hash_page.c | 87 __get_item(HTAB *hashp, CURSOR *cursorp, DBT *key, DBT *val, in __get_item() argument 97 __get_page(hashp, cursorp->bucket, A_BUCKET); in __get_item() 103 __get_page(hashp, cursorp->pgno, A_RAW); in __get_item() 121 __put_page(hashp, cursorp->pagep, A_RAW, 0); in __get_item() 122 cursorp->pagep = __get_page(hashp, next_pgno, A_RAW); in __get_item() 132 key->size = hashp->hdr.bsize - in __get_item() 159 __get_item_reset(HTAB *hashp, CURSOR *cursorp) in __get_item_reset() argument 162 __put_page(hashp, cursorp->pagep, A_RAW, 0); in __get_item_reset() 172 __get_item_done(HTAB *hashp, CURSOR *cursorp) in __get_item_done() argument 175 __put_page(hashp, cursorp->pagep, A_RAW, 0); in __get_item_done() [all …]
|
| H A D | hash_bigkey.c | 86 __big_insert(HTAB *hashp, PAGE16 *pagep, const DBT *key, const DBT *val) in __big_insert() argument 102 __add_bigpage(hashp, pagep, NUM_ENT(pagep) - 1, base_page); in __big_insert() 130 __put_page(hashp, pagep, A_RAW, 1); in __big_insert() 143 __big_delete(HTAB *hashp, PAGE16 *pagep, indx_t ndx) in __big_delete() argument 145 __big_delete(hashp, pagep, ndx) in __big_delete() 146 HTAB *hashp; in __big_delete() 154 pagep = __get_page(hashp, OADDR_TO_PAGE(DATA_OFF(pagep, ndx)), A_RAW); 164 pagep = __get_page(hashp, NEXT_PGNO(pagep), A_RAW); 167 __delete_page(hashp, last_pagep, A_OVFL); 171 __delete_page(hashp, pagep, A_OVFL); [all …]
|
| H A D | hash.c.patch | 7 for (i = 0; i <= hashp->hdr.max_bucket; i++) { 8 ! if (__new_page(hashp, i, A_BUCKET) != 0) 16 for (i = 0; i <= hashp->hdr.max_bucket; i++) { 17 ! if (__new_page(hashp, (u_int32_t)i, A_BUCKET) != 0) 26 ! mpool_sync(hashp->mp); 36 ! return (flush_meta(hashp) || mpool_sync(hashp->mp)); 42 hput_header(hashp); 45 ! if (hashp->mapp[i]) 46 if (__put_page(hashp, 47 (PAGE16 *)hashp->mapp[i], A_BITMAP, 1)) [all …]
|
| H A D | hash_debug.c | 62 __dump_bucket(hashp, bucket) in __dump_bucket() argument 63 HTAB *hashp; in __dump_bucket() 76 __get_item_reset(hashp, &cursor); 80 __get_item_next(hashp, &cursor, &key, &val, &item_info); 88 if (__big_keydata(hashp, cursor.pagep, &key, &val, 104 __get_item_done(hashp, &cursor);
|
| H A D | hash.h | 158 ((B) + hashp->hdr.hdrpages + ((B) \ 159 ? hashp->hdr.spares[__log2((B)+1)-1] : 0))
|
| /freebsd/sys/fs/nfsserver/ |
| H A D | nfs_nfsdserv.c | 727 u_long *hashp; in nfsrvd_lookup() local 753 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrvd_lookup() 754 error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); in nfsrvd_lookup() 1316 u_long *hashp; in nfsrvd_create() local 1327 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrvd_create() 1328 error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); in nfsrvd_create() 1487 u_long *hashp, cnflags, setflags; in nfsrvd_mknod() local 1554 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrvd_mknod() 1555 error = nfsrv_parsename(nd, bufp, hashp, &named.ni_pathlen); in nfsrvd_mknod() 1726 u_long *hashp; in nfsrvd_remove() local [all …]
|
| H A D | nfs_nfsdsubs.c | 1945 nfsrv_parsename(struct nfsrv_descript *nd, char *bufp, u_long *hashp, in nfsrv_parsename() argument 1956 if (hashp != NULL) in nfsrv_parsename() 1957 *hashp = 0; in nfsrv_parsename() 2139 if (hashp != NULL) in nfsrv_parsename() 2140 *hashp = hash; in nfsrv_parsename()
|
| H A D | nfs_nfsdport.c | 5206 u_long *hashp; in nfsrv_dscreate() local 5213 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrv_dscreate() 5631 u_long *hashp; in nfsrv_dsremove() local 5641 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrv_dsremove() 7861 u_long *hashp; in nfsrv_pnfslookupds() local 7870 nfsvno_setpathbuf(&named, &bufp, &hashp); in nfsrv_pnfslookupds()
|
| /freebsd/sys/contrib/openzfs/module/zfs/ |
| H A D | dsl_bookmark.c | 41 const char *hashp; in dsl_bookmark_hold_ds() local 45 hashp = strchr(fullname, '#'); in dsl_bookmark_hold_ds() 46 if (hashp == NULL) in dsl_bookmark_hold_ds() 49 *shortnamep = hashp + 1; in dsl_bookmark_hold_ds() 52 (void) strlcpy(buf, fullname, hashp - fullname + 1); in dsl_bookmark_hold_ds()
|
| H A D | zfs_ioctl.c | 1214 char *hashp = strchr(name, '#'); in zfs_secpolicy_bookmark() local 1216 if (hashp == NULL) { in zfs_secpolicy_bookmark() 1220 *hashp = '\0'; in zfs_secpolicy_bookmark() 1223 *hashp = '#'; in zfs_secpolicy_bookmark() 1240 char *hashp = strchr(name, '#'); in zfs_secpolicy_destroy_bookmarks() local 1243 if (hashp == NULL) { in zfs_secpolicy_destroy_bookmarks() 1248 *hashp = '\0'; in zfs_secpolicy_destroy_bookmarks() 1251 *hashp = '#'; in zfs_secpolicy_destroy_bookmarks()
|