Lines Matching refs:record

1561 	// record the current time at which we're mounting this volume
5026 int lockflags; /* Locks that reclaim and split code should grab before modifying the extent record */
5028 u_int32_t recStartBlock; /* File allocation block number (FABN) for current extent record */
5030 struct filefork *catalog_fp; /* If non-NULL, extent is from catalog record */
5031 union record {
5032 HFSPlusExtentRecord overflow;/* Extent record from overflow extents btree */
5033 HFSPlusAttrRecord xattr; /* Attribute record for large EAs */
5034 } record;
5035 HFSPlusExtentDescriptor *extents; /* Pointer to current extent record being processed.
5036 * For catalog extent record, points to the correct
5038 * record, or xattr record, points to extent record
5046 * use it for writing updated extent record
5048 struct FSBufferDescriptor btdata; /* Shared btdata for reading/writing extent record, same as iterator above */
5050 int overflow_count; /* For debugging, counter for overflow extent record */
5059 * file, and/or creating a new extent record in the overflow
5064 * for simplicity, lets call them record X and X+1 respectively.
5085 * In record X, only the entries following entry C are shifted, and
5089 * Note that the entry E from record X is shifted into record X+1 as
5090 * the new first entry. Since the first entry of record X+1 is updated,
5092 * This also results in shifting of all extent entries in record X+1.
5097 * record X record X+1
5117 * the current file, extent, and extent record that
5133 HFSPlusExtentDescriptor shift_extent; /* Extent entry that should be shifted into next extent record */
5135 HFSPlusExtentDescriptor *extents; /* Pointer to current extent record being manipulated */
5143 uint32_t read_recStartBlock; /* Starting allocation block number to read old extent record */
5144 uint32_t write_recStartBlock; /* Starting allocation block number to insert newly updated extent record */
5161 printf ("hfs_split_extent: Split record:%u recStartBlock=%u %u:(%u,%u) for %u blocks\n", extent_info->overflow_count, extent_info->recStartBlock, index, extents[index].startBlock, extents[index].blockCount, newBlockCount);
5174 * overflow extent record, if any, before the current record
5187 /* The new extent created after split will go into following overflow extent record */
5191 /* Last extent in the record will be split, so nothing to shift */
5195 * record. So, store the last extent entry for later.
5199 printf ("hfs_split_extent: Save 7:(%u,%u) to shift into overflow record\n", shift_extent.startBlock, shift_extent.blockCount);
5203 * record to the index where we want to insert the new extent.
5220 * entry that will go into following overflow extent record. The
5229 * 'index+1' or into following overflow extent record.
5249 * extent exists in the catalog record. This means that
5258 * extent record, so update it directly in the btree using the
5269 /* No extent entry to be shifted into another extent overflow record */
5279 * overflow record. This means that we might have to shift
5281 * We start iteration from the first record to the last record,
5282 * and shift the extent entry from one record to another.
5283 * We might have to create a new extent record for the last
5287 /* Initialize iterator to search the next record */
5290 /* Copy the key from the iterator that was used to update the modified attribute record. */
5326 * overflow record. This means that we might have to shift
5328 * We start iteration from the first record to the last record,
5329 * examine one extent record in each iteration and shift one
5330 * extent entry from one record to another. We might have to
5331 * create a new extent record for the last extent entry for the
5336 * overflow extent record. We keep on going till there are no such
5338 * allocation block number of the extent record which is part of
5339 * the key for the extent record in each iteration. Note that
5340 * because the extent record key is changing while we are searching,
5341 * the record can not be updated directly, instead it has to be
5346 printf ("hfs_split_extent: Will shift (%u,%u) into overflow record with startBlock=%u\n", shift_extent.startBlock, shift_extent.blockCount, read_recStartBlock);
5349 /* Search if there is any existing overflow extent record
5355 * number of the current extent record and the total number
5356 * of blocks existing in the current extent record.
5369 /* No matching record was found, so create a new extent record.
5370 * Note: Since no record was found, we can't rely on the
5372 * later before we insert the record.
5377 /* The extra extent entry from the previous record is being inserted
5378 * as the first entry in the current extent record. This will change
5380 * record, which is the startBlock value from the extent record key.
5381 * Since one extra entry is being inserted in the record, the new
5382 * FABN for the record will less than old FABN by the number of blocks
5385 * startBlock of the following record.
5395 * of blocks in this extent record. It will now point to the
5396 * starting allocation block number for the next extent record.
5406 /* Initialize new record content with only one extent entry */
5408 /* The new record will contain only one extent entry */
5417 * record for the xattrs, the extents_key will
5422 /* Initialize the new xattr record */
5429 * not correspond to the record that we are
5438 /* Initialize the new extent record */
5442 /* The overflow extent entry from previous record will be
5443 * the first entry in this extent record. If the last
5444 * extent entry in this record is valid, it will be shifted
5445 * into the following extent record as its first entry. So
5447 * record.
5456 /* Overflow extent entry saved from previous record
5457 * is now the first entry in the current record.
5462 printf ("hfs_split_extent: Shift overflow=(%u,%u) to record with updated startBlock=%u\n", shift_extent.startBlock, shift_extent.blockCount, write_recStartBlock);
5465 /* The last entry from current record will be the
5467 * the following extent record.
5471 /* Since the key->startBlock is being changed for this record,
5480 printf ("hfs_split_extent: Deleted extent record with startBlock=%u\n", (is_xattr ? xattr_key->startBlock : extents_key->startBlock));
5484 /* Insert the newly created or modified extent record */
5497 printf ("hfs_split_extent: Inserted extent record with startBlock=%u\n", write_recStartBlock);
5537 * record that exists in the catalog record, extent record from overflow
5542 * the current file, extent, and extent record that
5571 printf ("hfs_reclaim_extent: Examine record:%u recStartBlock=%u, %u:(%u,%u)\n", extent_info->overflow_count, extent_info->recStartBlock, index, oldStartBlock, oldBlockCount);
5748 /* Update the extent record with the new start block information */
5753 /* Update the extents in catalog record */
5766 /* Replace record for extents overflow or extents-based xattrs */
5771 printf ("hfs_reclaim_extent: fileID=%u, update record error=%u\n", extent_info->fileID, error);
5784 printf ("hfs_reclaim_extent: Relocated record:%u %u:(%u,%u) to (%u,%u)\n", extent_info->overflow_count, index, oldStartBlock, oldBlockCount, newStartBlock, newBlockCount);
5799 /* For a non-system file, if an extent entry from catalog record
5800 * was modified, sync the in-memory changes to the catalog record
5849 * fileID ID of the catalog record that needs to be relocated
5991 /* Lookup catalog record for directory hard link and
6015 /* Relocate extents from the catalog record */
6030 * working on overflow extents record.
6055 extent_info->btdata.bufferAddress = extent_info->record.overflow;
6070 extent_info->extents = extent_info->record.overflow;
6072 if (extent_info->record.overflow[i].blockCount == 0) {
6078 printf ("hfs_reclaim_file: fileID=%u #%d %u:(%u,%u) hfs_reclaim_extent error=%d\n", fileID, extent_info->overflow_count, i, extent_info->record.overflow[i].startBlock, extent_info->record.overflow[i].blockCount, error);
6289 /* Update the catalog record for .journal */
6415 * the field in the volume header and the catalog record.
6491 /* Update the catalog record for .journal_info_block */
6683 * buffer pointer actually points to the xattr record from the
6686 extent_info->btdata.bufferAddress = &(extent_info->record.xattr);
6706 * will place the iterator before the first matching record.
6722 /* Iterate to the next record */
6738 if ((extent_info->record.xattr.recordType != kHFSPlusAttrForkData) &&
6739 (extent_info->record.xattr.recordType != kHFSPlusAttrExtents)) {
6743 if (extent_info->record.xattr.recordType == kHFSPlusAttrForkData) {
6745 extent_info->extents = extent_info->record.xattr.forkData.theFork.extents;
6746 } else if (extent_info->record.xattr.recordType == kHFSPlusAttrExtents) {
6748 extent_info->extents = extent_info->record.xattr.overflowExtents.extents;
6851 /* Check if any of the extents in the current record need to be relocated */
6881 /* Continue iterating to next attribute record */
6921 * This function iterates over all the record in catalog btree looking
7051 * next catalog record.
7277 * extent record for given fileID. It will always return btNotFound,