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