FreeBSD: Clean up the use of ioflags

- Prefer O_* flags over F* flags that mostly mirror O_* flags anyway,
  but O_* flags seem to be preferred.
- Simplify the code as all the F*SYNC flags were defined as FFSYNC flag.
- Don't define FRSYNC flag, so we don't generate unnecessary ZIL commits.
- Remove EXCL define, FreeBSD ignores the excl argument for zfs_create()
  anyway.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Closes #13400
This commit is contained in:
Pawel Jakub Dawidek
2022-05-02 16:26:28 -07:00
committed by GitHub
parent 159c6fd154
commit a64d757aa4
4 changed files with 10 additions and 32 deletions
-8
View File
@@ -29,14 +29,6 @@
#include_next <sys/file.h>
#define FCREAT O_CREAT
#define FTRUNC O_TRUNC
#define FSYNC O_SYNC
#define FDSYNC O_DSYNC
#define FEXCL O_EXCL
#define FNODSYNC 0x10000 /* fsync pseudo flag */
#define FNOFOLLOW 0x20000 /* don't follow symlinks */
#define FIGNORECASE 0x80000 /* request case-insensitive lookups */
#endif