Skip to content

Commit 2d48335

Browse files
PS-9734 merge: Code refresh for 8.0.42-33 (os_file_set_nocache() fix)
https://perconadev.atlassian.net/browse/PS-9734 Removed unused overload of 'os_file_set_nocache()' function. The return value type of the original function changed back to 'void' as in upstream.
1 parent 9650811 commit 2d48335

File tree

3 files changed

+3
-32
lines changed

3 files changed

+3
-32
lines changed

storage/innobase/include/os0file.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -816,22 +816,10 @@ null-terminated string
816816
@param[in] operation_name "open" or "create"; used in the diagnostic
817817
message
818818
@param[in] on_error_silent if true then don't print any message to the log
819-
@return true if operation is success and false */
820-
bool os_file_set_nocache(int fd, const char *file_name,
819+
*/
820+
void os_file_set_nocache(int fd, const char *file_name,
821821
const char *operation_name,
822822
bool on_error_silent = false);
823-
824-
/** Tries to disable OS caching on an opened file file.
825-
@param[in] file file to alter
826-
@param[in] file_name file name, used in the diagnostic message
827-
@param[in] name "open" or "create"; used in the diagnostic
828-
message
829-
@param[in] on_error_silent if true then don't print any message to the log
830-
@return true if operation is success and false */
831-
static inline bool os_file_set_nocache(pfs_os_file_t file,
832-
const char *file_name,
833-
const char *operation_name,
834-
bool on_error_silent = false);
835823
/** NOTE! Use the corresponding macro os_file_create(), not directly
836824
this function!
837825
Opens an existing file or creates a new.

storage/innobase/include/os0file.ic

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -524,17 +524,3 @@ static inline bool pfs_os_file_set_eof_at_func(pfs_os_file_t file, uint64_t new_
524524
}
525525

526526
#endif /* UNIV_PFS_IO */
527-
528-
/** Tries to disable OS caching on an opened file file.
529-
@param[in] file file to alter
530-
@param[in] file_name file name, used in the diagnostic message
531-
@param[in] name "open" or "create"; used in the diagnostic
532-
message
533-
@param[in] on_error_silent if true then don't print any message to the log
534-
@return true if operation is success and false */
535-
static inline bool os_file_set_nocache(pfs_os_file_t file, const char *file_name,
536-
const char *operation_name,
537-
bool on_error_silent) {
538-
return os_file_set_nocache(file.m_file, file_name, operation_name,
539-
on_error_silent);
540-
}

storage/innobase/os/os0file.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5513,7 +5513,7 @@ static bool os_file_handle_error_no_exit(const char *name,
55135513
os_file_handle_error_cond_exit(name, operation, false, on_error_silent));
55145514
}
55155515

5516-
bool os_file_set_nocache(int fd [[maybe_unused]],
5516+
void os_file_set_nocache(int fd [[maybe_unused]],
55175517
const char *file_name [[maybe_unused]],
55185518
const char *operation_name [[maybe_unused]],
55195519
bool on_error_silent [[maybe_unused]]) {
@@ -5527,7 +5527,6 @@ bool os_file_set_nocache(int fd [[maybe_unused]],
55275527
<< operation_name << ": " << strerror(errno_save)
55285528
<< ","
55295529
" continuing anyway.";
5530-
return false;
55315530
}
55325531
#elif defined(O_DIRECT)
55335532
if (fcntl(fd, F_SETFL, O_DIRECT) == -1 && !on_error_silent) {
@@ -5557,10 +5556,8 @@ bool os_file_set_nocache(int fd [[maybe_unused]],
55575556
<< "; " << operation_name << " : "
55585557
<< strerror(errno_save) << ", continuing anyway.";
55595558
}
5560-
return false;
55615559
}
55625560
#endif /* !(UNIV_SOLARIS && DIRECTIO_ON) && O_DIRECT */
5563-
return true;
55645561
}
55655562

55665563
bool os_file_set_size_fast(const char *name, pfs_os_file_t pfs_file,

0 commit comments

Comments
 (0)