Lines Matching full:record
169 tdb_off_t next; /* offset of the next record in the list */
170 tdb_len_t rec_len; /* total byte length of record */
177 char record[rec_len];
304 {TDB_ERR_EXISTS, "Record exists"},
307 {TDB_ERR_NOEXIST, "Record does not exist"},
785 /* record lock stops delete underneath */
1103 /* form a new freelist record */
1190 /* read/write a record */
1238 database, using a special 'transaction recovery' record pointed at
1242 - dynamically allocated the transaction recover record, re-using it
1243 for subsequent transactions. If a larger record is needed then
1244 tdb_free() the old record to place it on the normal tdb freelist
1245 before allocating the new record
1261 existing transaction record. If the inner transaction is cancelled
1275 indicate a valid recovery record. In total 4 fsync/msync calls are
1279 - check for a valid recovery record on open of the tdb, while the
1807 TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to read recovery record\n"));
1855 as the magic ptr in the recovery record has not been set */
2147 /* we have never allocated a recovery record */
2151 /* read the recovery record */
2154 TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery record\n"));
2256 /* read a freelist record and check for simple errors */
2263 /* this happens when a app is showdown while deleting a record - we should
2298 /* Follow chain (next offset is at start of record) */
2306 /* update a record tailer (must hold allocation lock) */
2312 /* Offset of tailer from record header */
2328 /* set an initial tailer, so if we fail we don't leave a bogus record */
2374 /* Now read in record */
2404 TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_free record write failed at offset=%d\n", offset));
2439 /* And left record is shortened */
2445 /* Remove allocated record from the free list */
2461 /* Update allocated record tailer (we
2467 /* Free new record */
2473 /* all done - return the new record offset */
2511 issues when faced with a slowly increasing record size.
2533 /* move to the next record */
2562 for the "seen" record list. For some reason this strikes
2599 /* Store the FREELIST_TOP record. */
2612 /* If we can't store this record (we've seen it
2625 /* move to the next record */
2642 /* Uses traverse lock: 0 = finish, -1 = error, other = record offset */
2688 /* No previous record? Start at top of chain. */
2694 /* Otherwise unlock the previous record. */
2700 /* We have offset of old record: grab next */
2746 return -1 on error or the record count traversed
2766 /* tdb_next_lock places locks on the record returned, and its chain */
2769 /* now read the full record */
2873 /* Grab first record: locks chain and returned record. */
2880 /* Unlock the hash chain of the record we just read. */
2918 /* No previous element: do normal find, and lock record */
2930 /* Grab next record: locks chain and returned record,
2931 unlocks old record */
2936 /* Unlock the chain of this new record */
2940 /* Unlock the chain of old record */
2956 printf("ERROR: failed to read record at %u\n", offset);
2973 printf("ERROR: tailer does not match record! tailer=%u totalsize=%u\n",
3047 /* move to the next record */
3102 /* Returns 0 on fail. On success, return offset of record, and fills
3113 /* keep looking until we find the right record */
3202 * Find an entry in the database and hand the record's data to a parsing
3280 /* find previous record in hash chain */
3287 /* unlink it: next ptr is at start of record. */
3390 * Just mark the record as dead.
3419 * See if we have a dead record around with enough space
3430 /* keep looking until we find the right record */
3483 /* if the record doesn't exist and we are in TDB_MODIFY mode then
3491 /* delete any existing record - if it doesn't exist we don't
3512 * find one that can hold the new record. We need enough space
3666 made. If you want a counter then use a tdb record.