CUBRID Engine
latest
|
#include "config.h"
#include "dbtype_def.h"
#include "log_lsa.hpp"
#include "lz4.h"
#include "memory_hash.h"
#include "porting.h"
#include "porting_inline.hpp"
#include "release_string.h"
#include "storage_common.h"
#include "thread_compat.hpp"
#include <stdio.h>
#include <time.h>
Go to the source code of this file.
Classes | |
struct | fileio_page_reserved |
struct | fileio_page_watermark |
struct | fileio_page |
struct | fileio_backup_page |
struct | page_bitmap |
struct | page_bitmap_list |
struct | fileio_backup_record_info |
struct | fileio_backup_header |
struct | fileio_backup_buffer |
struct | fileio_backup_db_buffer |
struct | file_zip_page |
struct | file_zip_info |
struct | fileio_node |
struct | fileio_queue |
struct | fileio_thread_info |
struct | io_backup_session |
struct | token_bucket |
struct | flush_stats |
Typedefs | |
typedef struct fileio_page_reserved | FILEIO_PAGE_RESERVED |
typedef struct fileio_page_watermark | FILEIO_PAGE_WATERMARK |
typedef struct fileio_page | FILEIO_PAGE |
typedef struct fileio_backup_page | FILEIO_BACKUP_PAGE |
typedef struct page_bitmap | FILEIO_RESTORE_PAGE_BITMAP |
typedef struct page_bitmap_list | FILEIO_RESTORE_PAGE_BITMAP_LIST |
typedef struct fileio_backup_record_info | FILEIO_BACKUP_RECORD_INFO |
typedef struct fileio_backup_header | FILEIO_BACKUP_HEADER |
typedef struct fileio_backup_buffer | FILEIO_BACKUP_BUFFER |
typedef struct fileio_backup_db_buffer | FILEIO_BACKUP_DB_BUFFER |
typedef struct file_zip_page | FILEIO_ZIP_PAGE |
typedef struct file_zip_info | FILEIO_ZIP_INFO |
typedef struct fileio_node | FILEIO_NODE |
typedef struct fileio_queue | FILEIO_QUEUE |
typedef struct fileio_thread_info | FILEIO_THREAD_INFO |
typedef struct io_backup_session | FILEIO_BACKUP_SESSION |
typedef struct token_bucket | TOKEN_BUCKET |
typedef struct flush_stats | FLUSH_STATS |
Functions | |
STATIC_INLINE FILEIO_PAGE_WATERMARK * | fileio_get_page_watermark_pos (FILEIO_PAGE *io_page, PGLENGTH page_size) |
STATIC_INLINE void | fileio_init_lsa_of_page (FILEIO_PAGE *io_page, PGLENGTH page_size) |
STATIC_INLINE void | fileio_reset_page_lsa (FILEIO_PAGE *io_page, PGLENGTH page_size) |
STATIC_INLINE void | fileio_set_page_lsa (FILEIO_PAGE *io_page, const LOG_LSA *lsa, PGLENGTH page_size) |
STATIC_INLINE int | fileio_is_page_sane (FILEIO_PAGE *io_page, PGLENGTH page_size) |
int | fileio_open (const char *vlabel, int flags, int mode) |
void | fileio_close (int vdes) |
int | fileio_format (THREAD_ENTRY *thread_p, const char *db_fullname, const char *vlabel, VOLID volid, DKNPAGES npages, bool sweep_clean, bool dolock, bool dosync, size_t page_size, int kbytes_to_be_written_per_sec, bool reuse_file) |
int | fileio_expand_to (THREAD_ENTRY *threda_p, VOLID volid, DKNPAGES npages_toadd, DB_VOLTYPE voltype) |
void * | fileio_initialize_pages (THREAD_ENTRY *thread_p, int vdes, FILEIO_PAGE *io_pgptr, DKNPAGES start_pageid, DKNPAGES npages, size_t page_size, int kbytes_to_be_written_per_sec) |
void | fileio_initialize_res (THREAD_ENTRY *thread_p, FILEIO_PAGE *io_page, PGLENGTH page_size) |
void | fileio_unformat (THREAD_ENTRY *thread_p, const char *vlabel) |
void | fileio_unformat_and_rename (THREAD_ENTRY *thread_p, const char *vlabel, const char *new_vlabel) |
int | fileio_copy_volume (THREAD_ENTRY *thread_p, int from_vdes, DKNPAGES npages, const char *to_vlabel, VOLID to_volid, bool reset_recvinfo) |
int | fileio_reset_volume (THREAD_ENTRY *thread_p, int vdes, const char *vlabel, DKNPAGES npages, const LOG_LSA *reset_lsa) |
int | fileio_mount (THREAD_ENTRY *thread_p, const char *db_fullname, const char *vlabel, VOLID volid, int lockwait, bool dosync) |
void | fileio_dismount (THREAD_ENTRY *thread_p, int vdes) |
void | fileio_dismount_without_fsync (THREAD_ENTRY *thread_p, int vdes) |
void | fileio_dismount_all (THREAD_ENTRY *thread_p) |
void * | fileio_read (THREAD_ENTRY *thread_p, int vol_fd, void *io_page_p, PAGEID page_id, size_t page_size) |
void * | fileio_write_or_add_to_dwb (THREAD_ENTRY *thread_p, int vol_fd, FILEIO_PAGE *io_page_p, PAGEID page_id, size_t page_size) |
void * | fileio_write (THREAD_ENTRY *thread_p, int vol_fd, void *io_page_p, PAGEID page_id, size_t page_size, FILEIO_WRITE_MODE write_mode) |
void * | fileio_read_pages (THREAD_ENTRY *thread_p, int vol_fd, char *io_pages_p, PAGEID page_id, int num_pages, size_t page_size) |
void * | fileio_write_pages (THREAD_ENTRY *thread_p, int vol_fd, char *io_pages_p, PAGEID page_id, int num_pages, size_t page_size, FILEIO_WRITE_MODE write_mode) |
void * | fileio_writev (THREAD_ENTRY *thread_p, int vdes, void **arrayof_io_pgptr, PAGEID start_pageid, DKNPAGES npages, size_t page_size) |
int | fileio_synchronize (THREAD_ENTRY *thread_p, int vdes, const char *vlabel, FILEIO_SYNC_OPTION check_sync_dwb) |
int | fileio_synchronize_all (THREAD_ENTRY *thread_p, bool include_log) |
bool | fileio_is_volume_exist_and_file (const char *vlabel) |
DKNPAGES | fileio_get_number_of_volume_pages (int vdes, size_t page_size) |
char * | fileio_get_volume_label (VOLID volid, bool is_peek) |
char * | fileio_get_volume_label_by_fd (int vol_fd, bool is_peek) |
VOLID | fileio_find_volume_id_with_label (THREAD_ENTRY *thread_p, const char *vlabel) |
bool | fileio_is_temp_volume (THREAD_ENTRY *thread_p, VOLID volid) |
bool | fileio_is_permanent_volume_descriptor (THREAD_ENTRY *thread_p, int vol_fd) |
VOLID | fileio_find_next_perm_volume (THREAD_ENTRY *thread_p, VOLID volid) |
VOLID | fileio_find_previous_perm_volume (THREAD_ENTRY *thread_p, VOLID volid) |
VOLID | fileio_find_previous_temp_volume (THREAD_ENTRY *thread_p, VOLID volid) |
int | fileio_get_volume_descriptor (VOLID volid) |
bool | fileio_map_mounted (THREAD_ENTRY *thread_p, bool(*fun)(THREAD_ENTRY *thread_p, VOLID volid, void *args), void *args) |
int | fileio_get_number_of_partition_free_pages (const char *path, size_t page_size) |
DKNSECTS | fileio_get_number_of_partition_free_sectors (const char *path_p) |
const char * | fileio_rename (VOLID volid, const char *old_vlabel, const char *new_vlabel) |
bool | fileio_is_volume_exist (const char *vlabel) |
int | fileio_find_volume_descriptor_with_label (const char *vol_label_p) |
int | fileio_get_max_name (const char *path, long int *filename_max, long int *pathname_max) |
const char * | fileio_get_base_file_name (const char *fullname) |
char * | fileio_get_directory_path (char *path, const char *fullname) |
int | fileio_get_volume_max_suffix (void) |
void | fileio_make_volume_info_name (char *volinfo_name, const char *db_fullname) |
void | fileio_make_volume_ext_name (char *volext_fullname, const char *ext_path, const char *ext_name, VOLID volid) |
void | fileio_make_volume_ext_given_name (char *volext_fullname, const char *ext_path, const char *ext_name) |
void | fileio_make_volume_temp_name (char *voltmp_fullname, const char *tmp_path, const char *tmp_name, VOLID volid) |
void | fileio_make_log_active_name (char *logactive_name, const char *log_path, const char *dbname) |
void | fileio_make_temp_log_files_from_backup (char *temp_log_name, VOLID volid, FILEIO_BACKUP_LEVEL level, const char *base_log_name) |
void | fileio_make_log_archive_name (char *logarchive_name, const char *log_path, const char *dbname, int arvnum) |
void | fileio_make_removed_log_archive_name (char *logarchive_name, const char *log_path, const char *dbname) |
void | fileio_make_log_archive_temp_name (char *log_archive_temp_name_p, const char *log_path_p, const char *db_name_p) |
void | fileio_make_log_info_name (char *loginfo_name, const char *log_path, const char *dbname) |
void | fileio_make_backup_volume_info_name (char *backup_volinfo_name, const char *backinfo_path, const char *dbname) |
void | fileio_make_backup_name (char *backup_name, const char *nopath_volname, const char *backup_path, FILEIO_BACKUP_LEVEL level, int unit_num) |
void | fileio_make_dwb_name (char *dwb_name_p, const char *dwb_path_p, const char *db_name_p) |
void | fileio_make_keys_name (char *keys_name_p, const char *db_name_p) |
void | fileio_make_keys_name_given_path (char *keys_name_p, const char *keys_path_p, const char *db_name_p) |
void | fileio_remove_all_backup (THREAD_ENTRY *thread_p, int level) |
FILEIO_BACKUP_SESSION * | fileio_initialize_backup (const char *db_fullname, const char *backup_destination, FILEIO_BACKUP_SESSION *session, FILEIO_BACKUP_LEVEL level, const char *verbose_file_path, int num_threads, int sleep_msecs) |
FILEIO_BACKUP_SESSION * | fileio_start_backup (THREAD_ENTRY *thread_p, const char *db_fullname, INT64 *db_creation, FILEIO_BACKUP_LEVEL backup_level, LOG_LSA *backup_start_lsa, LOG_LSA *backup_ckpt_lsa, FILEIO_BACKUP_RECORD_INFO *all_levels_info, FILEIO_BACKUP_SESSION *session, FILEIO_ZIP_METHOD zip_method, FILEIO_ZIP_LEVEL zip_level) |
FILEIO_BACKUP_SESSION * | fileio_finish_backup (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session) |
void | fileio_abort_backup (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session, bool does_unformat_bk) |
int | fileio_backup_volume (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session, const char *from_vlabel, VOLID from_volid, PAGEID last_page, bool only_updated_pages) |
FILEIO_BACKUP_SESSION * | fileio_start_restore (THREAD_ENTRY *thread_p, const char *db_fullname, char *backup_source, INT64 match_dbcreation, PGLENGTH *db_iopagesize, float *db_compatibility, FILEIO_BACKUP_SESSION *session, FILEIO_BACKUP_LEVEL level, bool authenticate, INT64 match_bkupcreation, const char *restore_verbose_file_path, bool newvolpath) |
int | fileio_finish_restore (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session) |
void | fileio_abort_restore (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session) |
int | fileio_list_restore (THREAD_ENTRY *thread_p, const char *db_fullname, char *backup_source, FILEIO_BACKUP_LEVEL level, bool newvolpath) |
int | fileio_get_backup_volume (THREAD_ENTRY *thread_p, const char *db_fullname, const char *logpath, const char *user_backuppath, int try_level, char *from_volbackup) |
int | fileio_get_next_restore_file (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session, char *filename, VOLID *volid) |
int | fileio_restore_volume (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session, char *to_vlabel, char *verbose_to_vlabel, char *prev_vlabel, FILEIO_RESTORE_PAGE_BITMAP *page_bitmap, bool remember_pages) |
int | fileio_skip_restore_volume (THREAD_ENTRY *thread_p, FILEIO_BACKUP_SESSION *session) |
const char * | fileio_get_zip_method_string (FILEIO_ZIP_METHOD zip_method) |
const char * | fileio_get_zip_level_string (FILEIO_ZIP_LEVEL zip_level) |
int | fileio_read_backup_info_entries (FILE *fp, int which_bkvinf) |
int | fileio_write_backup_info_entries (FILE *fp, int which_bkvinf) |
const char * | fileio_get_backup_info_volume_name (FILEIO_BACKUP_LEVEL level, int unit_num, int which_bkvinf) |
int | fileio_add_volume_to_backup_info (const char *name, FILEIO_BACKUP_LEVEL level, int unit_num, int which_bkvinf) |
int | fileio_clear_backup_info_level (int level, bool dealloc, int which_bkvinf) |
void | fileio_finalize_backup_info (int which_bkvinf) |
int | fileio_request_user_response (THREAD_ENTRY *thread_p, FILEIO_REMOTE_PROMPT_TYPE prompt_id, const char *prompt, char *response, const char *failure_prompt, int range_low, int range_high, const char *secondary_prompt, int reprompt_value) |
FILEIO_LOCKF_TYPE | fileio_lock_la_log_path (const char *db_fullname, const char *lock_path, int vdes, int *last_deleted_arv_num) |
FILEIO_LOCKF_TYPE | fileio_lock_la_dbname (int *lockf_vdes, char *db_name, char *log_path) |
FILEIO_LOCKF_TYPE | fileio_unlock_la_dbname (int *lockf_vdes, char *db_name, bool clear_owner) |
int | fileio_symlink (const char *src, const char *dest, int overwrite) |
int | fileio_set_permission (const char *vlabel) |
int | fileio_flush_control_initialize (void) |
void | fileio_flush_control_finalize (void) |
int | fileio_flush_control_add_tokens (THREAD_ENTRY *thread_p, INT64 diff_usec, int *token_gen, int *token_consumed) |
void | fileio_page_bitmap_list_init (FILEIO_RESTORE_PAGE_BITMAP_LIST *page_bitmap_list) |
FILEIO_RESTORE_PAGE_BITMAP * | fileio_page_bitmap_create (int vol_id, int total_pages) |
FILEIO_RESTORE_PAGE_BITMAP * | fileio_page_bitmap_list_find (FILEIO_RESTORE_PAGE_BITMAP_LIST *page_bitmap_list, int vol_id) |
void | fileio_page_bitmap_list_add (FILEIO_RESTORE_PAGE_BITMAP_LIST *page_bitmap_list, FILEIO_RESTORE_PAGE_BITMAP *page_bitmap) |
void | fileio_page_bitmap_list_destroy (FILEIO_RESTORE_PAGE_BITMAP_LIST *page_bitmap_list) |
int | fileio_set_page_checksum (THREAD_ENTRY *thread_p, FILEIO_PAGE *io_page) |
int | fileio_page_check_corruption (THREAD_ENTRY *thread_p, FILEIO_PAGE *io_page, bool *is_page_corrupted) |
void | fileio_page_hexa_dump (const char *data, int length) |
bool | fileio_is_formatted_page (THREAD_ENTRY *thread_p, const char *io_page) |
#define FILEIO_BACKUP_NUM_THREADS_AUTO 0 |
Definition at line 59 of file file_io.h.
Referenced by backupdb(), and fileio_initialize_backup_thread().
#define FILEIO_BACKUP_SLEEP_MSECS_AUTO 0 |
Definition at line 60 of file file_io.h.
Referenced by backupdb().
#define FILEIO_FIRST_BACKUP_VOL_INFO 0 |
Definition at line 57 of file file_io.h.
Referenced by fileio_abort_backup(), fileio_get_backup_volume(), fileio_get_next_backup_volume(), fileio_read_restore(), fileio_remove_all_backup(), fileio_start_backup(), fileio_write_backup_end_time_to_header(), logpb_backup(), logpb_delete(), logpb_rename_all_volumes_files(), logpb_restore(), and logpb_update_backup_volume_info().
#define FILEIO_INITIAL_BACKUP_UNITS 0 |
Definition at line 46 of file file_io.h.
Referenced by fileio_continue_restore(), fileio_get_backup_volume(), fileio_initialize_backup(), fileio_initialize_restore(), fileio_list_restore(), fileio_read_backup_info_entries(), fileio_remove_all_backup(), fileio_start_backup(), fileio_write_backup_end_time_to_header(), logpb_backup(), and logpb_restore().
#define FILEIO_MAX_SUFFIX_LENGTH 7 |
Definition at line 94 of file file_io.h.
Referenced by fileio_get_volume_max_suffix().
#define FILEIO_MAX_USER_RESPONSE_SIZE 2000 |
Definition at line 50 of file file_io.h.
Referenced by fileio_find_restore_volume(), fileio_finish_backup(), fileio_get_next_backup_volume(), fileio_request_user_response(), logpb_remote_ask_user_before_delete_volumes(), and net_client_request_with_callback().
#define FILEIO_NO_BACKUP_UNITS -1 |
Definition at line 47 of file file_io.h.
Referenced by logpb_backup(), and logpb_restore().
#define FILEIO_PAGE_FLAG_ENCRYPTED_AES 0x1 |
Definition at line 63 of file file_io.h.
Referenced by pgbuf_get_tde_algorithm(), and pgbuf_set_tde_algorithm().
#define FILEIO_PAGE_FLAG_ENCRYPTED_ARIA 0x2 |
Definition at line 64 of file file_io.h.
Referenced by pgbuf_get_tde_algorithm(), and pgbuf_set_tde_algorithm().
#define FILEIO_PAGE_FLAG_ENCRYPTED_MASK 0x3 |
Definition at line 66 of file file_io.h.
Referenced by pgbuf_dealloc_page(), pgbuf_rv_dealloc_undo(), pgbuf_rv_dealloc_undo_compensate(), and pgbuf_set_tde_algorithm().
#define FILEIO_PATH_SEPARATOR | ( | path | ) | (path[strlen(path) - 1] == PATH_SEPARATOR ? "" : STR_PATH_SEPARATOR) |
Definition at line 78 of file file_io.h.
Referenced by fileio_make_backup_volume_info_name(), fileio_make_dwb_name(), fileio_make_keys_name_given_path(), fileio_make_log_active_name(), fileio_make_log_archive_name(), fileio_make_log_archive_temp_name(), fileio_make_log_info_name(), fileio_make_removed_log_archive_name(), fileio_make_volume_ext_given_name(), fileio_make_volume_ext_name(), and la_check_duplicated().
#define FILEIO_SECOND_BACKUP_VOL_INFO 1 |
Definition at line 58 of file file_io.h.
Referenced by fileio_read_restore(), and logpb_restore().
#define FILEIO_SUFFIX_BACKUP "_bk" |
Definition at line 86 of file file_io.h.
Referenced by fileio_make_backup_name().
#define FILEIO_SUFFIX_BACKUP_VOLINFO "_bkvinf" |
Definition at line 87 of file file_io.h.
Referenced by fileio_make_backup_volume_info_name().
#define FILEIO_SUFFIX_DWB "_dwb" |
Definition at line 92 of file file_io.h.
Referenced by fileio_make_dwb_name().
#define FILEIO_SUFFIX_KEYS "_keys" |
Definition at line 93 of file file_io.h.
Referenced by fileio_make_keys_name(), and fileio_make_keys_name_given_path().
#define FILEIO_SUFFIX_LOGACTIVE "_lgat" |
Definition at line 82 of file file_io.h.
Referenced by fileio_make_log_active_name().
#define FILEIO_SUFFIX_LOGARCHIVE "_lgar" |
Definition at line 83 of file file_io.h.
Referenced by fileio_make_log_archive_name(), fileio_make_removed_log_archive_name(), and xvacuum_dump().
#define FILEIO_SUFFIX_LOGINFO "_lginf" |
Definition at line 85 of file file_io.h.
Referenced by fileio_make_log_info_name().
#define FILEIO_SUFFIX_TMP_LOGARCHIVE "_lgar_t" |
Definition at line 84 of file file_io.h.
Referenced by fileio_make_log_archive_temp_name().
#define FILEIO_VOLEXT_PREFIX "_x" |
Definition at line 88 of file file_io.h.
Referenced by fileio_make_volume_ext_name().
#define FILEIO_VOLINFO_SUFFIX "_vinf" |
Definition at line 90 of file file_io.h.
Referenced by fileio_make_volume_info_name().
#define FILEIO_VOLLOCK_SUFFIX "__lock" |
Definition at line 91 of file file_io.h.
Referenced by fileio_make_volume_lock_name().
#define FILEIO_VOLTMP_PREFIX "_t" |
Definition at line 89 of file file_io.h.
Referenced by fileio_make_volume_temp_name().
#define NULL_VOLDES (-1) /* Value of a null (invalid) vol descriptor */ |
Definition at line 44 of file file_io.h.
Referenced by alterdbhost(), boot_mount(), boot_reset_mk_after_restart_from_backup(), boot_restart_server(), disk_can_overwrite_data_volume(), disk_format(), disk_is_page_sector_reserved_with_debug_crash(), disk_rv_redo_dboutside_newvol(), double_write_buffer::double_write_buffer(), dwb_add_volume_to_block_flush_area(), dwb_check_data_page_is_sane(), dwb_create_internal(), dwb_destroy_internal(), dwb_flush_block(), dwb_load_and_recover_pages(), dwb_write_block(), file_header_init(), fileio_abort_backup(), fileio_allocate_and_initialize_volume_info(), fileio_backup_volume(), fileio_cache(), fileio_check_file_exist(), fileio_continue_restore(), fileio_copy_volume(), fileio_create(), fileio_create_backup_volume(), fileio_decache(), fileio_dismount_all(), fileio_dismount_volume(), fileio_expand_to(), fileio_find_next_perm_volume(), fileio_find_previous_perm_volume(), fileio_find_previous_temp_volume(), fileio_find_system_volume(), fileio_find_volume_descriptor_with_label(), fileio_format(), fileio_get_next_backup_volume(), fileio_get_number_of_partition_free_pages(), fileio_get_number_of_partition_free_sectors(), fileio_get_primitive_way_max(), fileio_get_volume_descriptor(), fileio_initialize_backup(), fileio_is_permanent_volume_descriptor(), fileio_is_temp_volume(), fileio_is_volume_descriptor_equal(), fileio_is_volume_exist(), fileio_is_volume_exist_and_file(), fileio_lock_la_dbname(), fileio_map_mounted(), fileio_mount(), fileio_open(), fileio_read_restore(), fileio_rename(), fileio_restore_volume(), fileio_skip_restore_volume(), fileio_start_backup(), fileio_synchronize(), fileio_synchronize_sys_volume(), fileio_synchronize_volume(), fileio_traverse_system_volume(), fileio_unformat_and_rename(), fileio_unlock_la_dbname(), fileio_write_backup_end_time_to_header(), fileio_write_or_add_to_dwb(), la_check_duplicated(), la_find_archive_num(), la_find_last_deleted_arv_num(), la_find_log_pagesize(), la_get_range_of_archive(), la_init(), la_lock_dbname(), la_log_fetch_from_archive(), la_log_record_process(), la_shutdown(), la_unlock_dbname(), la_update_last_deleted_arv_num(), log_create_internal(), log_final(), log_get_num_pages_for_creation(), log_initialize_internal(), log_recovery_notpartof_archives(), log_recovery_notpartof_volumes(), log_recovery_resetlog(), logpb_archive_active_log(), logpb_background_archiving(), logpb_backup(), logpb_checkpoint(), logpb_copy_database(), logpb_copy_volume(), logpb_decache_archive_info(), logpb_delete(), logpb_dismount_log_archive(), logpb_fetch_from_archive(), logpb_fetch_header_from_active_log(), logpb_find_oldest_available_page_id(), logpb_flush_all_append_pages(), logpb_get_guess_archive_num(), logpb_peek_header_of_active_log_from_backup(), logpb_remove_all_in_log_path(), logpb_remove_archive_logs(), logpb_rename_all_volumes_files(), logpb_restore(), logpb_write_toflush_pages_to_archive(), tde(), tde_cipher_initialize(), tde_copy_keys_file(), tde_create_keys_file(), tde_initialize(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), xboot_soft_rename(), and xtde_change_mk_without_flock().
#define PEEK true /* Peek volume label pointer */ |
Definition at line 74 of file file_io.h.
Referenced by boot_check_permanent_volumes(), boot_remove_temp_volume(), btree_build_nleafs(), btree_change_root_header_delta(), btree_check_page_key(), btree_check_pages(), btree_compress_node(), btree_delete_meta_record(), btree_delete_overflow_key(), btree_dump_curr_key(), btree_dump_page(), btree_dump_page_with_subtree(), btree_find_AR_sampling_leaf(), btree_find_boundary_leaf(), btree_find_key_from_leaf(), btree_find_key_from_nleaf(), btree_find_lower_bound_leaf(), btree_find_min_or_max_key(), btree_find_next_index_record_holding_current(), btree_find_oid_from_ovfl(), btree_find_split_point(), btree_fix_ovfl_oid_page(), btree_get_next_node_info(), btree_get_node_header(), btree_get_overflow_header(), btree_get_perf_btree_page_type(), btree_get_root_header(), btree_get_stats_key(), btree_get_subtree_capacity(), btree_get_unique_statistics(), btree_get_value_from_leaf_slot(), btree_is_slot_visible(), btree_key_delete_remove_object(), btree_key_find_and_lock_unique_of_non_unique(), btree_key_find_and_lock_unique_of_unique(), btree_key_find_unique_version_oid(), btree_key_process_objects(), btree_key_record_check_no_visible(), btree_leaf_is_key_between_min_max(), btree_merge_node(), btree_merge_node_and_advance(), btree_merge_root(), btree_node_common_prefix(), btree_node_header_redo_log(), btree_node_header_undo_log(), btree_node_is_compressed(), btree_node_size_uncompressed(), btree_range_scan_advance_over_filtered_keys(), btree_range_scan_find_fk_any_object(), btree_range_scan_select_visible_oids(), btree_read_record(), btree_repair_prev_link_by_btid(), btree_rv_nodehdr_undoredo_update(), btree_rv_util_save_page_records(), btree_search_leaf_page(), btree_search_nonleaf_page(), btree_set_split_point(), btree_sort_get_next(), btree_split_node(), btree_split_root(), btree_split_test(), btree_verify_leaf_node(), btree_verify_nonleaf_node(), btree_verify_subtree(), catalog_check_class_consistency(), catalog_check_consistency(), catalog_drop_representation_helper(), catalog_dump(), catalog_file_map_find_optimal_page(), catalog_file_map_overflow_count(), catalog_file_map_page_dump(), catalog_get_dir_oid_from_cache(), catalog_get_last_representation_id(), catalog_get_record_from_page(), catalog_get_rep_dir(), catalog_get_representation(), catalog_get_representation_directory(), catalog_get_representation_item(), catcls_compile_catalog_classes(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), disk_check_volume(), ehash_binary_search_bucket(), ehash_check_merge_possible(), ehash_delete(), ehash_distribute_records_into_two_bucket(), ehash_dump_bucket(), ehash_find_first_bit_position(), ehash_insert_to_bucket(), ehash_locate_slot(), ehash_map(), ehash_merge_permanent(), ehash_rv_delete(), ehash_rv_delete_redo(), ehash_search(), ehash_split_bucket(), eval_data_filter(), eval_item_card_sort_list(), eval_some_list_eval(), eval_sub_sort_list_to_multi_set(), eval_sub_sort_list_to_sort_list(), fileio_close(), fileio_dismount(), fileio_dismount_without_fsync(), fileio_expand_to(), fileio_read(), fileio_read_pages(), fileio_synchronize_all(), fileio_write(), fileio_write_backup_header(), fileio_write_pages(), heap_check_all_pages(), heap_chkreloc_next(), heap_class_get_partition_info(), heap_classrepr_dump_all(), heap_classrepr_get_from_record(), heap_copy_chain(), heap_create_internal(), heap_delete_all_page_records(), heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_dump(), heap_estimate(), heap_get_bigone_content(), heap_get_capacity(), heap_get_chain_ptr(), heap_get_class_info_from_record(), heap_get_class_name_alloc_if_diff(), heap_get_class_oid_from_page(), heap_get_class_subclasses(), heap_get_class_supers(), heap_get_class_tde_algorithm(), heap_get_header_stats_ptr(), heap_get_if_diff_chn(), heap_get_last_page(), heap_get_mvcc_header(), heap_get_num_objects(), heap_get_page_info(), heap_get_partition_attributes(), heap_get_record_data_when_all_ready(), heap_get_record_info(), heap_header_next_scan(), heap_is_object_not_null(), heap_last(), heap_next_internal(), heap_ovf_find_vfid(), heap_page_get_max_mvccid(), heap_page_get_vacuum_status(), heap_page_rv_chain_update(), heap_page_set_vacuum_status_none(), heap_page_update_chain_after_mvcc_op(), heap_prepare_get_context(), heap_reinitialize_page(), heap_reuse(), heap_rv_redo_reuse_page(), heap_rv_redo_reuse_page_reuse_oid(), heap_scanrange_to_following(), heap_scanrange_to_prior(), heap_set_autoincrement_value(), heap_stats_find_best_page(), heap_stats_update_internal(), heap_update_home(), heap_update_set_prev_version(), heap_vpid_next(), heap_vpid_prev(), heap_vpid_remove(), locator_all_reference_lockset(), locator_check_class_names(), locator_check_unique_btree_entries(), locator_guess_sub_classes(), locator_initialize(), locator_lock_and_get_object_with_evaluation(), locator_mvcc_reeval_scan_filters(), locator_repl_prepare_force(), locator_update_force(), lock_demote_class_lock(), log_execute_run_postpone(), log_recreate(), log_rollback_record(), log_rv_undo_record(), logpb_backup(), logpb_backup_for_volume(), logpb_checkpoint(), logpb_copy_volume(), logpb_fetch_from_archive(), logpb_next_where_path(), logpb_rename_all_volumes_files(), pgbuf_fix_debug(), pgbuf_flush_checkpoint(), pgbuf_get_volume_label(), pgbuf_is_valid_page(), pgbuf_is_valid_page_ptr(), pgbuf_set_lsa(), pgbuf_unfix_debug(), pgbuf_unlatch_bcb_upon_unfix(), pgbuf_unlatch_thrd_holder(), process_value(), pwrite_with_injected_fault(), qdata_convert_table_to_set(), qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_get_interpolation_function_result(), qdata_get_single_tuple_from_list_id(), qdata_load_agg_hentry_from_list(), qexec_analytic_put_next(), qexec_analytic_update_group_result(), qexec_analytic_value_advance(), qexec_check_for_cycle(), qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_execute_connect_by(), qexec_execute_delete(), qexec_execute_duplicate_key_update(), qexec_execute_obj_fetch(), qexec_execute_update(), qexec_gby_put_next(), qexec_groupby(), qexec_groupby_index(), qexec_hash_gby_put_next(), qexec_iterate_connect_by_results(), qexec_merge_list(), qexec_recalc_tuples_parent_pos_in_list(), qfile_advance_group(), qfile_advance_single(), qfile_copy_tuple(), qfile_make_sort_key(), qfile_reallocate_tuple(), redistribute_partition_data(), cubload::server_class_installer::register_class_with_attributes(), scan_build_hash_list_scan(), scan_dump_key_into_tuple(), scan_hash_probe_next(), scan_jump_scan_pos(), scan_next_class_attr_scan(), scan_next_hash_list_scan(), scan_next_heap_page_scan(), scan_next_heap_scan(), scan_next_index_key_info_scan(), scan_next_index_lookup_heap(), scan_next_index_node_info_scan(), scan_next_index_scan(), scan_next_list_scan(), scan_prev_scan_local(), serial_load_attribute_info_of_db_serial(), serial_update_cur_val_of_serial(), page_key_boundary::set_value(), sort_exphase_merge(), sort_exphase_merge_elim_dup(), sort_inphase_sort(), sort_spage_get_record(), spage_compact(), spage_get_record_data(), spage_verify_header(), stran_can_end_after_query_execution(), tde_add_mk(), tde_find_first_mk(), vacuum_rv_redo_vacuum_heap_page(), xboot_checkdb_table(), xcatalog_check_rep_dir(), xlocator_does_exist(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
typedef struct fileio_backup_buffer FILEIO_BACKUP_BUFFER |
typedef struct fileio_backup_db_buffer FILEIO_BACKUP_DB_BUFFER |
typedef struct fileio_backup_header FILEIO_BACKUP_HEADER |
typedef struct fileio_backup_page FILEIO_BACKUP_PAGE |
typedef struct fileio_backup_record_info FILEIO_BACKUP_RECORD_INFO |
typedef struct io_backup_session FILEIO_BACKUP_SESSION |
typedef struct fileio_node FILEIO_NODE |
typedef struct fileio_page FILEIO_PAGE |
typedef struct fileio_page_reserved FILEIO_PAGE_RESERVED |
typedef struct fileio_page_watermark FILEIO_PAGE_WATERMARK |
typedef struct fileio_queue FILEIO_QUEUE |
typedef struct page_bitmap FILEIO_RESTORE_PAGE_BITMAP |
typedef struct page_bitmap_list FILEIO_RESTORE_PAGE_BITMAP_LIST |
typedef struct fileio_thread_info FILEIO_THREAD_INFO |
typedef struct file_zip_info FILEIO_ZIP_INFO |
typedef struct file_zip_page FILEIO_ZIP_PAGE |
typedef struct flush_stats FLUSH_STATS |
typedef struct token_bucket TOKEN_BUCKET |
enum FILEIO_BACKUP_LEVEL |
enum FILEIO_BACKUP_TYPE |
enum FILEIO_LOCKF_TYPE |
enum FILEIO_SYNC_OPTION |
enum FILEIO_TYPE |
enum FILEIO_WRITE_MODE |
enum FILEIO_ZIP_LEVEL |
enum FILEIO_ZIP_METHOD |
void fileio_abort_backup | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session, | ||
bool | does_unformat_bk | ||
) |
Definition at line 7052 of file file_io.c.
References fileio_backup_buffer::alltotalio, fileio_backup_db_buffer::area, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, fileio_backup_buffer::buffer, fileio_backup_buffer::count, io_backup_session::dbfile, fileio_backup_buffer::dtype, FILEIO_BACKUP_READ, FILEIO_BACKUP_UNDEFINED_LEVEL, FILEIO_BACKUP_VOL_DIRECTORY, fileio_dismount(), fileio_dismount_without_fsync(), fileio_finalize_backup_info(), fileio_finalize_backup_thread(), FILEIO_FIRST_BACKUP_VOL_INFO, fileio_is_volume_exist_and_file(), fileio_remove_all_backup(), fileio_unformat(), FILEIO_ZIP_NONE_METHOD, free_and_init, fileio_backup_buffer::iosize, fileio_backup_header::level, fileio_backup_db_buffer::level, fileio_backup_db_buffer::lsa, LSA_SET_NULL(), fileio_backup_db_buffer::nbytes, NULL, NULL_VOLDES, NULL_VOLID, fileio_backup_buffer::ptr, io_backup_session::type, fileio_backup_buffer::vdes, fileio_backup_db_buffer::vdes, io_backup_session::verbose_fp, fileio_backup_buffer::vlabel, fileio_backup_db_buffer::vlabel, fileio_backup_db_buffer::volid, fileio_backup_buffer::voltotalio, and fileio_backup_header::zip_method.
Referenced by fileio_abort_restore(), fileio_start_backup(), and logpb_backup().
void fileio_abort_restore | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session | ||
) |
Definition at line 8980 of file file_io.c.
References fileio_abort_backup().
Referenced by fileio_finish_restore(), fileio_list_restore(), and logpb_restore().
int fileio_add_volume_to_backup_info | ( | const char * | name, |
FILEIO_BACKUP_LEVEL | level, | ||
int | unit_num, | ||
int | which_bkvinf | ||
) |
Definition at line 10954 of file file_io.c.
References ARG_FILE_LINE, fileio_bkvinf_entry::bkvol_name, ER_FAILED, er_log_debug, fileio_allocate_backup_info(), fileio_initialize_backup_info(), fileio_bkvinf_entry::link, NO_ERROR, NULL, and fileio_bkvinf_entry::unit_num.
Referenced by fileio_get_next_backup_volume(), fileio_read_backup_info_entries(), fileio_read_restore(), fileio_start_backup(), and logpb_restore().
int fileio_backup_volume | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session, | ||
const char * | from_vlabel, | ||
VOLID | from_volid, | ||
PAGEID | last_page, | ||
bool | only_updated_pages | ||
) |
Definition at line 8215 of file file_io.c.
References fileio_thread_info::act_r_threads, fileio_backup_db_buffer::area, fileio_node::area, ARG_FILE_LINE, fileio_backup_header::bkpagesize, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, CEIL_PTVDIV, fileio_thread_info::check_ratio, io_backup_session::dbfile, ER_ERROR_SEVERITY, ER_FAILED, ER_IO_MOUNT_FAIL, ER_IO_READ, er_set_with_oserror(), error(), fileio_allocate_node(), FILEIO_BACKUP_FILE_END_PAGE_ID, FILEIO_BACKUP_FILE_HEADER_PAGE_SIZE, FILEIO_BACKUP_FILE_START_PAGE_ID, FILEIO_BACKUP_PAGE_OVERHEAD, FILEIO_CHECK_FOR_INTERRUPT_INTERVAL, fileio_close(), fileio_compress_backup_node(), FILEIO_DBVOLS_IO_PAGE_SIZE, fileio_free_node(), fileio_get_base_file_name(), fileio_get_volume_descriptor(), fileio_open(), fileio_read_backup(), FILEIO_SET_BACKUP_PAGE_ID, FILEIO_SET_BACKUP_PAGE_ID_COPY, fileio_write_backup(), fileio_write_backup_node(), FILEIO_ZIP_NONE_METHOD, IO_PAGESIZE, fileio_thread_info::io_queue, fileio_backup_page::iopage, fileio_backup_page::iopageid, LOG_DBLOG_ACTIVE_VOLID, fileio_page_reserved::lsa, fileio_backup_db_buffer::lsa, LSA_ISNULL(), LSA_LT(), MSGCAT_CATALOG_CUBRID, MSGCAT_FILEIO_BKUP_FILE, msgcat_message(), MSGCAT_SET_IO, fileio_backup_file_header::nbytes, fileio_backup_db_buffer::nbytes, NO_ERROR, fileio_node::nread, NULL, NULL_VOLDES, NULL_VOLID, fileio_thread_info::num_threads, fileio_node::pageid, pgbuf_is_log_check_for_interrupts(), fileio_page::prv, io_backup_session::read_thread_info, rv, fileio_backup_db_buffer::vdes, io_backup_session::verbose_fp, fileio_backup_file_header::vlabel, fileio_backup_db_buffer::vlabel, fileio_backup_file_header::volid, fileio_backup_db_buffer::volid, fileio_backup_buffer::voltotalio, xdisk_get_total_numpages(), and fileio_backup_header::zip_method.
Referenced by logpb_backup(), logpb_backup_for_volume(), and logpb_fatal_error_internal().
int fileio_clear_backup_info_level | ( | int | level, |
bool | dealloc, | ||
int | which_bkvinf | ||
) |
Definition at line 11245 of file file_io.c.
References FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_UNDEFINED_LEVEL, free_and_init, i, fileio_bkvinf_entry::link, NO_ERROR, and NULL.
Referenced by fileio_finalize_backup_info(), fileio_remove_all_backup(), logpb_backup(), and logpb_restore().
void fileio_close | ( | int | vdes | ) |
Definition at line 2078 of file file_io.c.
References ARG_FILE_LINE, ER_IO_DISMOUNT_FAIL, er_set_with_oserror(), ER_WARNING_SEVERITY, fileio_get_volume_label_by_fd(), fileio_release_lock(), PEEK, prm_get_bool_value(), and PRM_ID_DBFILES_PROTECT.
Referenced by boot_reset_mk_after_restart_from_backup(), disk_can_overwrite_data_volume(), fileio_backup_volume(), fileio_check_file_exist(), fileio_continue_restore(), fileio_create(), fileio_dismount(), fileio_dismount_all(), fileio_dismount_volume(), fileio_dismount_without_fsync(), fileio_get_number_of_partition_free_pages(), fileio_get_number_of_partition_free_sectors(), fileio_get_primitive_way_max(), fileio_initialize_backup(), fileio_is_volume_exist(), fileio_lock_la_dbname(), fileio_mount(), fileio_unlock_la_dbname(), fileio_write_backup_end_time_to_header(), la_check_duplicated(), la_find_last_deleted_arv_num(), la_get_range_of_archive(), la_log_fetch_from_archive(), la_shutdown(), logpb_peek_header_of_active_log_from_backup(), tde_create_keys_file(), and xtde_change_mk_without_flock().
int fileio_copy_volume | ( | THREAD_ENTRY * | thread_p, |
int | from_vdes, | ||
DKNPAGES | npages, | ||
const char * | to_vlabel, | ||
VOLID | to_volid, | ||
bool | reset_recvinfo | ||
) |
Definition at line 2809 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), fileio_create(), fileio_dismount(), fileio_format(), fileio_read(), fileio_reset_page_lsa(), FILEIO_SYNC_ALSO_FLUSH_DWB, fileio_synchronize(), fileio_unformat(), fileio_write_or_add_to_dwb(), free_and_init, IO_PAGESIZE, NULL, and NULL_VOLDES.
Referenced by logpb_copy_volume().
void fileio_dismount | ( | THREAD_ENTRY * | thread_p, |
int | vdes | ||
) |
Definition at line 3134 of file file_io.c.
References fileio_close(), fileio_decache(), fileio_get_lockf_type(), fileio_get_volume_label_by_fd(), FILEIO_NOT_LOCKF, FILEIO_SYNC_ALSO_FLUSH_DWB, fileio_synchronize(), fileio_unlock(), PEEK, and fileio_backup_file_header::vlabel.
Referenced by alterdbhost(), boot_mount(), boot_reset_mk_after_restart_from_backup(), boot_restart_server(), dwb_create_internal(), dwb_destroy_internal(), dwb_load_and_recover_pages(), fileio_abort_backup(), fileio_copy_volume(), fileio_create(), fileio_format(), fileio_get_next_backup_volume(), fileio_mount(), fileio_restore_volume(), fileio_unformat_and_rename(), log_create_internal(), log_final(), log_initialize_internal(), log_recovery_notpartof_volumes(), logpb_archive_active_log(), logpb_background_archiving(), logpb_backup(), logpb_copy_database(), logpb_copy_volume(), logpb_delete(), logpb_dismount_log_archive(), logpb_fetch_from_archive(), logpb_find_oldest_available_page_id(), logpb_remove_all_in_log_path(), logpb_rename_all_volumes_files(), logpb_restore(), logpb_write_toflush_pages_to_archive(), tde_cipher_initialize(), tde_copy_keys_file(), tde_initialize(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
void fileio_dismount_all | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3374 of file file_io.c.
References fileio_sys_volinfo_header::anchor, fileio_close(), fileio_dismount_volume(), FILEIO_NOT_LOCKF, FILEIO_SYNC_ONLY, fileio_synchronize(), fileio_Sys_vol_info_header, fileio_traverse_permanent_volume(), fileio_traverse_temporary_volume(), fileio_unlock(), fileio_Vol_info_header, FILEIO_VOLINFO_INCREMENT, free_and_init, i, fileio_sys_volinfo::lockf_type, LOG_MAX_DBVOLID, fileio_volinfo_header::max_perm_vols, fileio_volinfo_header::max_temp_vols, fileio_sys_volinfo::next, fileio_volinfo_header::next_perm_volid, fileio_volinfo_header::next_temp_volid, NULL, NULL_VOLDES, pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock, rv, fileio_sys_volinfo::vdes, fileio_sys_volinfo::vlabel, VOLID_MAX, and fileio_volinfo_header::volinfo.
Referenced by boot_server_all_finalize().
void fileio_dismount_without_fsync | ( | THREAD_ENTRY * | thread_p, |
int | vdes | ||
) |
Definition at line 3170 of file file_io.c.
References fileio_close(), fileio_decache(), fileio_get_lockf_type(), fileio_get_volume_label_by_fd(), FILEIO_NOT_LOCKF, fileio_unlock(), and PEEK.
Referenced by fileio_abort_backup(), fileio_get_next_backup_volume(), and fileio_read_restore().
int fileio_expand_to | ( | THREAD_ENTRY * | threda_p, |
VOLID | volid, | ||
DKNPAGES | npages_toadd, | ||
DB_VOLTYPE | voltype | ||
) |
Definition at line 2512 of file file_io.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, assert_release, DB_PERMANENT_VOLTYPE, db_private_alloc, db_private_free, DB_TEMPORARY_VOLTYPE, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, ER_INTERRUPTED, ER_IO_EXPAND_OUT_OF_SPACE, ER_IO_FORMAT_BAD_NPAGES, ER_IO_TRUNCATE, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), FILEIO_GET_FILE_SIZE, fileio_get_number_of_partition_free_pages(), fileio_get_volume_descriptor(), fileio_get_volume_label(), fileio_get_volume_label_by_fd(), fileio_initialize_pages(), fileio_initialize_res(), fileio_write_or_add_to_dwb(), IO_PAGESIZE, LOG_ISRESTARTED, NO_ERROR, NULL, NULL_VOLDES, PEEK, pthread_mutex_lock, pthread_mutex_unlock, rv, and VOL_MAX_NPAGES.
Referenced by disk_rv_redo_volume_expand(), and disk_volume_expand().
void fileio_finalize_backup_info | ( | int | which_bkvinf | ) |
Definition at line 11143 of file file_io.c.
References FILEIO_BACKUP_FULL_LEVEL, and fileio_clear_backup_info_level().
Referenced by fileio_abort_backup(), fileio_read_backup_info_entries(), logpb_backup(), logpb_delete(), logpb_rename_all_volumes_files(), and logpb_restore().
VOLID fileio_find_next_perm_volume | ( | THREAD_ENTRY * | thread_p, |
VOLID | volid | ||
) |
Definition at line 6410 of file file_io.c.
References assert, FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_get_volume_descriptor(), fileio_is_volume_id_gt(), fileio_traverse_permanent_volume(), NULL_VOLDES, NULL_VOLID, fileio_apply_function_arg::vol_id, fileio_backup_file_header::volid, and fileio_volinfo::volid.
Referenced by log_recreate(), logpb_backup(), logpb_checkpoint(), logpb_copy_database(), logpb_delete(), and logpb_rename_all_volumes_files().
VOLID fileio_find_previous_perm_volume | ( | THREAD_ENTRY * | thread_p, |
VOLID | volid | ||
) |
Definition at line 6434 of file file_io.c.
References assert, FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_get_volume_descriptor(), fileio_is_volume_id_lt(), fileio_reverse_traverse_permanent_volume(), NULL_VOLDES, NULL_VOLID, fileio_apply_function_arg::vol_id, fileio_backup_file_header::volid, and fileio_volinfo::volid.
Referenced by disk_format(), fileio_decache(), fileio_restore_volume(), and logpb_rename_all_volumes_files().
VOLID fileio_find_previous_temp_volume | ( | THREAD_ENTRY * | thread_p, |
VOLID | volid | ||
) |
Definition at line 6458 of file file_io.c.
References assert, FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_get_volume_descriptor(), fileio_is_volume_id_gt(), fileio_reverse_traverse_temporary_volume(), NULL_VOLDES, NULL_VOLID, fileio_apply_function_arg::vol_id, fileio_backup_file_header::volid, and fileio_volinfo::volid.
Referenced by fileio_decache().
int fileio_find_volume_descriptor_with_label | ( | const char * | vol_label_p | ) |
Definition at line 6544 of file file_io.c.
References FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_find_system_volume(), fileio_is_system_volume_label_equal(), fileio_is_volume_label_equal(), fileio_traverse_permanent_volume(), fileio_traverse_temporary_volume(), NULL, NULL_VOLDES, pthread_mutex_lock, pthread_mutex_unlock, rv, fileio_sys_volinfo::vdes, fileio_volinfo::vdes, and fileio_apply_function_arg::vol_label.
Referenced by disk_can_overwrite_data_volume(), disk_rv_redo_dboutside_newvol(), fileio_create(), fileio_is_volume_exist(), fileio_is_volume_exist_and_file(), fileio_mount(), and fileio_unformat_and_rename().
VOLID fileio_find_volume_id_with_label | ( | THREAD_ENTRY * | thread_p, |
const char * | vlabel | ||
) |
Definition at line 6319 of file file_io.c.
References FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_find_system_volume(), fileio_is_system_volume_label_equal(), fileio_is_volume_label_equal(), fileio_traverse_permanent_volume(), fileio_traverse_temporary_volume(), NULL_VOLID, pthread_mutex_lock, pthread_mutex_unlock, rv, fileio_apply_function_arg::vol_label, fileio_sys_volinfo::volid, and fileio_volinfo::volid.
Referenced by db_warnspace(), and disk_unformat().
FILEIO_BACKUP_SESSION* fileio_finish_backup | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session | ||
) |
Definition at line 7336 of file file_io.c.
References fileio_backup_db_buffer::area, ARG_FILE_LINE, asprintf(), io_backup_session::bkup, fileio_backup_buffer::bkuphdr, CAST_BUFLEN, fileio_backup_buffer::count, CTIME_MAX, fileio_backup_header::db_fullname, io_backup_session::dbfile, fileio_backup_buffer::dtype, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), FILEIO_BACKUP_END_PAGE_ID, FILEIO_BACKUP_VOL_DEVICE, FILEIO_BACKUP_VOL_DIRECTORY, fileio_ctime(), fileio_flush_backup(), fileio_get_base_file_name(), FILEIO_MAX_USER_RESPONSE_SIZE, FILEIO_PROMPT_DISPLAY_ONLY, fileio_request_user_response(), FILEIO_SYNC_ONLY, fileio_synchronize(), fileio_write_backup(), fileio_write_backup_end_time_to_header(), fileio_write_backup_end_time_to_last_page(), fileio_backup_page::iopageid, fileio_backup_buffer::iosize, fileio_backup_header::level, MSGCAT_CATALOG_CUBRID, MSGCAT_FILEIO_BACKUP_LABEL_INFO, msgcat_message(), MSGCAT_SET_IO, fileio_backup_buffer::name, fileio_backup_file_header::nbytes, NO_ERROR, NULL, fileio_backup_buffer::ptr, fileio_backup_header::start_time, fileio_backup_header::unit_num, fileio_backup_buffer::vdes, and fileio_backup_buffer::voltotalio.
Referenced by logpb_backup().
int fileio_finish_restore | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session | ||
) |
Definition at line 9683 of file file_io.c.
References fileio_abort_restore(), fileio_synchronize_all(), and success().
Referenced by fileio_list_restore(), and logpb_restore().
int fileio_flush_control_add_tokens | ( | THREAD_ENTRY * | thread_p, |
INT64 | diff_usec, | ||
int * | token_gen, | ||
int * | token_consumed | ||
) |
Definition at line 819 of file file_io.c.
References assert, fc_Token_bucket, fileio_flush_control_get_desired_rate(), FILEIO_MIN_FLUSH_PAGES_PER_SEC, NO_ERROR, NULL, flush_stats::num_log_pages, flush_stats::num_pages, flush_stats::num_tokens, perfmon_add_stat(), prm_get_bool_value(), prm_get_integer_value(), PRM_ID_ADAPTIVE_FLUSH_CONTROL, PRM_ID_MAX_FLUSH_PAGES_PER_SECOND, PSTAT_FC_NUM_LOG_PAGES, PSTAT_FC_NUM_PAGES, PSTAT_FC_TOKENS, pthread_mutex_lock, pthread_mutex_unlock, rv, token_bucket::token_consumed, token_bucket::token_mutex, token_bucket::tokens, and token_bucket::waiter_cond.
Referenced by pgbuf_get_page_flush_interval().
void fileio_flush_control_finalize | ( | void | ) |
Definition at line 702 of file file_io.c.
References assert, fc_Token_bucket, NULL, pthread_mutex_destroy, token_bucket::token_mutex, and token_bucket::waiter_cond.
Referenced by pgbuf_get_page_flush_interval().
int fileio_flush_control_initialize | ( | void | ) |
Definition at line 658 of file file_io.c.
References ARG_FILE_LINE, assert, ER_CSS_PTHREAD_COND_INIT, ER_CSS_PTHREAD_MUTEX_INIT, ER_ERROR_SEVERITY, er_set_with_oserror(), fc_Token_bucket_s, NO_ERROR, NULL, flush_stats::num_log_pages, flush_stats::num_pages, flush_stats::num_tokens, pthread_mutex_init, rv, token_bucket::token_consumed, token_bucket::token_mutex, token_bucket::tokens, and token_bucket::waiter_cond.
Referenced by pgbuf_get_page_flush_interval().
int fileio_format | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
const char * | vlabel, | ||
VOLID | volid, | ||
DKNPAGES | npages, | ||
bool | sweep_clean, | ||
bool | dolock, | ||
bool | dosync, | ||
size_t | page_size, | ||
int | kbytes_to_be_written_per_sec, | ||
bool | reuse_file | ||
) |
Definition at line 2314 of file file_io.c.
References ARG_FILE_LINE, ER_BO_CANNOT_CREATE_VOL, er_errid(), ER_ERROR_SEVERITY, ER_INTERRUPTED, ER_IO_FORMAT_BAD_NPAGES, ER_IO_FORMAT_OUT_OF_SPACE, ER_IO_MOUNT_FAIL, ER_IO_WRITE, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), FI_TEST, FI_TEST_FILE_IO_FORMAT, fileio_create(), fileio_dismount(), FILEIO_GET_FILE_SIZE, fileio_get_number_of_partition_free_pages(), fileio_initialize_pages(), fileio_initialize_res(), fileio_is_volume_exist(), fileio_mount(), fileio_unformat(), fileio_write(), FILEIO_WRITE_DEFAULT_WRITE, fileio_write_or_add_to_dwb(), free_and_init, NULL, NULL_VOLDES, page_size, and VOL_MAX_NPAGES.
Referenced by disk_format(), disk_rv_redo_dboutside_newvol(), dwb_create_internal(), fileio_copy_volume(), fileio_restore_volume(), log_create_internal(), log_initialize_internal(), log_recovery_resetlog(), logpb_archive_active_log(), and logpb_copy_database().
const char* fileio_get_backup_info_volume_name | ( | FILEIO_BACKUP_LEVEL | level, |
int | unit_num, | ||
int | which_bkvinf | ||
) |
Definition at line 11118 of file file_io.c.
References fileio_bkvinf_entry::bkvol_name, fileio_bkvinf_entry::link, NULL, and fileio_bkvinf_entry::unit_num.
Referenced by fileio_get_backup_volume(), fileio_read_restore(), fileio_remove_all_backup(), fileio_write_backup_end_time_to_header(), and logpb_backup().
int fileio_get_backup_volume | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
const char * | logpath, | ||
const char * | user_backuppath, | ||
int | try_level, | ||
char * | from_volbackup | ||
) |
Definition at line 9846 of file file_io.c.
References ARG_FILE_LINE, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_LOG_CANNOT_ACCESS_BACKUP, er_set(), FILEIO_FIRST_BACKUP_VOL_INFO, fileio_get_backup_info_volume_name(), fileio_get_base_file_name(), FILEIO_INITIAL_BACKUP_UNITS, fileio_make_backup_name(), fileio_make_backup_volume_info_name(), fileio_read_backup_info_entries(), MSGCAT_CATALOG_CUBRID, MSGCAT_LOG_BACKUPINFO_NEEDED, MSGCAT_LOG_NEWLOCATION, MSGCAT_LOG_STARTS, msgcat_message(), MSGCAT_SET_LOG, NO_ERROR, and NULL.
Referenced by logpb_restore(), and print_backup_info().
Definition at line 5533 of file file_io.c.
References NULL, and PATH_SEPARATOR.
Referenced by alterdbhost(), boot_db_name(), boot_find_rest_temp_volumes(), boot_get_new_volume_name_and_id(), boot_make_temp_volume_fullname(), boot_restart_server(), disk_add_volume(), fileio_backup_volume(), fileio_continue_restore(), fileio_finish_backup(), fileio_get_backup_volume(), fileio_get_directory_path(), fileio_get_next_backup_volume(), fileio_get_next_restore_file(), fileio_initialize_backup(), fileio_restore_volume(), fileio_write_backup_node(), log_recovery_notpartof_volumes(), logpb_backup(), logpb_is_log_active_from_backup_useful(), logpb_restore(), logpb_start_where_path(), logpb_verify_length(), tde_make_keys_file_fullname(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), xboot_soft_rename(), and xvacuum_dump().
char* fileio_get_directory_path | ( | char * | path, |
const char * | fullname | ||
) |
Definition at line 5567 of file file_io.c.
References ARG_FILE_LINE, assert, ER_BO_CWD_FAIL, ER_ERROR_SEVERITY, er_set_with_oserror(), fileio_get_base_file_name(), and NULL.
Referenced by boot_find_rest_temp_volumes(), boot_get_new_volume_name_and_id(), boot_make_temp_volume_fullname(), disk_add_volume(), fileio_get_next_backup_volume(), fileio_get_next_restore_file(), fileio_initialize_backup(), fileio_read_restore(), log_recovery_notpartof_volumes(), logpb_backup(), logpb_is_log_active_from_backup_useful(), logpb_next_where_path(), logpb_restore(), and xboot_soft_rename().
int fileio_get_max_name | ( | const char * | path, |
long int * | filename_max, | ||
long int * | pathname_max | ||
) |
Definition at line 5459 of file file_io.c.
References fileio_get_primitive_way_max(), NULL, and strncpy_bufsize.
Referenced by logpb_verify_length().
int fileio_get_next_restore_file | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session, | ||
char * | filename, | ||
VOLID * | volid | ||
) |
Definition at line 9960 of file file_io.c.
References fileio_backup_db_buffer::area, ARG_FILE_LINE, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, io_backup_session::dbfile, fileio_backup_buffer::dtype, ER_ERROR_SEVERITY, ER_IO_RESTORE_READ_ERROR, er_set(), FILEIO_BACKUP_END_PAGE_ID, FILEIO_BACKUP_FILE_HEADER_PAGE_SIZE, FILEIO_BACKUP_FILE_START_PAGE_ID, FILEIO_BACKUP_VOL_DEVICE, FILEIO_GET_BACKUP_PAGE_ID, fileio_get_base_file_name(), fileio_get_directory_path(), fileio_read_backup_end_time_from_last_page(), fileio_read_restore(), fileio_backup_page::iopage, fileio_backup_header::level, fileio_backup_db_buffer::level, fileio_backup_buffer::loc_db_fullname, LOG_DBLOG_ACTIVE_VOLID, LOG_DBLOG_ARCHIVE_VOLID, LOG_DBLOG_BKUPINFO_VOLID, LOG_DBLOG_INFO_VOLID, fileio_backup_buffer::log_path, fileio_backup_file_header::nbytes, fileio_backup_db_buffer::nbytes, NO_ERROR, PATH_SEPARATOR, fileio_backup_header::unit_num, fileio_backup_file_header::vlabel, fileio_backup_file_header::volid, and fileio_backup_db_buffer::volid.
Referenced by logpb_restore().
int fileio_get_number_of_partition_free_pages | ( | const char * | path, |
size_t | page_size | ||
) |
Definition at line 4937 of file file_io.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, er_set_with_oserror(), fileio_close(), FILEIO_DISK_FORMAT_MODE, FILEIO_DISK_PROTECTION_MODE, fileio_get_number_of_partition_free_pages(), fileio_open(), IO_PAGESIZE, NULL_VOLDES, and page_size.
Referenced by fileio_create_backup_volume(), fileio_expand_to(), fileio_format(), and fileio_get_number_of_partition_free_pages().
Definition at line 5003 of file file_io.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, er_set_with_oserror(), fileio_close(), FILEIO_DISK_FORMAT_MODE, FILEIO_DISK_PROTECTION_MODE, fileio_get_number_of_partition_free_sectors(), fileio_open(), IO_SECTORSIZE, and NULL_VOLDES.
Referenced by disk_add_volume(), and fileio_get_number_of_partition_free_sectors().
DKNPAGES fileio_get_number_of_volume_pages | ( | int | vdes, |
size_t | page_size | ||
) |
Definition at line 4918 of file file_io.c.
References page_size.
Referenced by dwb_check_data_page_is_sane(), dwb_load_and_recover_pages(), and log_get_num_pages_for_creation().
STATIC_INLINE FILEIO_PAGE_WATERMARK* fileio_get_page_watermark_pos | ( | FILEIO_PAGE * | io_page, |
PGLENGTH | page_size | ||
) |
Definition at line 202 of file file_io.h.
References STATIC_INLINE.
Referenced by fileio_init_lsa_of_page(), fileio_is_page_sane(), fileio_reset_page_lsa(), fileio_set_page_lsa(), and pgbuf_init_temp_page_lsa().
int fileio_get_volume_descriptor | ( | VOLID | volid | ) |
Definition at line 6488 of file file_io.c.
References FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_find_system_volume(), fileio_is_system_volume_id_equal(), FILEIO_VOLINFO_INCREMENT, i, LOG_MAX_DBVOLID, fileio_volinfo_header::max_perm_vols, fileio_volinfo_header::max_temp_vols, fileio_volinfo_header::next_temp_volid, NULL, NULL_VOLDES, NULL_VOLID, fileio_volinfo_header::num_volinfo_array, pthread_mutex_lock, pthread_mutex_unlock, rv, fileio_sys_volinfo::vdes, fileio_volinfo::vdes, fileio_apply_function_arg::vol_id, and fileio_volinfo_header::volinfo.
Referenced by boot_dbparm_save_volume(), disk_is_page_sector_reserved_with_debug_crash(), dwb_check_data_page_is_sane(), dwb_write_block(), fileio_backup_volume(), fileio_expand_to(), fileio_find_next_perm_volume(), fileio_find_previous_perm_volume(), fileio_find_previous_temp_volume(), fileio_is_temp_volume(), fileio_rename(), log_get_num_pages_for_creation(), log_recreate(), logpb_backup_for_volume(), logpb_checkpoint(), logpb_copy_volume(), logpb_delete(), logpb_rename_all_volumes_files(), pgbuf_bcb_flush_with_wal(), pgbuf_check_bcb_page_vpid(), pgbuf_claim_bcb_for_fix(), pgbuf_copy_from_area(), and pgbuf_copy_to_area().
Definition at line 6182 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_find_system_volume(), fileio_is_system_volume_id_equal(), FILEIO_VOLINFO_INCREMENT, i, LOG_MAX_DBVOLID, fileio_volinfo_header::max_perm_vols, fileio_volinfo_header::max_temp_vols, fileio_volinfo_header::next_temp_volid, NULL, NULL_VOLID, fileio_volinfo_header::num_volinfo_array, pthread_mutex_lock, pthread_mutex_unlock, rv, strdup(), strlen, fileio_sys_volinfo::vlabel, fileio_volinfo::vlabel, fileio_apply_function_arg::vol_id, and fileio_volinfo_header::volinfo.
Referenced by boot_check_permanent_volumes(), boot_remove_temp_volume(), disk_check_volume(), fileio_expand_to(), fileio_get_volume_label_by_fd(), fileio_synchronize_all(), heap_create_internal(), heap_header_next_scan(), log_execute_run_postpone(), log_recreate(), log_rollback_record(), log_rv_undo_record(), log_unformat_ahead_volumes(), logpb_backup(), logpb_backup_for_volume(), logpb_checkpoint(), logpb_copy_volume(), logpb_delete(), logpb_next_where_path(), logpb_rename_all_volumes_files(), pgbuf_fix_debug(), pgbuf_flush_checkpoint(), pgbuf_get_volume_label(), pgbuf_is_valid_page(), pgbuf_is_valid_page_ptr(), pgbuf_set_lsa(), pgbuf_unfix_debug(), pgbuf_unlatch_bcb_upon_unfix(), pgbuf_unlatch_thrd_holder(), spage_compact(), and spage_verify_header().
char* fileio_get_volume_label_by_fd | ( | int | vol_fd, |
bool | is_peek | ||
) |
Definition at line 6254 of file file_io.c.
References fileio_get_volume_id(), and fileio_get_volume_label().
Referenced by fileio_close(), fileio_dismount(), fileio_dismount_without_fsync(), fileio_expand_to(), fileio_read(), fileio_read_pages(), fileio_synchronize_all(), fileio_write(), fileio_write_backup_header(), fileio_write_pages(), logpb_fetch_from_archive(), pwrite_with_injected_fault(), tde_add_mk(), and tde_find_first_mk().
int fileio_get_volume_max_suffix | ( | void | ) |
Definition at line 5604 of file file_io.c.
References FILEIO_MAX_SUFFIX_LENGTH.
Referenced by logpb_verify_length().
const char* fileio_get_zip_level_string | ( | FILEIO_ZIP_LEVEL | zip_level | ) |
Definition at line 10774 of file file_io.c.
References FILEIO_ZIP_1_LEVEL, and FILEIO_ZIP_NONE_LEVEL.
Referenced by fileio_compress_backup_node(), fileio_decompress_restore_volume(), fileio_list_restore(), fileio_write_backup_node(), logpb_backup(), or_put_varchar_internal(), pr_data_compress_string(), pr_get_compression_length(), and pr_get_size_and_write_string_to_buffer().
const char* fileio_get_zip_method_string | ( | FILEIO_ZIP_METHOD | zip_method | ) |
Definition at line 10747 of file file_io.c.
References FILEIO_ZIP_LZ4_METHOD, FILEIO_ZIP_LZO1X_METHOD, FILEIO_ZIP_NONE_METHOD, and FILEIO_ZIP_ZLIB_METHOD.
Referenced by fileio_compress_backup_node(), fileio_decompress_restore_volume(), fileio_list_restore(), fileio_write_backup_node(), logpb_backup(), or_put_varchar_internal(), pr_data_compress_string(), pr_get_compression_length(), and pr_get_size_and_write_string_to_buffer().
STATIC_INLINE void fileio_init_lsa_of_page | ( | FILEIO_PAGE * | io_page, |
PGLENGTH | page_size | ||
) |
Definition at line 208 of file file_io.h.
References fileio_get_page_watermark_pos(), fileio_page_reserved::lsa, fileio_page_watermark::lsa, LSA_SET_NULL(), fileio_page::prv, and STATIC_INLINE.
Referenced by fileio_initialize_res(), pgbuf_check_bcb_page_vpid(), pgbuf_claim_bcb_for_fix(), pgbuf_flush_all_helper(), and pgbuf_initialize_bcb_table().
FILEIO_BACKUP_SESSION* fileio_initialize_backup | ( | const char * | db_fullname, |
const char * | backup_destination, | ||
FILEIO_BACKUP_SESSION * | session, | ||
FILEIO_BACKUP_LEVEL | level, | ||
const char * | verbose_file_path, | ||
int | num_threads, | ||
int | sleep_msecs | ||
) |
Definition at line 6729 of file file_io.c.
References fileio_backup_buffer::alltotalio, fileio_backup_db_buffer::area, ARG_FILE_LINE, fileio_backup_header::bk_hdr_version, io_backup_session::bkup, fileio_backup_header::bkup_iosize, fileio_backup_buffer::bkuphdr, fileio_backup_buffer::buffer, fileio_backup_buffer::count, fileio_backup_buffer::current_path, DB_INT32_MAX, fileio_backup_header::db_next_bkvolname, fileio_backup_header::db_prec_bkvolname, io_backup_session::dbfile, fileio_backup_buffer::dtype, fileio_backup_header::end_time, ER_ERROR_SEVERITY, ER_IO_CANNOT_OPEN_VERBOSE_FILE, ER_IO_MOUNT_FAIL, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), error(), FILEIO_BACKUP_CURRENT_HEADER_VERSION, FILEIO_BACKUP_FILE_HEADER_PAGE_SIZE, FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_HEADER_IO_SIZE, FILEIO_BACKUP_PAGE_OVERHEAD, FILEIO_BACKUP_VOL_DEVICE, FILEIO_BACKUP_VOL_DIRECTORY, FILEIO_BACKUP_VOL_UNKNOWN, FILEIO_BACKUP_WRITE, fileio_close(), FILEIO_DISK_FORMAT_MODE, FILEIO_DISK_PROTECTION_MODE, FILEIO_FULL_LEVEL_EXP, fileio_get_base_file_name(), fileio_get_directory_path(), FILEIO_INITIAL_BACKUP_UNITS, fileio_initialize_backup_thread(), fileio_make_backup_name(), fileio_open(), FILEIO_SET_BACKUP_PAGE_ID, FILEIO_ZIP_NONE_LEVEL, FILEIO_ZIP_NONE_METHOD, free_and_init, IO_PAGESIZE, fileio_backup_buffer::iosize, fileio_backup_header::level, fileio_backup_db_buffer::level, fileio_backup_db_buffer::lsa, LSA_SET_NULL(), fileio_backup_buffer::name, fileio_backup_db_buffer::nbytes, NO_ERROR, NULL, NULL_PAGEID, NULL_VOLDES, NULL_VOLID, prm_get_bigint_value(), prm_get_integer_value(), PRM_ID_IO_BACKUP_MAX_VOLUME_SIZE, PRM_ID_IO_BACKUP_NBUFFERS, fileio_backup_buffer::ptr, io_backup_session::sleep_msecs, fileio_backup_header::start_time, strncpy_bufsize, io_backup_session::type, fileio_backup_header::unit_num, fileio_backup_buffer::vdes, fileio_backup_db_buffer::vdes, io_backup_session::verbose_fp, fileio_backup_buffer::vlabel, fileio_backup_db_buffer::vlabel, fileio_backup_db_buffer::volid, fileio_backup_buffer::voltotalio, fileio_backup_header::zip_level, and fileio_backup_header::zip_method.
Referenced by fileio_initialize_restore(), and logpb_backup().
void* fileio_initialize_pages | ( | THREAD_ENTRY * | thread_p, |
int | vdes, | ||
FILEIO_PAGE * | io_pgptr, | ||
DKNPAGES | start_pageid, | ||
DKNPAGES | npages, | ||
size_t | page_size, | ||
int | kbytes_to_be_written_per_sec | ||
) |
Definition at line 1864 of file file_io.c.
References dwb_is_created(), FILEIO_CHECK_FOR_INTERRUPT_INTERVAL, fileio_write_or_add_to_dwb(), IO_PAGESIZE, logtb_get_check_interrupt(), NULL, ONE_K, pgbuf_is_log_check_for_interrupts(), thread_sleep(), tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by fileio_expand_to(), and fileio_format().
void fileio_initialize_res | ( | THREAD_ENTRY * | thread_p, |
FILEIO_PAGE * | io_page, | ||
PGLENGTH | page_size | ||
) |
Definition at line 11577 of file file_io.c.
References fileio_init_lsa_of_page(), fileio_page_reserved::p_reserve_1, fileio_page_reserved::p_reserve_2, fileio_page_reserved::pageid, fileio_page_reserved::pflag, fileio_page::prv, fileio_page_reserved::ptype, fileio_page_reserved::tde_nonce, and fileio_page_reserved::volid.
Referenced by dwb_add_page(), dwb_check_data_page_is_sane(), dwb_create_blocks(), dwb_flush_block(), dwb_flush_force(), dwb_set_slot_data(), dwb_slots_hash_insert(), fileio_expand_to(), fileio_fill_hole_during_restore(), fileio_format(), fileio_is_formatted_page(), and fileio_synchronize_all().
bool fileio_is_formatted_page | ( | THREAD_ENTRY * | thread_p, |
const char * | io_page | ||
) |
Definition at line 11841 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), fileio_initialize_res(), free_and_init, IO_PAGESIZE, and NULL.
STATIC_INLINE int fileio_is_page_sane | ( | FILEIO_PAGE * | io_page, |
PGLENGTH | page_size | ||
) |
Definition at line 237 of file file_io.h.
References fileio_get_page_watermark_pos(), fileio_page_reserved::lsa, fileio_page_watermark::lsa, LSA_EQ(), and fileio_page::prv.
Referenced by dwb_set_slot_data(), and fileio_page_check_corruption().
bool fileio_is_permanent_volume_descriptor | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd | ||
) |
Definition at line 6387 of file file_io.c.
References FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_is_volume_descriptor_equal(), fileio_traverse_permanent_volume(), NULL_VOLDES, and fileio_apply_function_arg::vdes.
Referenced by fileio_synchronize(), and pwrite_with_injected_fault().
bool fileio_is_temp_volume | ( | THREAD_ENTRY * | thread_p, |
VOLID | volid | ||
) |
Definition at line 6358 of file file_io.c.
References assert, FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_get_volume_descriptor(), fileio_is_volume_id_equal(), fileio_traverse_temporary_volume(), NULL_VOLDES, NULL_VOLID, fileio_apply_function_arg::vol_id, and fileio_backup_file_header::volid.
Definition at line 5094 of file file_io.c.
References fileio_close(), fileio_find_volume_descriptor_with_label(), fileio_open(), and NULL_VOLDES.
Referenced by alterdbhost(), boot_find_rest_temp_volumes(), boot_remove_all_volumes(), boot_remove_unknown_temp_volumes(), disk_add_volume(), dwb_load_and_recover_pages(), fileio_format(), fileio_initialize_restore(), fileio_lock(), fileio_read_restore(), fileio_restore_volume(), fileio_symlink(), la_log_page_check(), log_recovery_notpartof_archives(), log_recovery_notpartof_volumes(), logpb_backup(), logpb_delete(), logpb_exist_log(), logpb_fetch_from_archive(), logpb_fetch_header_from_active_log(), logpb_find_oldest_available_arv_num(), logpb_find_volume_info_exist(), logpb_is_log_active_from_backup_useful(), logpb_peek_header_of_active_log_from_backup(), logpb_remove_all_in_log_path(), logpb_rename_all_volumes_files(), logpb_restore(), tde_copy_keys_file(), and tde_create_keys_file().
Definition at line 5132 of file file_io.c.
References fileio_find_volume_descriptor_with_label(), and NULL_VOLDES.
Referenced by fileio_abort_backup(), fileio_remove_all_backup(), and logpb_backup().
int fileio_list_restore | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
char * | backup_source, | ||
FILEIO_BACKUP_LEVEL | level, | ||
bool | newvolpath | ||
) |
Definition at line 9703 of file file_io.c.
References fileio_backup_db_buffer::area, ARG_FILE_LINE, fileio_backup_record_info::at_time, fileio_backup_header::bkpagesize, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, CEIL_PTVDIV, fileio_backup_header::chkpt_lsa, CTIME_MAX, fileio_backup_header::db_compatibility, fileio_backup_header::db_creation, fileio_backup_header::db_fullname, fileio_backup_header::db_iopagesize, fileio_backup_header::db_next_bkvolname, fileio_backup_header::db_prec_bkvolname, fileio_backup_header::db_release, io_backup_session::dbfile, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_IO_BKUP_DATABASE_VOLUME_OR_FILE_EXPECTED, ER_IO_NOT_A_BACKUP, ER_IO_RESTORE_READ_ERROR, ER_LOG_CANNOT_ACCESS_BACKUP, er_set(), error(), fileio_abort_restore(), FILEIO_BACKUP_END_PAGE_ID, FILEIO_BACKUP_FILE_HEADER_PAGE_SIZE, FILEIO_BACKUP_FILE_START_PAGE_ID, FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_START_PAGE_ID, FILEIO_BACKUP_UNDEFINED_LEVEL, FILEIO_BACKUP_VOL_CONT_PAGE_ID, fileio_finish_restore(), fileio_get_backup_level_string(), FILEIO_GET_BACKUP_PAGE_ID, fileio_get_zip_level_string(), fileio_get_zip_method_string(), FILEIO_INITIAL_BACKUP_UNITS, fileio_read_restore(), fileio_skip_restore_volume(), fileio_start_restore(), i, IO_PAGESIZE, fileio_backup_page::iopage, fileio_backup_header::iopageid, fileio_backup_header::level, fileio_backup_record_info::lsa, MSGCAT_CATALOG_CUBRID, MSGCAT_FILEIO_BKUP_FILE, MSGCAT_FILEIO_BKUP_HDR, MSGCAT_FILEIO_BKUP_HDR_BKUP_PAGESIZE, MSGCAT_FILEIO_BKUP_HDR_DBINFO, MSGCAT_FILEIO_BKUP_HDR_INC_ACTIVELOG, MSGCAT_FILEIO_BKUP_HDR_LEVEL, MSGCAT_FILEIO_BKUP_HDR_LX_LSA, MSGCAT_FILEIO_BKUP_HDR_RELEASES, MSGCAT_FILEIO_BKUP_HDR_TIME, MSGCAT_FILEIO_BKUP_HDR_ZIP_INFO, MSGCAT_FILEIO_BKUP_NEXT_BKVOL, MSGCAT_FILEIO_BKUP_PREV_BKVOL, msgcat_message(), MSGCAT_SET_IO, fileio_backup_file_header::nbytes, fileio_backup_db_buffer::nbytes, NO_ERROR, NULL, log_lsa::offset, log_lsa::pageid, fileio_backup_header::previnfo, fileio_backup_header::skip_activelog, fileio_backup_header::start_lsa, fileio_backup_header::start_time, strlen, fileio_backup_header::unit_num, fileio_backup_buffer::vlabel, fileio_backup_file_header::vlabel, fileio_backup_db_buffer::vlabel, fileio_backup_file_header::volid, fileio_backup_db_buffer::volid, fileio_backup_header::zip_level, and fileio_backup_header::zip_method.
Referenced by print_backup_info().
FILEIO_LOCKF_TYPE fileio_lock_la_dbname | ( | int * | lockf_vdes, |
char * | db_name, | ||
char * | log_path | ||
) |
Definition at line 1545 of file file_io.c.
References ARG_FILE_LINE, assert, assert_release, cub_dirname_r(), DB_MAX_IDENTIFIER_LENGTH, envvar_vardir_file(), ER_BO_DIRECTORY_DOESNOT_EXIST, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, ER_IO_MOUNT_LOCKED, er_log_debug, er_set(), er_set_with_oserror(), error(), fileio_close(), fileio_lock_file_write, FILEIO_LOCKF, FILEIO_NOT_LOCKF, fileio_open(), fileio_release_lock(), NO_ERROR, NULL, NULL_VOLDES, and pid.
Referenced by la_lock_dbname().
FILEIO_LOCKF_TYPE fileio_lock_la_log_path | ( | const char * | db_fullname, |
const char * | lock_path, | ||
int | vdes, | ||
int * | last_deleted_arv_num | ||
) |
Definition at line 1392 of file file_io.c.
References ARG_FILE_LINE, CUB_MAXHOSTNAMELEN, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, ER_IO_MOUNT_LOCKED, er_log_debug, er_set(), er_set_with_oserror(), fileio_ctime(), fileio_lock_file_write, FILEIO_LOCKF, FILEIO_NOT_LOCKF, FILEIO_USER_NAME_SIZE, GETHOSTNAME, GETPID, getuserid(), host, NULL, and pid.
Referenced by la_check_duplicated().
void fileio_make_backup_name | ( | char * | backup_name, |
const char * | nopath_volname, | ||
const char * | backup_path, | ||
FILEIO_BACKUP_LEVEL | level, | ||
int | unit_num | ||
) |
Definition at line 5853 of file file_io.c.
References FILEIO_SUFFIX_BACKUP, and PATH_SEPARATOR.
Referenced by fileio_continue_restore(), fileio_get_backup_volume(), fileio_get_next_backup_volume(), fileio_initialize_backup(), logpb_backup(), and logpb_restore().
void fileio_make_backup_volume_info_name | ( | char * | backup_volinfo_name, |
const char * | backinfo_path, | ||
const char * | dbname | ||
) |
Definition at line 5833 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_BACKUP_VOLINFO.
Referenced by fileio_get_backup_volume(), logpb_copy_database(), logpb_initialize_log_names(), logpb_rename_all_volumes_files(), and logpb_restore().
Definition at line 5881 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_DWB.
Referenced by dwb_create(), dwb_load_and_recover_pages(), and logpb_delete().
void fileio_make_keys_name | ( | char * | keys_name_p, |
const char * | db_name_p | ||
) |
Definition at line 5897 of file file_io.c.
References FILEIO_SUFFIX_KEYS.
Referenced by tde_make_keys_file_fullname().
void fileio_make_keys_name_given_path | ( | char * | keys_name_p, |
const char * | keys_path_p, | ||
const char * | db_name_p | ||
) |
Definition at line 5914 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_KEYS.
Referenced by tde_make_keys_file_fullname().
void fileio_make_log_active_name | ( | char * | logactive_name, |
const char * | log_path, | ||
const char * | dbname | ||
) |
Definition at line 5707 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_LOGACTIVE.
Referenced by la_find_log_pagesize(), la_log_page_check(), logpb_copy_database(), logpb_initialize_log_names(), and logpb_rename_all_volumes_files().
void fileio_make_log_archive_name | ( | char * | logarchive_name, |
const char * | log_path, | ||
const char * | dbname, | ||
int | arvnum | ||
) |
Definition at line 5758 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_LOGARCHIVE.
Referenced by la_find_archive_num(), la_find_last_deleted_arv_num(), la_get_range_of_archive(), la_log_fetch_from_archive(), la_remove_archive_logs(), log_recovery_notpartof_archives(), logpb_append_archives_removed_to_log_info(), logpb_archive_active_log(), logpb_checkpoint(), logpb_delete(), logpb_fatal_error_internal(), logpb_fetch_from_archive(), logpb_find_oldest_available_arv_num(), logpb_find_oldest_available_page_id(), logpb_is_log_active_from_backup_useful(), logpb_remove_all_in_log_path(), logpb_remove_archive_logs_internal(), and logpb_rename_all_volumes_files().
void fileio_make_log_archive_temp_name | ( | char * | log_archive_temp_name_p, |
const char * | log_path_p, | ||
const char * | db_name_p | ||
) |
Definition at line 5793 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_TMP_LOGARCHIVE.
Referenced by logpb_initialize_log_names().
Definition at line 5815 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_LOGINFO.
Referenced by la_apply_log_file(), logpb_copy_database(), logpb_initialize_log_names(), and logpb_rename_all_volumes_files().
void fileio_make_removed_log_archive_name | ( | char * | logarchive_name, |
const char * | log_path, | ||
const char * | dbname | ||
) |
Definition at line 5777 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_SUFFIX_LOGARCHIVE.
Referenced by logpb_initialize_log_names().
void fileio_make_temp_log_files_from_backup | ( | char * | temp_log_name, |
VOLID | volid, | ||
FILEIO_BACKUP_LEVEL | level, | ||
const char * | base_log_name | ||
) |
Definition at line 5726 of file file_io.c.
References LOG_DBLOG_ACTIVE_VOLID, LOG_DBLOG_ARCHIVE_VOLID, and LOG_DBLOG_INFO_VOLID.
Referenced by logpb_restore().
void fileio_make_volume_ext_given_name | ( | char * | volext_fullname, |
const char * | ext_path, | ||
const char * | ext_name | ||
) |
Definition at line 5672 of file file_io.c.
References FILEIO_PATH_SEPARATOR.
Referenced by boot_get_new_volume_name_and_id().
void fileio_make_volume_ext_name | ( | char * | volext_fullname, |
const char * | ext_path, | ||
const char * | ext_name, | ||
VOLID | volid | ||
) |
Definition at line 5654 of file file_io.c.
References FILEIO_PATH_SEPARATOR, and FILEIO_VOLEXT_PREFIX.
Referenced by boot_get_new_volume_name_and_id(), disk_add_volume(), log_recovery_notpartof_volumes(), and logpb_next_where_path().
void fileio_make_volume_info_name | ( | char * | volinfo_name, |
const char * | db_fullname | ||
) |
Definition at line 5636 of file file_io.c.
References FILEIO_VOLINFO_SUFFIX.
Referenced by boot_volume_info_log_path(), fix_all_volume_header(), get_active_log_vol_path(), logpb_add_volume(), logpb_backup(), logpb_copy_database(), logpb_create_volume_info(), logpb_delete(), logpb_initialize_log_names(), and logpb_scan_volume_info().
void fileio_make_volume_temp_name | ( | char * | voltmp_fullname, |
const char * | tmp_path, | ||
const char * | tmp_name, | ||
VOLID | volid | ||
) |
Definition at line 5690 of file file_io.c.
References FILEIO_VOLTMP_PREFIX, and PATH_SEPARATOR.
Referenced by boot_find_rest_temp_volumes(), boot_get_new_volume_name_and_id(), and boot_make_temp_volume_fullname().
bool fileio_map_mounted | ( | THREAD_ENTRY * | thread_p, |
bool(*)(THREAD_ENTRY *thread_p, VOLID volid, void *args) | fun, | ||
void * | args | ||
) |
int fileio_mount | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
const char * | vlabel, | ||
VOLID | volid, | ||
int | lockwait, | ||
bool | dosync | ||
) |
Definition at line 2957 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, ER_IO_MOUNT_LOCKED, er_set_with_oserror(), fileio_cache(), FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_close(), fileio_dismount(), fileio_find_volume_descriptor_with_label(), fileio_lock(), FILEIO_LOCKF, FILEIO_NOT_LOCKF, fileio_open(), fileio_set_permission(), LOG_DBFIRST_VOLID, NULL_VOLDES, prm_get_bool_value(), prm_get_integer_value(), PRM_ID_DATA_FILE_ADVISE, and PRM_ID_DBFILES_PROTECT.
Referenced by alterdbhost(), boot_mount(), boot_reset_mk_after_restart_from_backup(), boot_restart_server(), dwb_load_and_recover_pages(), fileio_format(), fileio_restore_volume(), log_initialize_internal(), log_recovery_notpartof_volumes(), logpb_archive_active_log(), logpb_backup(), logpb_copy_database(), logpb_delete(), logpb_fetch_from_archive(), logpb_fetch_header_from_active_log(), logpb_find_oldest_available_page_id(), logpb_remove_all_in_log_path(), logpb_rename_all_volumes_files(), logpb_restore(), tde(), tde_cipher_initialize(), tde_copy_keys_file(), tde_initialize(), xboot_copy(), xboot_delete(), xboot_emergency_patch(), xboot_initialize_server(), and xboot_soft_rename().
int fileio_open | ( | const char * | vlabel, |
int | flags, | ||
int | mode | ||
) |
Definition at line 1957 of file file_io.c.
References fileio_get_lock(), MAX_NTRANS, NULL_VOLDES, prm_get_bool_value(), and PRM_ID_DBFILES_PROTECT.
Referenced by boot_reset_mk_after_restart_from_backup(), disk_can_overwrite_data_volume(), fileio_backup_volume(), fileio_check_file_exist(), fileio_continue_restore(), fileio_create(), fileio_create_backup_volume(), fileio_get_number_of_partition_free_pages(), fileio_get_number_of_partition_free_sectors(), fileio_get_primitive_way_max(), fileio_initialize_backup(), fileio_is_volume_exist(), fileio_lock_la_dbname(), fileio_mount(), fileio_write_backup_end_time_to_header(), la_check_duplicated(), la_find_last_deleted_arv_num(), la_find_log_pagesize(), la_get_range_of_archive(), la_log_fetch_from_archive(), log_active_log_header_start_scan(), log_archive_log_header_start_scan(), logpb_peek_header_of_active_log_from_backup(), tde_create_keys_file(), and xtde_change_mk_without_flock().
FILEIO_RESTORE_PAGE_BITMAP* fileio_page_bitmap_create | ( | int | vol_id, |
int | total_pages | ||
) |
Definition at line 11615 of file file_io.c.
References ARG_FILE_LINE, page_bitmap::bitmap, CEIL_PTVDIV, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, page_bitmap::next, NULL, page_bitmap::size, and page_bitmap::vol_id.
Referenced by logpb_restore().
void fileio_page_bitmap_list_add | ( | FILEIO_RESTORE_PAGE_BITMAP_LIST * | page_bitmap_list, |
FILEIO_RESTORE_PAGE_BITMAP * | page_bitmap | ||
) |
Definition at line 11684 of file file_io.c.
References assert, page_bitmap_list::head, page_bitmap::next, NULL, page_bitmap_list::tail, and page_bitmap::vol_id.
Referenced by logpb_restore().
void fileio_page_bitmap_list_destroy | ( | FILEIO_RESTORE_PAGE_BITMAP_LIST * | page_bitmap_list | ) |
Definition at line 11726 of file file_io.c.
References assert, page_bitmap::bitmap, free_and_init, page_bitmap_list::head, page_bitmap::next, NULL, page_bitmap::size, page_bitmap_list::tail, and page_bitmap::vol_id.
Referenced by logpb_restore().
FILEIO_RESTORE_PAGE_BITMAP* fileio_page_bitmap_list_find | ( | FILEIO_RESTORE_PAGE_BITMAP_LIST * | page_bitmap_list, |
int | vol_id | ||
) |
Definition at line 11653 of file file_io.c.
References assert, page_bitmap_list::head, page_bitmap::next, NULL, page_bitmap_list::tail, and page_bitmap::vol_id.
Referenced by logpb_restore().
void fileio_page_bitmap_list_init | ( | FILEIO_RESTORE_PAGE_BITMAP_LIST * | page_bitmap_list | ) |
Definition at line 11601 of file file_io.c.
References assert, page_bitmap_list::head, NULL, and page_bitmap_list::tail.
Referenced by logpb_restore().
int fileio_page_check_corruption | ( | THREAD_ENTRY * | thread_p, |
FILEIO_PAGE * | io_page, | ||
bool * | is_page_corrupted | ||
) |
Definition at line 11831 of file file_io.c.
References assert, fileio_is_page_sane(), IO_PAGESIZE, NO_ERROR, and NULL.
Referenced by dwb_check_data_page_is_sane(), dwb_debug_check_dwb(), pgbuf_check_bcb_page_vpid(), and pwrite_with_injected_fault().
void fileio_page_hexa_dump | ( | const char * | data, |
int | length | ||
) |
Definition at line 3597 of file file_io.c.
References ARG_FILE_LINE, assert, er_log_debug, free_and_init, i, and NULL.
Referenced by log_recovery_analysis(), and pwrite_with_injected_fault().
void* fileio_read | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd, | ||
void * | io_page_p, | ||
PAGEID | page_id, | ||
size_t | page_size | ||
) |
Definition at line 3950 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_IO_READ, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, ER_PB_BAD_PAGEID, er_set(), er_set_with_oserror(), FILEIO_GET_FILE_SIZE, fileio_get_volume_label_by_fd(), fileio_os_read(), MONITOR_WAITING_THREAD, fileio_backup_file_header::nbytes, NULL, PEEK, perfmon_inc_stat(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, PSTAT_FILE_NUM_IOREADS, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by disk_can_overwrite_data_volume(), dwb_check_data_page_is_sane(), fileio_copy_volume(), fileio_reset_volume(), logpb_fetch_from_archive(), logpb_fetch_header_from_active_log(), logpb_find_oldest_available_page_id(), logpb_peek_header_of_active_log_from_backup(), logpb_read_page_from_file(), pgbuf_check_bcb_page_vpid(), and pgbuf_claim_bcb_for_fix().
int fileio_read_backup_info_entries | ( | FILE * | fp, |
int | which_bkvinf | ||
) |
Definition at line 11065 of file file_io.c.
References ER_FAILED, fileio_add_volume_to_backup_info(), FILEIO_BACKUP_UNDEFINED_LEVEL, fileio_finalize_backup_info(), FILEIO_INITIAL_BACKUP_UNITS, fileio_initialize_backup_info(), MSGCAT_CATALOG_CUBRID, MSGCAT_FILEIO_BACKUP_VINF_ERROR, msgcat_message(), MSGCAT_SET_IO, NO_ERROR, and NULL.
Referenced by fileio_get_backup_volume(), logpb_backup(), logpb_delete(), and logpb_rename_all_volumes_files().
void* fileio_read_pages | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd, | ||
char * | io_pages_p, | ||
PAGEID | page_id, | ||
int | num_pages, | ||
size_t | page_size | ||
) |
Definition at line 4227 of file file_io.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_IO_READ, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), FILEIO_GET_FILE_SIZE, fileio_get_volume_label_by_fd(), fileio_os_read(), MONITOR_WAITING_THREAD, NULL, PEEK, perfmon_inc_stat(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, PSTAT_FILE_NUM_IOREADS, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by dwb_load_and_recover_pages(), and logpb_read_page_from_active_log().
void fileio_remove_all_backup | ( | THREAD_ENTRY * | thread_p, |
int | level | ||
) |
Definition at line 7446 of file file_io.c.
References FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_UNDEFINED_LEVEL, fileio_clear_backup_info_level(), FILEIO_FIRST_BACKUP_VOL_INFO, fileio_get_backup_info_volume_name(), FILEIO_INITIAL_BACKUP_UNITS, fileio_is_volume_exist_and_file(), fileio_unformat(), and NULL.
Referenced by fileio_abort_backup(), logpb_backup(), logpb_delete(), and logpb_rename_all_volumes_files().
Definition at line 5070 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_IO_RENAME_FAIL, er_log_debug, er_set_with_oserror(), fileio_get_volume_descriptor(), NO_ERROR, NULL, NULL_VOLDES, and os_rename_file().
Referenced by logpb_archive_active_log(), and logpb_rename_all_volumes_files().
int fileio_request_user_response | ( | THREAD_ENTRY * | thread_p, |
FILEIO_REMOTE_PROMPT_TYPE | prompt_id, | ||
const char * | prompt, | ||
char * | response, | ||
const char * | failure_prompt, | ||
int | range_low, | ||
int | range_high, | ||
const char * | secondary_prompt, | ||
int | reprompt_value | ||
) |
Definition at line 11304 of file file_io.c.
References ARG_FILE_LINE, char_tolower(), db_on_server, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_NET_DATA_TRUNCATED, er_set(), FILEIO_MAX_USER_RESPONSE_SIZE, FILEIO_PROMPT_BOOLEAN_TYPE, FILEIO_PROMPT_DISPLAY_ONLY, FILEIO_PROMPT_RANGE_TYPE, FILEIO_PROMPT_RANGE_WITH_SECONDARY_STRING_TYPE, FILEIO_PROMPT_STRING_TYPE, free_and_init, intl_mbs_casecmp(), intl_mbs_len(), NO_ERROR, NULL, OR_INT_SIZE, or_unpack_int(), or_unpack_string_nocopy(), parse_int(), rc, xio_send_user_prompt_to_client(), and xs_receive_data_from_client().
Referenced by fileio_find_restore_volume(), fileio_finish_backup(), fileio_get_next_backup_volume(), fileio_make_error_message(), logpb_backup(), and logpb_remote_ask_user_before_delete_volumes().
STATIC_INLINE void fileio_reset_page_lsa | ( | FILEIO_PAGE * | io_page, |
PGLENGTH | page_size | ||
) |
Definition at line 217 of file file_io.h.
References fileio_get_page_watermark_pos(), fileio_page_reserved::lsa, fileio_page_watermark::lsa, LSA_SET_NULL(), fileio_page::prv, and STATIC_INLINE.
Referenced by fileio_copy_volume().
int fileio_reset_volume | ( | THREAD_ENTRY * | thread_p, |
int | vdes, | ||
const char * | vlabel, | ||
DKNPAGES | npages, | ||
const LOG_LSA * | reset_lsa | ||
) |
Definition at line 2903 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), fileio_read(), fileio_set_page_lsa(), FILEIO_SYNC_ALSO_FLUSH_DWB, fileio_synchronize(), fileio_write_or_add_to_dwb(), free_and_init, IO_PAGESIZE, NO_ERROR, NULL, and success().
Referenced by disk_format(), and log_recreate().
int fileio_restore_volume | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session, | ||
char * | to_vlabel, | ||
char * | verbose_to_vlabel, | ||
char * | prev_vlabel, | ||
FILEIO_RESTORE_PAGE_BITMAP * | page_bitmap, | ||
bool | remember_pages | ||
) |
Definition at line 10235 of file file_io.c.
References fileio_backup_db_buffer::area, ARG_FILE_LINE, fileio_backup_header::bkpagesize, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, CEIL_PTVDIV, fileio_backup_header::db_creation, io_backup_session::dbfile, DISK_FLUSH_AND_INVALIDATE, disk_set_creation(), disk_set_link(), DISK_VOLHEADER_PAGE, ER_ERROR_SEVERITY, ER_FAILED, ER_IO_RESTORE_PAGEID_OUTOF_BOUNDS, ER_IO_RESTORE_READ_ERROR, er_set(), error(), FILEIO_BACKUP_FILE_END_PAGE_ID, FILEIO_BACKUP_FULL_LEVEL, FILEIO_CHECK_RESTORE_PAGE_ID, fileio_decompress_restore_volume(), fileio_dismount(), fileio_fill_hole_during_restore(), fileio_find_previous_perm_volume(), fileio_format(), FILEIO_GET_BACKUP_PAGE_ID, fileio_get_base_file_name(), fileio_is_volume_exist(), fileio_mount(), fileio_page_bitmap_dump(), FILEIO_RESTORE_DBVOLS_IO_PAGE_SIZE, fileio_write_restore(), for(), i, IO_PAGESIZE, fileio_backup_page::iopage, fileio_backup_page::iopageid, fileio_backup_buffer::last_chkpt_lsa, fileio_backup_db_buffer::level, fileio_backup_buffer::loc_db_fullname, LOG_DBFIRST_VOLID, MSGCAT_CATALOG_CUBRID, MSGCAT_FILEIO_BKUP_FILE, msgcat_message(), MSGCAT_SET_IO, fileio_backup_file_header::nbytes, fileio_backup_db_buffer::nbytes, NO_ERROR, NULL, NULL_VOLDES, NULL_VOLID, fileio_backup_header::unit_num, fileio_backup_db_buffer::vdes, io_backup_session::verbose_fp, fileio_backup_db_buffer::vlabel, fileio_backup_file_header::volid, and fileio_backup_db_buffer::volid.
Referenced by logpb_restore().
int fileio_set_page_checksum | ( | THREAD_ENTRY * | thread_p, |
FILEIO_PAGE * | io_page | ||
) |
STATIC_INLINE void fileio_set_page_lsa | ( | FILEIO_PAGE * | io_page, |
const LOG_LSA * | lsa, | ||
PGLENGTH | page_size | ||
) |
Definition at line 227 of file file_io.h.
References fileio_get_page_watermark_pos(), fileio_page_reserved::lsa, fileio_page_watermark::lsa, LSA_COPY(), fileio_page::prv, and STATIC_INLINE.
Referenced by fileio_reset_volume(), and pgbuf_set_lsa().
int fileio_set_permission | ( | const char * | vlabel | ) |
Definition at line 2002 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_IO_CANNOT_CHANGE_PERMISSION, ER_IO_CANNOT_GET_PERMISSION, er_set_with_oserror(), error(), mode, and NO_ERROR.
Referenced by fileio_mount().
int fileio_skip_restore_volume | ( | THREAD_ENTRY * | thread_p, |
FILEIO_BACKUP_SESSION * | session | ||
) |
Definition at line 10559 of file file_io.c.
References fileio_backup_db_buffer::area, ARG_FILE_LINE, fileio_backup_header::bkpagesize, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, io_backup_session::dbfile, ER_ERROR_SEVERITY, ER_FAILED, ER_IO_RESTORE_READ_ERROR, er_set(), error(), FILEIO_BACKUP_FILE_END_PAGE_ID, FILEIO_CHECK_RESTORE_PAGE_ID, fileio_decompress_restore_volume(), FILEIO_GET_BACKUP_PAGE_ID, FILEIO_RESTORE_DBVOLS_IO_PAGE_SIZE, fileio_backup_file_header::nbytes, NO_ERROR, NULL, NULL_VOLDES, NULL_VOLID, fileio_backup_header::unit_num, fileio_backup_db_buffer::vdes, fileio_backup_db_buffer::vlabel, and fileio_backup_db_buffer::volid.
Referenced by fileio_list_restore(), and logpb_restore().
FILEIO_BACKUP_SESSION* fileio_start_backup | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
INT64 * | db_creation, | ||
FILEIO_BACKUP_LEVEL | backup_level, | ||
LOG_LSA * | backup_start_lsa, | ||
LOG_LSA * | backup_ckpt_lsa, | ||
FILEIO_BACKUP_RECORD_INFO * | all_levels_info, | ||
FILEIO_BACKUP_SESSION * | session, | ||
FILEIO_ZIP_METHOD | zip_method, | ||
FILEIO_ZIP_LEVEL | zip_level | ||
) |
Definition at line 7155 of file file_io.c.
References fileio_backup_record_info::at_time, fileio_backup_header::bkpagesize, io_backup_session::bkup, fileio_backup_buffer::bkuphdr, fileio_backup_header::chkpt_lsa, CUBRID_MAGIC_DATABASE_BACKUP, CUBRID_MAGIC_MAX_LENGTH, fileio_backup_header::db_compatibility, fileio_backup_header::db_creation, fileio_backup_header::db_fullname, fileio_backup_header::db_iopagesize, fileio_backup_header::db_release, io_backup_session::dbfile, error(), fileio_abort_backup(), fileio_add_volume_to_backup_info(), FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_MINIMUM_NUM_PAGES, FILEIO_BACKUP_MINIMUM_NUM_PAGES_FULL_LEVEL, FILEIO_BACKUP_START_PAGE_ID, FILEIO_BACKUP_UNDEFINED_LEVEL, fileio_create_backup_volume(), FILEIO_DBVOLS_IO_PAGE_SIZE, FILEIO_FIRST_BACKUP_VOL_INFO, FILEIO_FULL_LEVEL_EXP, FILEIO_INITIAL_BACKUP_UNITS, fileio_write_backup_header(), FILEIO_ZIP_LZ4_METHOD, i, IO_PAGESIZE, fileio_backup_header::iopageid, fileio_backup_header::level, fileio_backup_db_buffer::level, LOG_DBCOPY_VOLID, fileio_backup_record_info::lsa, fileio_backup_db_buffer::lsa, LSA_COPY(), LSA_SET_NULL(), fileio_backup_header::magic, fileio_backup_buffer::name, NO_ERROR, NULL, NULL_VOLDES, fileio_backup_header::previnfo, rel_disk_compatible(), rel_release_string(), fileio_backup_header::start_lsa, fileio_backup_header::start_time, strncpy_bufsize, fileio_backup_header::unit_num, fileio_backup_buffer::vdes, fileio_backup_buffer::vlabel, fileio_backup_header::zip_level, and fileio_backup_header::zip_method.
Referenced by logpb_backup().
FILEIO_BACKUP_SESSION* fileio_start_restore | ( | THREAD_ENTRY * | thread_p, |
const char * | db_fullname, | ||
char * | backup_source, | ||
INT64 | match_dbcreation, | ||
PGLENGTH * | db_iopagesize, | ||
float * | db_compatibility, | ||
FILEIO_BACKUP_SESSION * | session, | ||
FILEIO_BACKUP_LEVEL | level, | ||
bool | authenticate, | ||
INT64 | match_bkupcreation, | ||
const char * | restore_verbose_file_path, | ||
bool | newvolpath | ||
) |
Definition at line 9264 of file file_io.c.
References io_backup_session::bkup, fileio_backup_buffer::bkuphdr, fileio_backup_header::db_compatibility, fileio_backup_header::db_iopagesize, fileio_continue_restore(), fileio_initialize_restore(), and NULL.
Referenced by fileio_list_restore(), and logpb_restore().
Definition at line 11503 of file file_io.c.
References ARG_FILE_LINE, ER_BO_CANNOT_CREATE_LINK, ER_ERROR_SEVERITY, ER_FAILED, er_set(), fileio_is_volume_exist(), and NO_ERROR.
Referenced by logpb_next_where_path().
int fileio_synchronize | ( | THREAD_ENTRY * | thread_p, |
int | vdes, | ||
const char * | vlabel, | ||
FILEIO_SYNC_OPTION | check_sync_dwb | ||
) |
Definition at line 4441 of file file_io.c.
References ARG_FILE_LINE, dwb_flush_force(), ER_FATAL_ERROR_SEVERITY, ER_IO_SYNC, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), fileio_is_permanent_volume_descriptor(), FILEIO_SYNC_ALSO_FLUSH_DWB, MONITOR_WAITING_THREAD, NO_ERROR, NULL_VOLDES, perfmon_inc_stat(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, PRM_ID_SUPPRESS_FSYNC, PSTAT_FILE_NUM_IOSYNCHES, pthread_mutex_lock, pthread_mutex_unlock, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by boot_dbparm_save_volume(), disk_format(), dwb_file_sync_helper(), dwb_flush_block(), dwb_load_and_recover_pages(), fileio_copy_volume(), fileio_dismount(), fileio_dismount_all(), fileio_dismount_volume(), fileio_finish_backup(), fileio_reset_volume(), fileio_synchronize_sys_volume(), fileio_synchronize_volume(), logpb_archive_active_log(), logpb_backup_for_volume(), logpb_checkpoint(), logpb_copy_database(), logpb_copy_volume(), logpb_flush_all_append_pages(), logpb_rename_all_volumes_files(), logpb_write_toflush_pages_to_archive(), and pwrite_with_injected_fault().
int fileio_synchronize_all | ( | THREAD_ENTRY * | thread_p, |
bool | include_log | ||
) |
Definition at line 4618 of file file_io.c.
References ARG_FILE_LINE, DB_PAGESIZE, dwb_flush_force(), ER_CSS_PTHREAD_MUTEX_UNLOCK, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_IO_READ, ER_IO_SYNC, ER_IO_WRITE, ER_IO_WRITE_OUT_OF_SPACE, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), er_stack_pop(), er_stack_push(), error(), fileio_compensate_flush(), FILEIO_GET_FILE_SIZE, fileio_get_volume_id(), fileio_get_volume_label(), fileio_get_volume_label_by_fd(), fileio_initialize_res(), fileio_os_write(), fileio_synchronize_sys_volume(), fileio_synchronize_volume(), fileio_traverse_permanent_volume(), fileio_traverse_system_volume(), free_and_init, IO_PAGESIZE, NO_ERROR, NULL, NULL_VOLID, fileio_page::page, PEEK, perfmon_inc_stat(), PSTAT_FILE_IOSYNC_ALL, PSTAT_FILE_NUM_IOREADS, PSTAT_FILE_NUM_IOWRITES, pthread_mutex_lock, pthread_mutex_unlock, rv, success(), and fileio_apply_function_arg::vol_id.
Referenced by boot_create_all_volumes(), dwb_create_internal(), fileio_compensate_flush(), fileio_finish_restore(), log_final(), log_recovery(), log_recreate(), log_rv_outside_noop_redo(), logpb_checkpoint(), logpb_fatal_error_internal(), and logpb_remove_archive_logs().
void fileio_unformat | ( | THREAD_ENTRY * | thread_p, |
const char * | vlabel | ||
) |
Definition at line 2721 of file file_io.c.
References fileio_unformat_and_rename(), and NULL.
Referenced by boot_remove_temp_volume(), boot_remove_unknown_temp_volumes(), disk_unformat(), dwb_create_internal(), dwb_destroy_internal(), dwb_load_and_recover_pages(), fileio_abort_backup(), fileio_copy_volume(), fileio_create(), fileio_format(), fileio_remove_all_backup(), la_remove_archive_logs(), log_recovery_notpartof_archives(), log_recovery_notpartof_volumes(), log_unformat_ahead_volumes(), logpb_archive_active_log(), logpb_copy_database(), logpb_delete(), logpb_remove_all_in_log_path(), logpb_remove_archive_logs_internal(), and logpb_rename_all_volumes_files().
void fileio_unformat_and_rename | ( | THREAD_ENTRY * | thread_p, |
const char * | vlabel, | ||
const char * | new_vlabel | ||
) |
Definition at line 2736 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_IO_RENAME_FAIL, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), fileio_dismount(), fileio_find_volume_descriptor_with_label(), MONITOR_WAITING_THREAD, NO_ERROR, NULL, NULL_VOLDES, os_rename_file(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by boot_reset_mk_after_restart_from_backup(), fileio_unformat(), logpb_remove_archive_logs_internal(), and tde_copy_keys_file().
FILEIO_LOCKF_TYPE fileio_unlock_la_dbname | ( | int * | lockf_vdes, |
char * | db_name, | ||
bool | clear_owner | ||
) |
Definition at line 1691 of file file_io.c.
References ARG_FILE_LINE, assert, assert_release, envvar_vardir_file(), ER_BO_DIRECTORY_DOESNOT_EXIST, ER_ERROR_SEVERITY, ER_IO_MOUNT_FAIL, er_log_debug, er_set(), er_set_with_oserror(), error(), fileio_close(), FILEIO_LOCKF, FILEIO_NOT_LOCKF, fileio_release_lock(), NO_ERROR, NULL, and NULL_VOLDES.
Referenced by la_unlock_dbname().
void* fileio_write | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd, | ||
void * | io_page_p, | ||
PAGEID | page_id, | ||
size_t | page_size, | ||
FILEIO_WRITE_MODE | write_mode | ||
) |
Definition at line 4150 of file file_io.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_IO_WRITE, ER_IO_WRITE_OUT_OF_SPACE, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), fileio_compensate_flush(), FILEIO_GET_FILE_SIZE, fileio_get_volume_label_by_fd(), fileio_os_write(), FILEIO_WRITE_DEFAULT_WRITE, MONITOR_WAITING_THREAD, NULL, PEEK, perfmon_inc_stat(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, PSTAT_FILE_NUM_IOWRITES, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by dwb_write_block(), fileio_format(), fileio_write_or_add_to_dwb(), fileio_write_restore(), fileio_writev(), logpb_archive_active_log(), logpb_copy_database(), logpb_write_page_to_disk(), logpb_write_toflush_pages_to_archive(), logpb_writev_append_pages(), and pgbuf_bcb_flush_with_wal().
int fileio_write_backup_info_entries | ( | FILE * | fp, |
int | which_bkvinf | ||
) |
Definition at line 11030 of file file_io.c.
References fileio_bkvinf_entry::bkvol_name, ER_FAILED, FILEIO_BACKUP_FULL_LEVEL, FILEIO_BACKUP_UNDEFINED_LEVEL, fileio_bkvinf_entry::link, NO_ERROR, NULL, and fileio_bkvinf_entry::unit_num.
Referenced by logpb_restore(), and logpb_update_backup_volume_info().
void* fileio_write_or_add_to_dwb | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd, | ||
FILEIO_PAGE * | io_page_p, | ||
PAGEID | page_id, | ||
size_t | page_size | ||
) |
Definition at line 4024 of file file_io.c.
References assert, dwb_add_page(), dwb_is_created(), FILEIO_CHECK_AND_INITIALIZE_VOLUME_HEADER_CACHE, fileio_is_volume_descriptor_equal(), fileio_traverse_permanent_volume(), fileio_write(), FILEIO_WRITE_DEFAULT_WRITE, FILEIO_WRITE_NO_COMPENSATE_WRITE, NO_ERROR, NULL, NULL_VOLDES, fileio_page_reserved::pageid, fileio_page::prv, fileio_apply_function_arg::vdes, fileio_page_reserved::volid, fileio_volinfo::volid, and VPID_SET.
Referenced by fileio_copy_volume(), fileio_expand_to(), fileio_format(), fileio_initialize_pages(), and fileio_reset_volume().
void* fileio_write_pages | ( | THREAD_ENTRY * | thread_p, |
int | vol_fd, | ||
char * | io_pages_p, | ||
PAGEID | page_id, | ||
int | num_pages, | ||
size_t | page_size, | ||
FILEIO_WRITE_MODE | write_mode | ||
) |
Definition at line 4314 of file file_io.c.
References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_IO_WRITE, er_log_debug, ER_MNT_WAITING_THREAD, ER_NOTIFICATION_SEVERITY, er_set(), er_set_with_oserror(), fileio_compensate_flush(), FILEIO_GET_FILE_SIZE, fileio_get_volume_label_by_fd(), fileio_os_write(), FILEIO_WRITE_DEFAULT_WRITE, MONITOR_WAITING_THREAD, NULL, PEEK, perfmon_add_stat(), prm_get_integer_value(), PRM_ID_MNT_WAITING_THREAD, PSTAT_FILE_NUM_IOWRITES, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by dwb_flush_block(), logpb_archive_active_log(), and logpb_background_archiving().
void* fileio_writev | ( | THREAD_ENTRY * | thread_p, |
int | vdes, | ||
void ** | arrayof_io_pgptr, | ||
PAGEID | start_pageid, | ||
DKNPAGES | npages, | ||
size_t | page_size | ||
) |
Definition at line 4412 of file file_io.c.
References dwb_is_created(), fileio_write(), FILEIO_WRITE_DEFAULT_WRITE, FILEIO_WRITE_NO_COMPENSATE_WRITE, i, and NULL.