Skip to content
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

Fix for errno not being set by posix_fallocate() #1023

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 15, 2021

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


We switched from fallocate( to posix_fallocate()to enhance compatibility to very old kernels (see https://github.com/pi-hole/FTL/issues/977). Unfortunately, this had an unintended side-effect of not catching errors correctly aserrnois not set byposix_fallocate()` (in contrast to fallocte() who did set it).

This PR fixes this by using the return value instead of errno which is what you should do with posix_... routines.

…cte() who did set it.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pihole-randomly-hangs/42963/3

@DL6ER DL6ER enabled auto-merge January 15, 2021 17:51
@DL6ER DL6ER merged commit a5cb6f0 into development Jan 15, 2021
@DL6ER DL6ER deleted the fix/posix_fallocate_return branch January 15, 2021 18:04
@DL6ER DL6ER mentioned this pull request Jan 15, 2021
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-core-v5-2-3-web-v5-3-and-ftl-v5-4-released/43009/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants