Commit 267a81eb authored by marko's avatar marko

branches/zip: Rename ut_ulonglong_align_down() and ut_ulonglong_align_up()

to ut_uint64_align_down() and ut_uint64_align_up(), to reflect the rename
of ib_ulonglong to ib_uint64_t in r1085.
parent 329a29c2
......@@ -152,8 +152,8 @@ ut_dulint_align_up(
Rounds a dulint downward to a multiple of a power of 2. */
UNIV_INLINE
ib_uint64_t
ut_ulonglong_align_down(
/*====================*/
ut_uint64_align_down(
/*=================*/
/* out: rounded value */
ib_uint64_t n, /* in: number to be rounded */
ulint align_no); /* in: align by this number
......@@ -162,8 +162,8 @@ ut_ulonglong_align_down(
Rounds ib_uint64_t upward to a multiple of a power of 2. */
UNIV_INLINE
ib_uint64_t
ut_ulonglong_align_up(
/*==================*/
ut_uint64_align_up(
/*===============*/
/* out: rounded value */
ib_uint64_t n, /* in: number to be rounded */
ulint align_no); /* in: align by this number
......
......@@ -264,8 +264,8 @@ ut_dulint_align_up(
Rounds ib_uint64_t downward to a multiple of a power of 2. */
UNIV_INLINE
ib_uint64_t
ut_ulonglong_align_down(
/*====================*/
ut_uint64_align_down(
/*=================*/
/* out: rounded value */
ib_uint64_t n, /* in: number to be rounded */
ulint align_no) /* in: align by this number
......@@ -281,8 +281,8 @@ ut_ulonglong_align_down(
Rounds ib_uint64_t upward to a multiple of a power of 2. */
UNIV_INLINE
ib_uint64_t
ut_ulonglong_align_up(
/*==================*/
ut_uint64_align_up(
/*===============*/
/* out: rounded value */
ib_uint64_t n, /* in: number to be rounded */
ulint align_no) /* in: align by this number
......
......@@ -1454,8 +1454,8 @@ loop:
log_group_write_buf(
group, log_sys->buf + area_start,
area_end - area_start,
ut_ulonglong_align_down(log_sys->written_to_all_lsn,
OS_FILE_LOG_BLOCK_SIZE),
ut_uint64_align_down(log_sys->written_to_all_lsn,
OS_FILE_LOG_BLOCK_SIZE),
start_offset - area_start);
log_group_set_fields(group, log_sys->write_lsn);
......@@ -2623,7 +2623,7 @@ loop:
if (limit_lsn >= log_sys->lsn) {
limit_lsn = ut_ulonglong_align_down(
limit_lsn = ut_uint64_align_down(
log_sys->lsn, OS_FILE_LOG_BLOCK_SIZE);
}
}
......@@ -2930,8 +2930,8 @@ log_archive_archivelog(void)
log_sys->archiving_state = LOG_ARCH_ON;
log_sys->archived_lsn
= ut_ulonglong_align_down(log_sys->lsn,
OS_FILE_LOG_BLOCK_SIZE);
= ut_uint64_align_down(log_sys->lsn,
OS_FILE_LOG_BLOCK_SIZE);
mutex_exit(&(log_sys->mutex));
return(DB_SUCCESS);
......@@ -3259,8 +3259,8 @@ log_check_log_recs(
(buf_pool->curr_size
- recv_n_pool_free_frames) * UNIV_PAGE_SIZE,
FALSE, scan_buf, end - start,
ut_ulonglong_align_down(buf_start_lsn,
OS_FILE_LOG_BLOCK_SIZE),
ut_uint64_align_down(buf_start_lsn,
OS_FILE_LOG_BLOCK_SIZE),
&contiguous_lsn, &scanned_lsn);
ut_a(scanned_lsn == buf_start_lsn + len);
......
......@@ -240,12 +240,12 @@ recv_truncate_group(
archived_lsn = checkpoint_lsn;
}
finish_lsn1 = ut_ulonglong_align_down(archived_lsn,
OS_FILE_LOG_BLOCK_SIZE)
finish_lsn1 = ut_uint64_align_down(archived_lsn,
OS_FILE_LOG_BLOCK_SIZE)
+ log_group_get_capacity(group);
finish_lsn2 = ut_ulonglong_align_up(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE)
finish_lsn2 = ut_uint64_align_up(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE)
+ recv_sys->last_log_buf_size;
if (limit_lsn != IB_ULONGLONG_MAX) {
......@@ -267,8 +267,8 @@ recv_truncate_group(
*(log_sys->buf + i) = '\0';
}
start_lsn = ut_ulonglong_align_down(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE);
start_lsn = ut_uint64_align_down(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE);
if (start_lsn != recovered_lsn) {
/* Copy the last incomplete log block to the log buffer and
......@@ -336,14 +336,14 @@ recv_copy_group(
ut_a(RECV_SCAN_SIZE <= log_sys->buf_size);
start_lsn = ut_ulonglong_align_down(group->scanned_lsn,
OS_FILE_LOG_BLOCK_SIZE);
start_lsn = ut_uint64_align_down(group->scanned_lsn,
OS_FILE_LOG_BLOCK_SIZE);
for (;;) {
end_lsn = start_lsn + RECV_SCAN_SIZE;
if (end_lsn > recovered_lsn) {
end_lsn = ut_ulonglong_align_up(
recovered_lsn, OS_FILE_LOG_BLOCK_SIZE);
end_lsn = ut_uint64_align_up(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE);
}
log_group_read_log_seg(LOG_RECOVER, log_sys->buf,
......@@ -386,9 +386,9 @@ recv_synchronize_groups(
/* Read the last recovered log block to the recovery system buffer:
the block is always incomplete */
start_lsn = ut_ulonglong_align_down(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE);
end_lsn = ut_ulonglong_align_up(recovered_lsn, OS_FILE_LOG_BLOCK_SIZE);
start_lsn = ut_uint64_align_down(recovered_lsn,
OS_FILE_LOG_BLOCK_SIZE);
end_lsn = ut_uint64_align_up(recovered_lsn, OS_FILE_LOG_BLOCK_SIZE);
ut_a(start_lsn != end_lsn);
......@@ -2665,8 +2665,8 @@ recv_recovery_from_checkpoint_start(
}
}
contiguous_lsn = ut_ulonglong_align_down(recv_sys->scanned_lsn,
OS_FILE_LOG_BLOCK_SIZE);
contiguous_lsn = ut_uint64_align_down(recv_sys->scanned_lsn,
OS_FILE_LOG_BLOCK_SIZE);
if (type == LOG_ARCHIVE) {
/* Try to recover the remaining part from logs: first from
the logs of the archived group */
......@@ -2919,7 +2919,7 @@ recv_reset_logs(
#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&(log_sys->mutex)));
#endif /* UNIV_SYNC_DEBUG */
log_sys->lsn = ut_ulonglong_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE);
log_sys->lsn = ut_uint64_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE);
group = UT_LIST_GET_FIRST(log_sys->log_groups);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment