File disk_manager.c
FileList > cubrid > src > storage > disk_manager.c
Go to the source code of this file
#include "config.h"
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "disk_manager.h"
#include "porting.h"
#include "event_log.h"
#include "porting_inline.hpp"
#include "system_parameter.h"
#include "error_manager.h"
#include "language_support.h"
#include "intl_support.h"
#include "xserver_interface.h"
#include "file_io.h"
#include "page_buffer.h"
#include "log_append.hpp"
#include "log_manager.h"
#include "log_lsa.hpp"
#include "log_volids.hpp"
#include "critical_section.h"
#include "boot_sr.h"
#include "tz_support.h"
#include "db_date.h"
#include "bit.h"
#include "fault_injection.h"
#include "vacuum.h"
#include "dbtype.h"
#include "thread_entry_task.hpp"
#include "thread_manager.hpp"
#include "double_write_buffer.hpp"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Static Attributes
Public Functions
| Type |
Name |
| int |
disk_add_volume_extension (THREAD_ENTRY * thread_p, DB_VOLPURPOSE purpose, DB_VOLTYPE voltype, DKNPAGES npages, const char * path, const char * name, const char * comments, int max_write_size_in_sec, bool overwrite, VOLID * volid_out)
|
| DISK_ISVALID |
disk_check (THREAD_ENTRY * thread_p, bool repair)
|
| DISK_ISVALID |
disk_check_sectors_are_reserved (THREAD_ENTRY * thread_p, VSID * vsids, int nsects)
|
| int |
disk_compare_vsids (const void * first, const void * second)
|
| int |
disk_dump_all (THREAD_ENTRY * thread_p, FILE * fp)
|
| int |
disk_format_first_volume (THREAD_ENTRY * thread_p, const char * full_dbname, const char * dbcomments, DKNPAGES npages)
|
| int |
disk_get_boot_db_charset (THREAD_ENTRY * thread_p, INT16 volid, INTL_CODESET * db_charset)
|
| HFID * |
disk_get_boot_hfid (THREAD_ENTRY * thread_p, INT16 volid, HFID * hfid)
|
| int |
disk_get_checkpoint (THREAD_ENTRY * thread_p, INT16 volid, LOG_LSA * vol_lsa)
|
| int |
disk_get_db_creation (THREAD_ENTRY * thread_p, INT16 volid, INT64 * db_creation)
|
| char * |
disk_get_link (THREAD_ENTRY * thread_p, INT16 volid, INT16 * next_volid, char * next_volext_fullname)
|
| INT32 |
disk_get_total_numsectors (THREAD_ENTRY * thread_p, INT16 volid)
|
| DISK_ISVALID |
disk_is_page_sector_reserved (THREAD_ENTRY * thread_p, VOLID volid, PAGEID pageid)
|
| DISK_ISVALID |
disk_is_page_sector_reserved_with_debug_crash (THREAD_ENTRY * thread_p, VOLID volid, PAGEID pageid, bool debug_crash)
|
| void |
disk_lock_extend (void)
|
| void |
disk_manager_final (void)
|
| int |
disk_manager_init (THREAD_ENTRY * thread_p, bool load_from_disk)
|
| DISK_ISVALID |
disk_map_clone_check_leaks (DISK_VOLMAP_CLONE * disk_map_clone)
|
| DISK_ISVALID |
disk_map_clone_clear (VSID * vsid, DISK_VOLMAP_CLONE * disk_map_clone)
|
| int |
disk_map_clone_create (THREAD_ENTRY * thread_p, DISK_VOLMAP_CLONE ** disk_map_clone)
|
| void |
disk_map_clone_free (DISK_VOLMAP_CLONE ** disk_map_clone)
|
| int |
disk_reserve_sectors (THREAD_ENTRY * thread_p, DB_VOLPURPOSE purpose, VOLID volid_hint, int n_sectors, VSID * reserved_sectors)
|
| void |
disk_rv_dump_hdr (FILE * fp, int length_ignore, void * data)
|
| void |
disk_rv_dump_init_map (FILE * fp, int length_ignore, void * data)
|
| void |
disk_rv_dump_link (FILE * fp, int length_ignore, void * data)
|
| void |
disk_rv_dump_set_boot_hfid (FILE * fp, int length_ignore, void * data)
|
| void |
disk_rv_dump_set_creation_time (FILE * fp, int length_ignore, void * data)
|
| void |
disk_rv_dump_volume_expand (FILE * fp, int length_ignore, void * data)
|
| int |
disk_rv_redo_dboutside_newvol (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_redo_format (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_redo_init_map (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_redo_volume_expand (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_reserve_sectors (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_undo_format (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_undoredo_link (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_undoredo_set_boot_hfid (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_undoredo_set_creation_time (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_unreserve_sectors (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_volhead_extend_redo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_rv_volhead_extend_undo (THREAD_ENTRY * thread_p, LOG_RCV * rcv)
|
| int |
disk_sectors_to_extend_npages (const int num_pages)
|
| int |
disk_set_boot_hfid (THREAD_ENTRY * thread_p, INT16 volid, const HFID * hfid)
|
| int |
disk_set_checkpoint (THREAD_ENTRY * thread_p, INT16 volid, const LOG_LSA * log_chkpt_lsa)
|
| int |
disk_set_creation (THREAD_ENTRY * thread_p, INT16 volid, const char * new_vol_fullname, const INT64 * new_dbcreation, const LOG_LSA * new_chkptlsa, bool logchange, DISK_FLUSH_TYPE flush)
|
| int |
disk_set_link (THREAD_ENTRY * thread_p, INT16 volid, INT16 next_volid, const char * next_volext_fullname, bool logchange, DISK_FLUSH_TYPE flush)
|
| int |
disk_spacedb (THREAD_ENTRY * thread_p, SPACEDB_ALL * spaceall, SPACEDB_ONEVOL ** spacevols)
|
| int |
disk_unformat (THREAD_ENTRY * thread_p, const char * vol_fullname)
|
| void |
disk_unlock_extend (void)
|
| int |
disk_unreserve_ordered_sectors (THREAD_ENTRY * thread_p, DB_VOLPURPOSE purpose, int nsects, VSID * vsids)
|
| void |
disk_volheader_check_magic (THREAD_ENTRY * thread_p, const PAGE_PTR page_volheader)
|
| int |
disk_volume_header_end_scan (THREAD_ENTRY * thread_p, void ** ptr)
|
| SCAN_CODE |
disk_volume_header_next_scan (THREAD_ENTRY * thread_p, int cursor, DB_VALUE ** out_values, int out_cnt, void * ptr)
|
| int |
disk_volume_header_start_scan (THREAD_ENTRY * thread_p, int type, DB_VALUE ** arg_values, int arg_cnt, void ** ptr)
|
| INT32 |
xdisk_get_free_numpages (THREAD_ENTRY * thread_p, INT16 volid)
|
| char * |
xdisk_get_fullname (THREAD_ENTRY * thread_p, INT16 volid, char * vol_fullname)
|
| DB_VOLPURPOSE |
xdisk_get_purpose (THREAD_ENTRY * thread_p, INT16 volid)
|
| int |
xdisk_get_purpose_and_space_info (THREAD_ENTRY * thread_p, VOLID volid, DB_VOLPURPOSE * vol_purpose, DISK_VOLUME_SPACE_INFO * space_info)
|
| INT16 |
xdisk_get_purpose_and_sys_lastpage (THREAD_ENTRY * thread_p, INT16 volid, DB_VOLPURPOSE * vol_purpose, INT32 * sys_lastpage)
|
| char * |
xdisk_get_remarks (THREAD_ENTRY * thread_p, INT16 volid)
|
| INT32 |
xdisk_get_total_numpages (THREAD_ENTRY * thread_p, INT16 volid)
|
| bool |
xdisk_is_volume_exist (THREAD_ENTRY * thread_p, VOLID volid)
|
Public Static Functions
| Type |
Name |
| int |
disk_add_volume (THREAD_ENTRY * thread_p, DBDEF_VOL_EXT_INFO * extinfo, VOLID * volid_out, DKNSECTS * nsects_free_out)
|
| void |
disk_cache_final (void)
|
| void |
disk_cache_free_reserved (DISK_RESERVE_CONTEXT * context)
|
| int |
disk_cache_init (void)
|
| bool |
disk_cache_load_all_volumes (THREAD_ENTRY * thread_p)
|
| bool |
disk_cache_load_volume (THREAD_ENTRY * thread_p, INT16 volid, void * ignore)
|
| void |
disk_cache_lock_reserve (DISK_EXTEND_INFO * expand_info)
|
| void |
disk_cache_lock_reserve_for_purpose (DB_VOLPURPOSE purpose)
|
| void |
disk_cache_unlock_reserve (DISK_EXTEND_INFO * expand_info)
|
| void |
disk_cache_unlock_reserve_for_purpose (DB_VOLPURPOSE purpose)
|
| void |
disk_cache_update_vol_free (VOLID volid, DKNSECTS delta_free)
|
| int |
disk_can_overwrite_data_volume (THREAD_ENTRY * thread_p, const char * vol_label_p, bool * can_overwrite)
|
| void |
disk_check_own_reserve_for_purpose (DB_VOLPURPOSE purpose)
|
| DISK_ISVALID |
disk_check_sectors_are_reserved_in_volume (THREAD_ENTRY * thread_p, VOLID volid, DISK_RESERVE_CONTEXT * context)
|
| DISK_ISVALID |
disk_check_volume (THREAD_ENTRY * thread_p, INT16 volid, bool repair)
|
| bool |
disk_check_volume_exist (THREAD_ENTRY * thread_p, VOLID volid, void * arg)
|
| bool |
disk_compatible_type_and_purpose (DB_VOLTYPE type, DB_VOLPURPOSE purpose)
|
| bool |
disk_dump_goodvol_all (THREAD_ENTRY * thread_p, INT16 volid, void * ignore)
|
| int |
disk_dump_volume_system_info (THREAD_ENTRY * thread_p, FILE * fp, INT16 volid)
|
| int |
disk_extend (THREAD_ENTRY * thread_p, DISK_EXTEND_INFO * expand_info, DISK_RESERVE_CONTEXT * reserve_context)
|
| int |
disk_format (THREAD_ENTRY * thread_p, const char * dbname, INT16 volid, DBDEF_VOL_EXT_INFO * ext_info, DKNSECTS * nsect_free_out)
|
| int |
disk_get_volheader_internal (THREAD_ENTRY * thread_p, VOLID volid, PGBUF_LATCH_MODE latch_mode, PAGE_PTR * page_volheader_out, DISK_VOLUME_HEADER ** volheader_out, const char * file, int line)
|
| DB_VOLPURPOSE |
disk_get_volpurpose (VOLID volid)
|
| DB_VOLTYPE |
disk_get_voltype (VOLID volid)
|
| DISK_ISVALID |
disk_is_sector_reserved (THREAD_ENTRY * thread_p, const DISK_VOLUME_HEADER * volheader, SECTID sectid, bool debug_crash)
|
| bool |
disk_is_valid_volid (VOLID volid)
|
| void |
disk_log_extend_elapsed (THREAD_ENTRY * thread_p, const char * event, const char * name, DB_VOLTYPE voltype, const char * log)
|
| const char * |
disk_purpose_to_string (DB_VOLPURPOSE purpose)
|
| int |
disk_reserve_from_cache (THREAD_ENTRY * thread_p, DISK_RESERVE_CONTEXT * context, bool * did_extend)
|
| void |
disk_reserve_from_cache_vols (DB_VOLTYPE type, DISK_RESERVE_CONTEXT * context)
|
| void |
disk_reserve_from_cache_volume (VOLID volid, DISK_RESERVE_CONTEXT * context)
|
| int |
disk_reserve_sectors_in_volume (THREAD_ENTRY * thread_p, int vol_index, DISK_RESERVE_CONTEXT * context)
|
| int |
disk_stab_count_free (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| void |
disk_stab_cursor_check_valid (const DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_clear_bit (DISK_STAB_CURSOR * cursor)
|
| int |
disk_stab_cursor_compare (const DISK_STAB_CURSOR * first_cursor, const DISK_STAB_CURSOR * second_cursor)
|
| int |
disk_stab_cursor_fix (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, PGBUF_LATCH_MODE latch_mode)
|
| int |
disk_stab_cursor_get_bit_index_in_page (const DISK_STAB_CURSOR * cursor)
|
| SECTID |
disk_stab_cursor_get_sectid (const DISK_STAB_CURSOR * cursor)
|
| bool |
disk_stab_cursor_is_bit_set (const DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_set_at_end (const DISK_VOLUME_HEADER * volheader, DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_set_at_sectid (const DISK_VOLUME_HEADER * volheader, SECTID sectid, DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_set_at_start (const DISK_VOLUME_HEADER * volheader, DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_set_bit (DISK_STAB_CURSOR * cursor)
|
| void |
disk_stab_cursor_unfix (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor)
|
| int |
disk_stab_dump (THREAD_ENTRY * thread_p, FILE * fp, const DISK_VOLUME_HEADER * volheader)
|
| int |
disk_stab_dump_unit (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| int |
disk_stab_has_used (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| int |
disk_stab_init (THREAD_ENTRY * thread_p, DISK_VOLUME_HEADER * volheader)
|
| int |
disk_stab_iterate_units (THREAD_ENTRY * thread_p, const DISK_VOLUME_HEADER * volheader, PGBUF_LATCH_MODE mode, DISK_STAB_CURSOR * start, DISK_STAB_CURSOR * end, DISK_STAB_UNIT_FUNC f_unit, void * f_unit_args)
|
| int |
disk_stab_iterate_units_all (THREAD_ENTRY * thread_p, const DISK_VOLUME_HEADER * volheader, PGBUF_LATCH_MODE mode, DISK_STAB_UNIT_FUNC f_unit, void * f_unit_args)
|
| int |
disk_stab_set_bits_contiguous (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| int |
disk_stab_unit_check_reserved (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| int |
disk_stab_unit_reserve (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| int |
disk_stab_unit_unreserve (THREAD_ENTRY * thread_p, DISK_STAB_CURSOR * cursor, bool * stop, void * args)
|
| const char * |
disk_type_to_string (DB_VOLTYPE voltype)
|
| int |
disk_unreserve_ordered_sectors_without_csect (THREAD_ENTRY * thread_p, DB_VOLPURPOSE purpose, int nsects, VSID * vsids)
|
| int |
disk_unreserve_sectors_from_volume (THREAD_ENTRY * thread_p, VOLID volid, DISK_RESERVE_CONTEXT * context)
|
| void |
disk_verify_volume_header (THREAD_ENTRY * thread_p, PAGE_PTR pgptr)
|
| void |
disk_vhdr_dump (FILE * fp, const DISK_VOLUME_HEADER * vhdr)
|
| char * |
disk_vhdr_get_next_vol_fullname (const DISK_VOLUME_HEADER * vhdr)
|
| char * |
disk_vhdr_get_vol_fullname (const DISK_VOLUME_HEADER * vhdr)
|
| int |
disk_vhdr_get_vol_header_size (const DISK_VOLUME_HEADER * vhdr)
|
| char * |
disk_vhdr_get_vol_remarks (const DISK_VOLUME_HEADER * vhdr)
|
| int |
disk_vhdr_set_next_vol_fullname (DISK_VOLUME_HEADER * vhdr, const char * next_vol_fullname)
|
| int |
disk_vhdr_set_vol_fullname (DISK_VOLUME_HEADER * vhdr, const char * vol_fullname)
|
| int |
disk_vhdr_set_vol_remarks (DISK_VOLUME_HEADER * vhdr, const char * vol_remarks)
|
| int |
disk_volume_boot (THREAD_ENTRY * thread_p, VOLID volid, DB_VOLPURPOSE * purpose_out, DB_VOLTYPE * voltype_out, DISK_VOLUME_SPACE_INFO * space_out)
|
| int |
disk_volume_expand (THREAD_ENTRY * thread_p, VOLID volid, DB_VOLTYPE voltype, DKNSECTS nsect_extend, DKNSECTS * nsect_extended_out)
|
| void |
disk_volume_header_set_stab (DB_VOLPURPOSE vol_purpose, DISK_VOLUME_HEADER * volheader)
|
| bool |
disk_volume_is_empty (THREAD_ENTRY * thread_p, VOLID volid)
|
Macros
| Type |
Name |
| define |
DISK_ALLOCTBL_SECTOR_BIT_OFFSET (sect) ((([**sect**](broker__monitor_8c.md#function-timeout)) % [**DISK\_STAB\_PAGE\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_page_bit_count)) % [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count))
|
| define |
DISK_ALLOCTBL_SECTOR_PAGE_OFFSET (sect) (([**sect**](broker__monitor_8c.md#function-timeout)) / [**DISK\_STAB\_PAGE\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_page_bit_count))
|
| define |
DISK_ALLOCTBL_SECTOR_UNIT_OFFSET (sect) ((([**sect**](broker__monitor_8c.md#function-timeout)) % [**DISK\_STAB\_PAGE\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_page_bit_count)) / [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count))
|
| define |
DISK_EXTEND_COLLECT (nsects) /* multi line expression */
|
| define |
DISK_EXTEND_REGISTER () /* multi line expression */
|
| define |
DISK_MIN_VOLUME_SECTS [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count)
|
| define |
DISK_PRERESERVE_BUF_DEFAULT 16
|
| define |
DISK_RESERVE_CONTEXT_AS_ARGS (context) /* multi line expression */
|
| define |
DISK_RESERVE_CONTEXT_MSG /* multi line expression */
|
| define |
DISK_SAFE_OSDISK_FREE_SECTS ([**DISK\_SAFE\_OSDISK\_FREE\_SPACE**](disk__manager_8c.md#define-disk_safe_osdisk_free_space) / [**IO\_SECTORSIZE**](storage__common_8h.md#define-io_sectorsize))
|
| define |
DISK_SAFE_OSDISK_FREE_SPACE (64 \* 1024 \* 1024)
|
| define |
DISK_SECTS_ASSERT_ROUNDED (nsects) [**assert**](malloc__2__8__3_8c.md#define-assert) (nsects == [**DISK\_SECTS\_ROUND\_DOWN**](disk__manager_8c.md#define-disk_sects_round_down) (nsects))
|
| define |
DISK_SECTS_ROUND_DOWN (nsects) ((nsects / [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count)) \* [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count))
|
| define |
DISK_SECTS_ROUND_UP (nsects) ([**CEIL\_PTVDIV**](memory__alloc_8h.md#define-ceil_ptvdiv) (nsects, [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count)) \* [**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count))
|
| define |
DISK_STAB_CURSOR_INITIALIZER { [**NULL**](freelistheap_8h.md#define-null), 0, 0, 0, 0, [**NULL**](freelistheap_8h.md#define-null), [**NULL**](freelistheap_8h.md#define-null) }
|
| define |
DISK_STAB_NPAGES (nsect_max) ([**CEIL\_PTVDIV**](memory__alloc_8h.md#define-ceil_ptvdiv) (nsect\_max, [**DISK\_STAB\_PAGE\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_page_bit_count)))
|
| define |
DISK_STAB_PAGE_BIT_COUNT (([**int**](broker__monitor_8c.md#function-timeout)) ([**DISK\_STAB\_UNIT\_BIT\_COUNT**](disk__manager_8c.md#define-disk_stab_unit_bit_count) \* [**DISK\_STAB\_PAGE\_UNITS\_COUNT**](disk__manager_8c.md#define-disk_stab_page_units_count)))
|
| define |
DISK_STAB_PAGE_UNITS_COUNT (([**int**](broker__monitor_8c.md#function-timeout)) ([**DB\_PAGESIZE**](storage__common_8h.md#define-db_pagesize) / [**DISK\_STAB\_UNIT\_SIZE\_OF**](disk__manager_8c.md#define-disk_stab_unit_size_of)))
|
| define |
DISK_STAB_UNIT_BIT_COUNT (([**int**](broker__monitor_8c.md#function-timeout)) ([**DISK\_STAB\_UNIT\_SIZE\_OF**](disk__manager_8c.md#define-disk_stab_unit_size_of) \* [**CHAR\_BIT**](broker__monitor_8c.md#function-timeout)))
|
| define |
DISK_STAB_UNIT_SIZE_OF [**sizeof**](broker__monitor_8c.md#function-timeout) ([**DISK\_STAB\_UNIT**](disk__manager_8c.md#typedef-disk_stab_unit))
|
| define |
DISK_SYS_NPAGE_SIZE (nsect_max) (1 + [**DISK\_STAB\_NPAGES**](disk__manager_8c.md#define-disk_stab_npages) (nsect\_max))
|
| define |
DISK_SYS_NSECT_SIZE (nsect_max) ([**CEIL\_PTVDIV**](memory__alloc_8h.md#define-ceil_ptvdiv) ([**DISK\_SYS\_NPAGE\_SIZE**](disk__manager_8c.md#define-disk_sys_npage_size) (nsect\_max), [**DISK\_SECTOR\_NPAGES**](storage__common_8h.md#define-disk_sector_npages)))
|
| define |
DISK_VOLHEADER_AS_ARGS (arg_volh) /* multi line expression */
|
| define |
DISK_VOLHEADER_MSG /* multi line expression */
|
| define |
disk_get_volheader (...) [**disk\_get\_volheader\_internal**](disk__manager_8c.md#function-disk_get_volheader_internal) ([**\_\_VA\_ARGS\_\_**](broker__monitor_8c.md#function-timeout), [**ARG\_FILE\_LINE**](error__manager_8h.md#define-arg_file_line))
|
| define |
disk_log (func, msg, ...) /* multi line expression */
|
| define |
fault_inject_random_crash () [**if**](dynamic__load_8c.md#function-if) ([**vol\_purpose**](broker__monitor_8c.md#function-timeout) == DB\_PERMANENT\_DATA\_PURPOSE) [**FI\_TEST**](fault__injection_8h.md#define-fi_test) (thread\_p, FI\_TEST\_DISK\_MANAGER\_VOLUME\_ADD, 0)
|
Public Types Documentation
typedef DISK_CACHE
typedef struct disk_cache DISK_CACHE;
typedef DISK_CACHE_VOLINFO
typedef struct disk_cache_volinfo DISK_CACHE_VOLINFO;
typedef DISK_CACHE_VOL_RESERVE
typedef struct disk_cache_vol_reserve DISK_CACHE_VOL_RESERVE;
typedef DISK_CHECK_VOL_INFO
typedef struct disk_check_vol_info DISK_CHECK_VOL_INFO;
typedef DISK_EXTEND_INFO
typedef struct disk_extend_info DISK_EXTEND_INFO;
typedef DISK_PERM_PURPOSE_INFO
typedef struct disk_perm_info DISK_PERM_PURPOSE_INFO;
typedef DISK_RECV_CHANGE_CREATION
typedef struct disk_recv_change_creation DISK_RECV_CHANGE_CREATION;
typedef DISK_RECV_DATA_VOLUME_EXPAND
typedef struct disk_recv_data_volume_expand DISK_RECV_DATA_VOLUME_EXPAND;
typedef DISK_RECV_LINK_PERM_VOLUME
typedef struct disk_recv_link_perm_volume DISK_RECV_LINK_PERM_VOLUME;
typedef DISK_RESERVE_CONTEXT
typedef struct disk_reserve_context DISK_RESERVE_CONTEXT;
typedef DISK_STAB_CURSOR
typedef struct disk_stab_cursor DISK_STAB_CURSOR;
typedef DISK_STAB_UNIT
typedef UINT64 DISK_STAB_UNIT;
typedef DISK_STAB_UNIT_FUNC
typedef int(* DISK_STAB_UNIT_FUNC) (THREAD_ENTRY *thread_p, DISK_STAB_CURSOR *cursor, bool *stop, void *args);
typedef DISK_TEMP_PURPOSE_INFO
typedef struct disk_temp_info DISK_TEMP_PURPOSE_INFO;
typedef struct disk_volume_header DISK_VOLUME_HEADER;
typedef struct disk_vol_header_context DISK_VOL_HEADER_CONTEXT;
Public Static Attributes Documentation
variable disk_Cache
variable disk_Logging
variable disk_Temp_max_sects
DKNSECTS disk_Temp_max_sects;
Public Functions Documentation
function disk_add_volume_extension
int disk_add_volume_extension (
THREAD_ENTRY * thread_p,
DB_VOLPURPOSE purpose,
DB_VOLTYPE voltype,
DKNPAGES npages,
const char * path,
const char * name,
const char * comments,
int max_write_size_in_sec,
bool overwrite,
VOLID * volid_out
)
function disk_check
DISK_ISVALID disk_check (
THREAD_ENTRY * thread_p,
bool repair
)
function disk_check_sectors_are_reserved
DISK_ISVALID disk_check_sectors_are_reserved (
THREAD_ENTRY * thread_p,
VSID * vsids,
int nsects
)
function disk_compare_vsids
int disk_compare_vsids (
const void * first,
const void * second
)
function disk_dump_all
int disk_dump_all (
THREAD_ENTRY * thread_p,
FILE * fp
)
int disk_format_first_volume (
THREAD_ENTRY * thread_p,
const char * full_dbname,
const char * dbcomments,
DKNPAGES npages
)
function disk_get_boot_db_charset
int disk_get_boot_db_charset (
THREAD_ENTRY * thread_p,
INT16 volid,
INTL_CODESET * db_charset
)
function disk_get_boot_hfid
HFID * disk_get_boot_hfid (
THREAD_ENTRY * thread_p,
INT16 volid,
HFID * hfid
)
function disk_get_checkpoint
int disk_get_checkpoint (
THREAD_ENTRY * thread_p,
INT16 volid,
LOG_LSA * vol_lsa
)
function disk_get_db_creation
int disk_get_db_creation (
THREAD_ENTRY * thread_p,
INT16 volid,
INT64 * db_creation
)
function disk_get_link
char * disk_get_link (
THREAD_ENTRY * thread_p,
INT16 volid,
INT16 * next_volid,
char * next_volext_fullname
)
function disk_get_total_numsectors
INT32 disk_get_total_numsectors (
THREAD_ENTRY * thread_p,
INT16 volid
)
function disk_is_page_sector_reserved
DISK_ISVALID disk_is_page_sector_reserved (
THREAD_ENTRY * thread_p,
VOLID volid,
PAGEID pageid
)
function disk_is_page_sector_reserved_with_debug_crash
DISK_ISVALID disk_is_page_sector_reserved_with_debug_crash (
THREAD_ENTRY * thread_p,
VOLID volid,
PAGEID pageid,
bool debug_crash
)
function disk_lock_extend
void disk_lock_extend (
void
)
function disk_manager_final
void disk_manager_final (
void
)
function disk_manager_init
int disk_manager_init (
THREAD_ENTRY * thread_p,
bool load_from_disk
)
function disk_map_clone_check_leaks
DISK_ISVALID disk_map_clone_check_leaks (
DISK_VOLMAP_CLONE * disk_map_clone
)
function disk_map_clone_clear
DISK_ISVALID disk_map_clone_clear (
VSID * vsid,
DISK_VOLMAP_CLONE * disk_map_clone
)
function disk_map_clone_create
int disk_map_clone_create (
THREAD_ENTRY * thread_p,
DISK_VOLMAP_CLONE ** disk_map_clone
)
function disk_map_clone_free
void disk_map_clone_free (
DISK_VOLMAP_CLONE ** disk_map_clone
)
function disk_reserve_sectors
int disk_reserve_sectors (
THREAD_ENTRY * thread_p,
DB_VOLPURPOSE purpose,
VOLID volid_hint,
int n_sectors,
VSID * reserved_sectors
)
function disk_rv_dump_hdr
void disk_rv_dump_hdr (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_dump_init_map
void disk_rv_dump_init_map (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_dump_link
void disk_rv_dump_link (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_dump_set_boot_hfid
void disk_rv_dump_set_boot_hfid (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_dump_set_creation_time
void disk_rv_dump_set_creation_time (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_dump_volume_expand
void disk_rv_dump_volume_expand (
FILE * fp,
int length_ignore,
void * data
)
function disk_rv_redo_dboutside_newvol
int disk_rv_redo_dboutside_newvol (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
int disk_rv_redo_format (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_redo_init_map
int disk_rv_redo_init_map (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_redo_volume_expand
int disk_rv_redo_volume_expand (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_reserve_sectors
int disk_rv_reserve_sectors (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
int disk_rv_undo_format (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_undoredo_link
int disk_rv_undoredo_link (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_undoredo_set_boot_hfid
int disk_rv_undoredo_set_boot_hfid (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_undoredo_set_creation_time
int disk_rv_undoredo_set_creation_time (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_unreserve_sectors
int disk_rv_unreserve_sectors (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_volhead_extend_redo
int disk_rv_volhead_extend_redo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_rv_volhead_extend_undo
int disk_rv_volhead_extend_undo (
THREAD_ENTRY * thread_p,
LOG_RCV * rcv
)
function disk_sectors_to_extend_npages
int disk_sectors_to_extend_npages (
const int num_pages
)
function disk_set_boot_hfid
int disk_set_boot_hfid (
THREAD_ENTRY * thread_p,
INT16 volid,
const HFID * hfid
)
function disk_set_checkpoint
int disk_set_checkpoint (
THREAD_ENTRY * thread_p,
INT16 volid,
const LOG_LSA * log_chkpt_lsa
)
function disk_set_creation
int disk_set_creation (
THREAD_ENTRY * thread_p,
INT16 volid,
const char * new_vol_fullname,
const INT64 * new_dbcreation,
const LOG_LSA * new_chkptlsa,
bool logchange,
DISK_FLUSH_TYPE flush
)
function disk_set_link
int disk_set_link (
THREAD_ENTRY * thread_p,
INT16 volid,
INT16 next_volid,
const char * next_volext_fullname,
bool logchange,
DISK_FLUSH_TYPE flush
)
function disk_spacedb
int disk_spacedb (
THREAD_ENTRY * thread_p,
SPACEDB_ALL * spaceall,
SPACEDB_ONEVOL ** spacevols
)
int disk_unformat (
THREAD_ENTRY * thread_p,
const char * vol_fullname
)
function disk_unlock_extend
void disk_unlock_extend (
void
)
function disk_unreserve_ordered_sectors
int disk_unreserve_ordered_sectors (
THREAD_ENTRY * thread_p,
DB_VOLPURPOSE purpose,
int nsects,
VSID * vsids
)
void disk_volheader_check_magic (
THREAD_ENTRY * thread_p,
const PAGE_PTR page_volheader
)
int disk_volume_header_end_scan (
THREAD_ENTRY * thread_p,
void ** ptr
)
SCAN_CODE disk_volume_header_next_scan (
THREAD_ENTRY * thread_p,
int cursor,
DB_VALUE ** out_values,
int out_cnt,
void * ptr
)
int disk_volume_header_start_scan (
THREAD_ENTRY * thread_p,
int type,
DB_VALUE ** arg_values,
int arg_cnt,
void ** ptr
)
function xdisk_get_free_numpages
INT32 xdisk_get_free_numpages (
THREAD_ENTRY * thread_p,
INT16 volid
)
function xdisk_get_fullname
char * xdisk_get_fullname (
THREAD_ENTRY * thread_p,
INT16 volid,
char * vol_fullname
)
function xdisk_get_purpose
DB_VOLPURPOSE xdisk_get_purpose (
THREAD_ENTRY * thread_p,
INT16 volid
)
function xdisk_get_purpose_and_space_info
int xdisk_get_purpose_and_space_info (
THREAD_ENTRY * thread_p,
VOLID volid,
DB_VOLPURPOSE * vol_purpose,
DISK_VOLUME_SPACE_INFO * space_info
)
function xdisk_get_purpose_and_sys_lastpage
INT16 xdisk_get_purpose_and_sys_lastpage (
THREAD_ENTRY * thread_p,
INT16 volid,
DB_VOLPURPOSE * vol_purpose,
INT32 * sys_lastpage
)
char * xdisk_get_remarks (
THREAD_ENTRY * thread_p,
INT16 volid
)
function xdisk_get_total_numpages
INT32 xdisk_get_total_numpages (
THREAD_ENTRY * thread_p,
INT16 volid
)
function xdisk_is_volume_exist
bool xdisk_is_volume_exist (
THREAD_ENTRY * thread_p,
VOLID volid
)
Public Static Functions Documentation
function disk_add_volume
static int disk_add_volume (
THREAD_ENTRY * thread_p,
DBDEF_VOL_EXT_INFO * extinfo,
VOLID * volid_out,
DKNSECTS * nsects_free_out
)
function disk_cache_final
static void disk_cache_final (
void
)
function disk_cache_free_reserved
static void disk_cache_free_reserved (
DISK_RESERVE_CONTEXT * context
)
function disk_cache_init
static int disk_cache_init (
void
)
function disk_cache_load_all_volumes
static bool disk_cache_load_all_volumes (
THREAD_ENTRY * thread_p
)
function disk_cache_load_volume
static bool disk_cache_load_volume (
THREAD_ENTRY * thread_p,
INT16 volid,
void * ignore
)
function disk_cache_lock_reserve
static void disk_cache_lock_reserve (
DISK_EXTEND_INFO * expand_info
)
function disk_cache_lock_reserve_for_purpose
static void disk_cache_lock_reserve_for_purpose (
DB_VOLPURPOSE purpose
)
function disk_cache_unlock_reserve
static void disk_cache_unlock_reserve (
DISK_EXTEND_INFO * expand_info
)
function disk_cache_unlock_reserve_for_purpose
static void disk_cache_unlock_reserve_for_purpose (
DB_VOLPURPOSE purpose
)
function disk_cache_update_vol_free
static void disk_cache_update_vol_free (
VOLID volid,
DKNSECTS delta_free
)
function disk_can_overwrite_data_volume
static int disk_can_overwrite_data_volume (
THREAD_ENTRY * thread_p,
const char * vol_label_p,
bool * can_overwrite
)
function disk_check_own_reserve_for_purpose
static void disk_check_own_reserve_for_purpose (
DB_VOLPURPOSE purpose
)
function disk_check_sectors_are_reserved_in_volume
static DISK_ISVALID disk_check_sectors_are_reserved_in_volume (
THREAD_ENTRY * thread_p,
VOLID volid,
DISK_RESERVE_CONTEXT * context
)
function disk_check_volume
static DISK_ISVALID disk_check_volume (
THREAD_ENTRY * thread_p,
INT16 volid,
bool repair
)
function disk_check_volume_exist
static bool disk_check_volume_exist (
THREAD_ENTRY * thread_p,
VOLID volid,
void * arg
)
function disk_compatible_type_and_purpose
static bool disk_compatible_type_and_purpose (
DB_VOLTYPE type,
DB_VOLPURPOSE purpose
)
function disk_dump_goodvol_all
static bool disk_dump_goodvol_all (
THREAD_ENTRY * thread_p,
INT16 volid,
void * ignore
)
function disk_dump_volume_system_info
static int disk_dump_volume_system_info (
THREAD_ENTRY * thread_p,
FILE * fp,
INT16 volid
)
function disk_extend
static int disk_extend (
THREAD_ENTRY * thread_p,
DISK_EXTEND_INFO * expand_info,
DISK_RESERVE_CONTEXT * reserve_context
)
static int disk_format (
THREAD_ENTRY * thread_p,
const char * dbname,
INT16 volid,
DBDEF_VOL_EXT_INFO * ext_info,
DKNSECTS * nsect_free_out
)
static int disk_get_volheader_internal (
THREAD_ENTRY * thread_p,
VOLID volid,
PGBUF_LATCH_MODE latch_mode,
PAGE_PTR * page_volheader_out,
DISK_VOLUME_HEADER ** volheader_out,
const char * file,
int line
)
function disk_get_volpurpose
static DB_VOLPURPOSE disk_get_volpurpose (
VOLID volid
)
function disk_get_voltype
static DB_VOLTYPE disk_get_voltype (
VOLID volid
)
function disk_is_sector_reserved
static DISK_ISVALID disk_is_sector_reserved (
THREAD_ENTRY * thread_p,
const DISK_VOLUME_HEADER * volheader,
SECTID sectid,
bool debug_crash
)
function disk_is_valid_volid
static bool disk_is_valid_volid (
VOLID volid
)
function disk_log_extend_elapsed
static void disk_log_extend_elapsed (
THREAD_ENTRY * thread_p,
const char * event,
const char * name,
DB_VOLTYPE voltype,
const char * log
)
function disk_purpose_to_string
static const char * disk_purpose_to_string (
DB_VOLPURPOSE purpose
)
function disk_reserve_from_cache
static int disk_reserve_from_cache (
THREAD_ENTRY * thread_p,
DISK_RESERVE_CONTEXT * context,
bool * did_extend
)
function disk_reserve_from_cache_vols
static void disk_reserve_from_cache_vols (
DB_VOLTYPE type,
DISK_RESERVE_CONTEXT * context
)
function disk_reserve_from_cache_volume
static void disk_reserve_from_cache_volume (
VOLID volid,
DISK_RESERVE_CONTEXT * context
)
function disk_reserve_sectors_in_volume
static int disk_reserve_sectors_in_volume (
THREAD_ENTRY * thread_p,
int vol_index,
DISK_RESERVE_CONTEXT * context
)
function disk_stab_count_free
static int disk_stab_count_free (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_cursor_check_valid
static void disk_stab_cursor_check_valid (
const DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_clear_bit
static void disk_stab_cursor_clear_bit (
DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_compare
static int disk_stab_cursor_compare (
const DISK_STAB_CURSOR * first_cursor,
const DISK_STAB_CURSOR * second_cursor
)
function disk_stab_cursor_fix
static int disk_stab_cursor_fix (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
PGBUF_LATCH_MODE latch_mode
)
function disk_stab_cursor_get_bit_index_in_page
static int disk_stab_cursor_get_bit_index_in_page (
const DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_get_sectid
static SECTID disk_stab_cursor_get_sectid (
const DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_is_bit_set
static bool disk_stab_cursor_is_bit_set (
const DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_set_at_end
static void disk_stab_cursor_set_at_end (
const DISK_VOLUME_HEADER * volheader,
DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_set_at_sectid
static void disk_stab_cursor_set_at_sectid (
const DISK_VOLUME_HEADER * volheader,
SECTID sectid,
DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_set_at_start
static void disk_stab_cursor_set_at_start (
const DISK_VOLUME_HEADER * volheader,
DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_set_bit
static void disk_stab_cursor_set_bit (
DISK_STAB_CURSOR * cursor
)
function disk_stab_cursor_unfix
static void disk_stab_cursor_unfix (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor
)
function disk_stab_dump
static int disk_stab_dump (
THREAD_ENTRY * thread_p,
FILE * fp,
const DISK_VOLUME_HEADER * volheader
)
function disk_stab_dump_unit
static int disk_stab_dump_unit (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_has_used
static int disk_stab_has_used (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_init
static int disk_stab_init (
THREAD_ENTRY * thread_p,
DISK_VOLUME_HEADER * volheader
)
function disk_stab_iterate_units
static int disk_stab_iterate_units (
THREAD_ENTRY * thread_p,
const DISK_VOLUME_HEADER * volheader,
PGBUF_LATCH_MODE mode,
DISK_STAB_CURSOR * start,
DISK_STAB_CURSOR * end,
DISK_STAB_UNIT_FUNC f_unit,
void * f_unit_args
)
function disk_stab_iterate_units_all
static int disk_stab_iterate_units_all (
THREAD_ENTRY * thread_p,
const DISK_VOLUME_HEADER * volheader,
PGBUF_LATCH_MODE mode,
DISK_STAB_UNIT_FUNC f_unit,
void * f_unit_args
)
function disk_stab_set_bits_contiguous
static int disk_stab_set_bits_contiguous (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_unit_check_reserved
static int disk_stab_unit_check_reserved (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_unit_reserve
static int disk_stab_unit_reserve (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_stab_unit_unreserve
static int disk_stab_unit_unreserve (
THREAD_ENTRY * thread_p,
DISK_STAB_CURSOR * cursor,
bool * stop,
void * args
)
function disk_type_to_string
static const char * disk_type_to_string (
DB_VOLTYPE voltype
)
function disk_unreserve_ordered_sectors_without_csect
static int disk_unreserve_ordered_sectors_without_csect (
THREAD_ENTRY * thread_p,
DB_VOLPURPOSE purpose,
int nsects,
VSID * vsids
)
function disk_unreserve_sectors_from_volume
static int disk_unreserve_sectors_from_volume (
THREAD_ENTRY * thread_p,
VOLID volid,
DISK_RESERVE_CONTEXT * context
)
static void disk_verify_volume_header (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr
)
function disk_vhdr_dump
static void disk_vhdr_dump (
FILE * fp,
const DISK_VOLUME_HEADER * vhdr
)
function disk_vhdr_get_next_vol_fullname
static char * disk_vhdr_get_next_vol_fullname (
const DISK_VOLUME_HEADER * vhdr
)
function disk_vhdr_get_vol_fullname
static char * disk_vhdr_get_vol_fullname (
const DISK_VOLUME_HEADER * vhdr
)
static int disk_vhdr_get_vol_header_size (
const DISK_VOLUME_HEADER * vhdr
)
static char * disk_vhdr_get_vol_remarks (
const DISK_VOLUME_HEADER * vhdr
)
function disk_vhdr_set_next_vol_fullname
static int disk_vhdr_set_next_vol_fullname (
DISK_VOLUME_HEADER * vhdr,
const char * next_vol_fullname
)
function disk_vhdr_set_vol_fullname
static int disk_vhdr_set_vol_fullname (
DISK_VOLUME_HEADER * vhdr,
const char * vol_fullname
)
static int disk_vhdr_set_vol_remarks (
DISK_VOLUME_HEADER * vhdr,
const char * vol_remarks
)
function disk_volume_boot
static int disk_volume_boot (
THREAD_ENTRY * thread_p,
VOLID volid,
DB_VOLPURPOSE * purpose_out,
DB_VOLTYPE * voltype_out,
DISK_VOLUME_SPACE_INFO * space_out
)
function disk_volume_expand
static int disk_volume_expand (
THREAD_ENTRY * thread_p,
VOLID volid,
DB_VOLTYPE voltype,
DKNSECTS nsect_extend,
DKNSECTS * nsect_extended_out
)
static void disk_volume_header_set_stab (
DB_VOLPURPOSE vol_purpose,
DISK_VOLUME_HEADER * volheader
)
function disk_volume_is_empty
static bool disk_volume_is_empty (
THREAD_ENTRY * thread_p,
VOLID volid
)
Macro Definition Documentation
define DISK_ALLOCTBL_SECTOR_BIT_OFFSET
#define DISK_ALLOCTBL_SECTOR_BIT_OFFSET (
sect
) `((( sect ) % DISK_STAB_PAGE_BIT_COUNT ) % DISK_STAB_UNIT_BIT_COUNT )`
define DISK_ALLOCTBL_SECTOR_PAGE_OFFSET
#define DISK_ALLOCTBL_SECTOR_PAGE_OFFSET (
sect
) `(( sect ) / DISK_STAB_PAGE_BIT_COUNT )`
define DISK_ALLOCTBL_SECTOR_UNIT_OFFSET
#define DISK_ALLOCTBL_SECTOR_UNIT_OFFSET (
sect
) `((( sect ) % DISK_STAB_PAGE_BIT_COUNT ) / DISK_STAB_UNIT_BIT_COUNT )`
define DISK_EXTEND_COLLECT
#define DISK_EXTEND_COLLECT (
nsects
) `/* multi line expression */`
define DISK_EXTEND_REGISTER
#define DISK_EXTEND_REGISTER (
) `/* multi line expression */`
define DISK_MIN_VOLUME_SECTS
#define DISK_MIN_VOLUME_SECTS `DISK_STAB_UNIT_BIT_COUNT`
define DISK_PRERESERVE_BUF_DEFAULT
#define DISK_PRERESERVE_BUF_DEFAULT `16`
define DISK_RESERVE_CONTEXT_AS_ARGS
#define DISK_RESERVE_CONTEXT_AS_ARGS (
context
) `(context)->nsect_total, (context)->n_cache_vol_reserve, (context)->n_cache_reserve_remaining, \ disk_purpose_to_string ((context)->purpose)`
define DISK_RESERVE_CONTEXT_MSG
#define DISK_RESERVE_CONTEXT_MSG `/* multi line expression */`
define DISK_SAFE_OSDISK_FREE_SECTS
#define DISK_SAFE_OSDISK_FREE_SECTS `( DISK_SAFE_OSDISK_FREE_SPACE / IO_SECTORSIZE )`
define DISK_SAFE_OSDISK_FREE_SPACE
#define DISK_SAFE_OSDISK_FREE_SPACE `(64 * 1024 * 1024)`
define DISK_SECTS_ASSERT_ROUNDED
#define DISK_SECTS_ASSERT_ROUNDED (
nsects
) `assert (nsects == DISK_SECTS_ROUND_DOWN (nsects))`
define DISK_SECTS_ROUND_DOWN
#define DISK_SECTS_ROUND_DOWN (
nsects
) `((nsects / DISK_STAB_UNIT_BIT_COUNT ) * DISK_STAB_UNIT_BIT_COUNT )`
define DISK_SECTS_ROUND_UP
#define DISK_SECTS_ROUND_UP (
nsects
) `( CEIL_PTVDIV (nsects, DISK_STAB_UNIT_BIT_COUNT ) * DISK_STAB_UNIT_BIT_COUNT )`
define DISK_STAB_CURSOR_INITIALIZER
#define DISK_STAB_CURSOR_INITIALIZER `{ NULL , 0, 0, 0, 0, NULL , NULL }`
define DISK_STAB_NPAGES
#define DISK_STAB_NPAGES (
nsect_max
) `( CEIL_PTVDIV (nsect_max, DISK_STAB_PAGE_BIT_COUNT ))`
define DISK_STAB_PAGE_BIT_COUNT
#define DISK_STAB_PAGE_BIT_COUNT `(( int ) ( DISK_STAB_UNIT_BIT_COUNT * DISK_STAB_PAGE_UNITS_COUNT ))`
define DISK_STAB_PAGE_UNITS_COUNT
#define DISK_STAB_PAGE_UNITS_COUNT `(( int ) ( DB_PAGESIZE / DISK_STAB_UNIT_SIZE_OF ))`
define DISK_STAB_UNIT_BIT_COUNT
#define DISK_STAB_UNIT_BIT_COUNT `(( int ) ( DISK_STAB_UNIT_SIZE_OF * CHAR_BIT ))`
define DISK_STAB_UNIT_SIZE_OF
#define DISK_STAB_UNIT_SIZE_OF `sizeof ( DISK_STAB_UNIT )`
define DISK_SYS_NPAGE_SIZE
#define DISK_SYS_NPAGE_SIZE (
nsect_max
) `(1 + DISK_STAB_NPAGES (nsect_max))`
define DISK_SYS_NSECT_SIZE
#define DISK_SYS_NSECT_SIZE (
nsect_max
) `( CEIL_PTVDIV ( DISK_SYS_NPAGE_SIZE (nsect_max), DISK_SECTOR_NPAGES ))`
#define DISK_VOLHEADER_AS_ARGS (
arg_volh
) `/* multi line expression */`
#define DISK_VOLHEADER_MSG `/* multi line expression */`
#define disk_get_volheader (
...
) `disk_get_volheader_internal ( __VA_ARGS__ , ARG_FILE_LINE )`
define disk_log
#define disk_log (
func,
msg,
...
) `if ( disk_Logging ) \ _er_log_debug ( ARG_FILE_LINE , "DISK " func " " LOG_THREAD_TRAN_MSG ": \n\t" msg "\n", \ LOG_THREAD_TRAN_ARGS ( thread_get_thread_entry_info ()), __VA_ARGS__ )`
define fault_inject_random_crash
#define fault_inject_random_crash (
) `if ( vol_purpose == DB_PERMANENT_DATA_PURPOSE ) FI_TEST (thread_p, FI_TEST_DISK_MANAGER_VOLUME_ADD , 0)`
The documentation for this class was generated from the following file cubrid/src/storage/disk_manager.c