rework file stat handling to simplify and cross-platform-ability#570
Merged
Conversation
fukanchik
reviewed
Nov 16, 2022
| PIO_KIND_FIFO = 4, | ||
| PIO_KIND_SOCK = 5, | ||
| PIO_KIND_CHARDEV = 6, | ||
| PIO_KIND_BLOCKDEV = 7, |
There was a problem hiding this comment.
запятая в последнем элементе enum - это C99? документация postgres говорит - "at least C89-compliant".
fukanchik
reviewed
Nov 16, 2022
| struct stat st; | ||
| pio_stat_t st; | ||
| int partial_try_count = 0; | ||
| ssize_t partial_file_size = 0; |
There was a problem hiding this comment.
partial_file_size тоже должен стать беззнаковым
fukanchik
reviewed
Nov 16, 2022
| pthread_t *threads; | ||
| validate_files_arg *threads_args; | ||
| int i; | ||
| err_i err; |
There was a problem hiding this comment.
нужно ли сюда FOBJ_FUNC_ARP или того, который в main достаточно?
Contributor
Author
There was a problem hiding this comment.
В принципе, достаточно, т.к. если будет ошибка, то мы вывалимся.
…ability - don't use full `struct stat` since it differs between platforms - store file kind separately from mode in pb specific way - add pioFilesAreSame as replacement of fio_is_same_file since it needs st_ino and st_dev, therefore had to run on localdrive always.
74367e6 to
0e24b62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
struct statsince it differs between platforms