Skip to content

Expose OFlags::LARGEFILE#1020

Merged
sunfishcode merged 1 commit intobytecodealliance:mainfrom
oxalica:feat/oflags-largefile
Mar 27, 2024
Merged

Expose OFlags::LARGEFILE#1020
sunfishcode merged 1 commit intobytecodealliance:mainfrom
oxalica:feat/oflags-largefile

Conversation

@oxalica
Copy link
Contributor

@oxalica oxalica commented Feb 17, 2024

This flag can be reported by fcntl_getfl but is ignored currently. It is also used in FUSE requests. This should also simplify tests, but I don't have illumos platforms to test on.

@oxalica oxalica force-pushed the feat/oflags-largefile branch 2 times, most recently from b32f75e to 46cae06 Compare February 17, 2024 23:40
@sunfishcode
Copy link
Member

Rustix's current design is to transparently always set LARGEFILE internally, rather than have it be a flag that users have to set. Could you say more about what motivates this PR?

@oxalica
Copy link
Contributor Author

oxalica commented Mar 19, 2024

Rustix's current design is to transparently always set LARGEFILE internally

The motivation is to define it, so users can use it when they really want (when you are writing a FUSE server that process users' LARGEFILE flag, or if the user is rustix itself), and they can see its existence from fcntl_getfl rather than a magic hexadecimal number. Passing them transparently does not mean to hide their existence from all users.

@sunfishcode
Copy link
Member

Thinking about this more, I think you're right. We should add OFlags::LARGEFILE. It'd be good to document that it's not necessary for most users, as rustix functions set it automatically.

This flag can be reported by `fcntl_getfl` but is ignored currently.
It is also used in FUSE requests. But typical users do not need to care
about it since it will be added automatically by rustix and/or libc on
relevent calls.
@oxalica oxalica force-pushed the feat/oflags-largefile branch from 46cae06 to 83131ef Compare March 22, 2024 04:47
@oxalica
Copy link
Contributor Author

oxalica commented Mar 22, 2024

It'd be good to document that it's not necessary for most users, as rustix functions set it automatically.

Added.

@sunfishcode sunfishcode merged commit 7077238 into bytecodealliance:main Mar 27, 2024
@sunfishcode
Copy link
Member

Thanks!

@oxalica oxalica deleted the feat/oflags-largefile branch March 27, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants