Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rework file stat handling to simplify and cross-platform-ability #570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
funny-falcon merged 2 commits into REL_2_6 from REL_2_6_rework_stat
Nov 16, 2022

Conversation

Copy link
Collaborator

@funny-falcon funny-falcon commented Nov 16, 2022

  • 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.

PIO_KIND_FIFO = 4,
PIO_KIND_SOCK = 5,
PIO_KIND_CHARDEV = 6,
PIO_KIND_BLOCKDEV = 7,
Copy link

@fukanchik fukanchik Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

запятая в последнем элементе enum - это C99? документация postgres говорит - "at least C89-compliant".

src/archive.c Outdated
structstat st;
pio_stat_t st;
int partial_try_count = 0;
ssize_t partial_file_size = 0;
Copy link

@fukanchik fukanchik Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partial_file_size тоже должен стать беззнаковым

pthread_t *threads;
validate_files_arg *threads_args;
int i;
err_i err;
Copy link

@fukanchik fukanchik Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужно ли сюда FOBJ_FUNC_ARP или того, который в main достаточно?

Copy link
Collaborator Author

@funny-falcon funny-falcon Nov 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В принципе, достаточно, т.к. если будет ошибка, то мы вывалимся.

...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.
@funny-falcon funny-falcon merged commit d78283c into REL_2_6 Nov 16, 2022
@Burus Burus added this to the 2.6.0 milestone Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@fukanchik fukanchik fukanchik left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
2.6.0
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /