|
|
|
@ -2168,16 +2168,20 @@ os_file_pwrite( |
|
|
|
#else |
|
|
|
{ |
|
|
|
off_t ret_offset; |
|
|
|
# ifndef UNIV_HOTBACKUP |
|
|
|
ulint i; |
|
|
|
# endif /* !UNIV_HOTBACKUP */ |
|
|
|
|
|
|
|
os_mutex_enter(os_file_count_mutex); |
|
|
|
os_n_pending_writes++; |
|
|
|
os_mutex_exit(os_file_count_mutex); |
|
|
|
|
|
|
|
# ifndef UNIV_HOTBACKUP |
|
|
|
/* Protect the seek / write operation with a mutex */ |
|
|
|
i = ((ulint) file) % OS_FILE_N_SEEK_MUTEXES; |
|
|
|
|
|
|
|
os_mutex_enter(os_file_seek_mutexes[i]); |
|
|
|
# endif /* UNIV_HOTBACKUP */ |
|
|
|
|
|
|
|
ret_offset = lseek(file, offs, SEEK_SET); |
|
|
|
|
|
|
|
@ -2203,7 +2207,9 @@ os_file_pwrite( |
|
|
|
# endif /* UNIV_DO_FLUSH */ |
|
|
|
|
|
|
|
func_exit: |
|
|
|
# ifndef UNIV_HOTBACKUP |
|
|
|
os_mutex_exit(os_file_seek_mutexes[i]); |
|
|
|
# endif /* !UNIV_HOTBACKUP */ |
|
|
|
|
|
|
|
os_mutex_enter(os_file_count_mutex); |
|
|
|
os_n_pending_writes--; |
|
|
|
|