Add new options for Linux's fallocate(2) #1681
Conversation
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.
Any way to trigger the testers without ammending and pushing? |
Auto-tester automatically rebuilds the PRs from time to time, but unfortunately CircleCi doesn't. |
Thanks, I just gave it a go! |
It seems this didn't work either :S |
Rebased on master and now all tests (except autotester which is running) are passing. |
Ping @jmdavis @schveiguy this looks good to go. |
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.
I guess we should add FALLOC_FL_UNSHARE_RANGE
as well?
src/core/sys/linux/fcntl.d
Outdated
FALLOC_FL_NO_HIDE_STALE = 0x04, | ||
FALLOC_FL_COLLAPSE_RANGE = 0x08, | ||
FALLOC_FL_ZERO_RANGE = 0x10, | ||
FALLOC_FL_INSERT_RANGE = 0x20 |
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.
Looking at https://github.com/torvalds/linux/blob/v4.11/include/uapi/linux/falloc.h, it seems that
FALLOC_FL_UNSHARE_RANGE 0x40
has been added in the meantime.
It was added in October 2016: torvalds/linux@71be6b4
Yup, good point, will add during the day.
…On 11 May 2017 10:42 am, "Sebastian Wilzbach" ***@***.***> wrote:
***@***.**** requested changes on this pull request.
I guess we should add FALLOC_FL_UNSHARE_RANGE as well?
------------------------------
In src/core/sys/linux/fcntl.d
<#1681 (comment)>:
> @@ -10,7 +10,10 @@ nothrow:
enum {
FALLOC_FL_KEEP_SIZE = 0x01,
FALLOC_FL_PUNCH_HOLE = 0x02,
- FALLOC_FL_NO_HIDE_STALE = 0x04
+ FALLOC_FL_NO_HIDE_STALE = 0x04,
+ FALLOC_FL_COLLAPSE_RANGE = 0x08,
+ FALLOC_FL_ZERO_RANGE = 0x10,
+ FALLOC_FL_INSERT_RANGE = 0x20
Looking at https://github.com/torvalds/linux/blob/v4.11/include/uapi/
linux/falloc.h, it seems that
FALLOC_FL_UNSHARE_RANGE 0x40
has been added in the meantime.
It was added in October 2016: ***@***.***
<torvalds/linux@71be6b4>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1681 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA9wef2wILWECXZyPX0x587bQF_HdLvWks5r4snvgaJpZM4KeFl_>
.
|
Linux's fallocate in the kernels newer than 3.15 brings three new options: FALLOC_FL_COLLAPSE_RANGE FALLOC_FL_ZERO_RANGE FALLOC_FL_INSERT_RANGE which are now defined in fcntl.d
Updated! |
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.
LGTM, thanks!
@ other reviewers, for convenience the |
Ha, thanks! I forgot about this one :- |
Same here. Let's get this in then! |
Linux's fallocate in the kernels newer than 3.15
brings three new options:
FALLOC_FL_COLLAPSE_RANGE
FALLOC_FL_ZERO_RANGE
FALLOC_FL_INSERT_RANGE
which are now defined in fcntl.d