-
Notifications
You must be signed in to change notification settings - Fork 282
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
If tmp2 and final files are in same filesystem, rename() not copy() #314
Conversation
This fixes #313 , waiting on workflows to test windows applicability. |
reinterpret_cast. Add that.
Live-testing this change yields the following result (successful):
|
Anything else needed here? Who can provide feedback or approval? |
Requesting review - @hoffmang9 @wjblanke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've also verified that this works on Windows.
Can someone merge this? Is anything else needed? |
This is likely to take a bit broader testing and that's the only hesitation. Right this moment there are other things at a higher priority. Should it test well on BSD/MacOS both flavors, three FSs etc. |
Okay. It's very old libc calls, so I'm sure all UNIX/Linux variants and Mac OS (>9) will work the same, but I do not criticize at all your wanting to test it fully. Let me know if I can help. |
If I could get this in before the next chia-blockchain release, so its in there, that would be ideal. Is there anything I can do to help testing this? Just checking since it's been a few weeks here, happy to help if I can. |
Ping. Sorry to be a noodge, but just wanted to make sure there's a plan to get the required testing done and get this merged. Again, let me know if I can help. |
@rostislav @hoffmang9 Any status on this PR? |
This avoids potentially painful copies of large files within the same filesystem.
To note:
a) I'm a UNIX person, so I'm not sure if this will compile on Windows as coded. Directions welcome.
b) I didn't write a test for this, it appears all of the existing test only use files in the same directory. Is the copy codepath in CreatePlotDisk() tested somewhere?