Source
127
127
/* Initialize creation information for free space manager */
128
128
fspace->client = fs_create->client;
129
129
fspace->shrink_percent = fs_create->shrink_percent;
130
130
fspace->expand_percent = fs_create->expand_percent;
131
131
fspace->max_sect_addr = fs_create->max_sect_addr;
132
132
fspace->max_sect_size = fs_create->max_sect_size;
133
133
134
134
fspace->alignment = alignment;
135
135
fspace->threshold = threshold;
136
136
137
-
/* Check if the free space tracker is supposed to be persistant */
137
+
/* Check if the free space tracker is supposed to be persistent */
138
138
if(fs_addr) {
139
139
/* Allocate space for the free space header */
140
140
if(HADDR_UNDEF == (fspace->addr = H5MF_alloc(f, H5FD_MEM_FSPACE_HDR, dxpl_id, (hsize_t)fspace->hdr_size)))
141
141
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "file allocation failed for free space header")
142
142
143
143
/* Cache the new free space header (pinned) */
144
144
if(H5AC_insert_entry(f, dxpl_id, H5AC_FSPACE_HDR, fspace->addr, fspace, H5AC__PIN_ENTRY_FLAG) < 0)
145
145
HGOTO_ERROR(H5E_FSPACE, H5E_CANTINIT, NULL, "can't add free space header to cache")
146
146
147
147
/* Return free space header address to caller, if desired */
366
366
#endif /* H5FS_DEBUG */
367
367
368
368
/* Check if section info is valid */
369
369
/* (i.e. the header "owns" the section info and it's not in the cache) */
370
370
if(fspace->sinfo) {
371
371
#ifdef H5FS_DEBUG
372
372
HDfprintf(stderr, "%s: fspace->tot_sect_count = %Hu, fspace->serial_sect_count = %Hu, fspace->sect_addr = %a, fspace->rc = %u\n", FUNC, fspace->tot_sect_count, fspace->serial_sect_count, fspace->sect_addr, fspace->rc);
373
373
HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n", FUNC, fspace->alloc_sect_size, fspace->sect_size);
374
374
#endif /* H5FS_DEBUG */
375
375
/* If there are sections to serialize, update them */
376
-
/* (if the free space manager is persistant) */
376
+
/* (if the free space manager is persistent) */
377
377
if(fspace->serial_sect_count > 0 && H5F_addr_defined(fspace->addr)) {
378
378
#ifdef H5FS_DEBUG
379
379
HDfprintf(stderr, "%s: Real sections to store in file\n", FUNC);
380
380
#endif /* H5FS_DEBUG */
381
381
if(fspace->sinfo->dirty) {
382
382
/* Check if the section info is "floating" */
383
383
if(!H5F_addr_defined(fspace->sect_addr)) {
384
384
/* Sanity check */
385
385
HDassert(fspace->sect_size > 0);
386
386
722
722
herr_t ret_value = SUCCEED; /* Return value */
723
723
724
724
FUNC_ENTER_NOAPI_NOINIT
725
725
#ifdef QAK
726
726
HDfprintf(stderr, "%s: Marking free space header as dirty\n", FUNC);
727
727
#endif /* QAK */
728
728
729
729
/* Sanity check */
730
730
HDassert(fspace);
731
731
732
-
/* Check if the free space manager is persistant */
732
+
/* Check if the free space manager is persistent */
733
733
if(H5F_addr_defined(fspace->addr))
734
734
/* Mark header as dirty in cache */
735
735
if(H5AC_mark_entry_dirty(fspace) < 0)
736
736
HGOTO_ERROR(H5E_FSPACE, H5E_CANTMARKDIRTY, FAIL, "unable to mark free space header as dirty")
737
737
738
738
done:
739
739
FUNC_LEAVE_NOAPI(ret_value)
740
740
} /* end H5FS_dirty() */
741
741
742
742
•