implement fdatasync

Change-Id: I2aefc1acebce93a2c53a6d3be5eef3b9e69480ec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8507
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Pascal Abresch
2025-07-07 15:20:18 +00:00
committed by waddlesplash
parent 258fce50e0
commit 8e086795b2
29 changed files with 51 additions and 43 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ extern int _kern_open_dir_entry_ref(dev_t device, ino_t inode,
extern int _kern_open_dir(int fd, const char *path);
extern int _kern_open_parent_dir(int fd, char *name,
size_t nameLength);
extern status_t _kern_fsync(int fd);
extern status_t _kern_fsync(int fd, bool dataOnly);
extern off_t _kern_seek(int fd, off_t pos, int seekType);
extern status_t _kern_create_dir_entry_ref(dev_t device, ino_t inode,
const char *name, int perms);
+1 -1
View File
@@ -150,7 +150,7 @@ struct fs_vnode_ops {
uint8 event, selectsync* sync);
status_t (*deselect)(fs_volume* volume, fs_vnode* vnode, void* cookie,
uint8 event, selectsync* sync);
status_t (*fsync)(fs_volume* volume, fs_vnode* vnode);
status_t (*fsync)(fs_volume* volume, fs_vnode* vnode, bool dataOnly);
status_t (*read_symlink)(fs_volume* volume, fs_vnode* link, char* buffer,
size_t* _bufferSize);
+2 -1
View File
@@ -72,7 +72,7 @@
#define _POSIX_SPAWN (200809L)
#define _POSIX_SPIN_LOCKS (-1)
#define _POSIX_SPORADIC_SERVER (-1)
#define _POSIX_SYNCHRONIZED_IO (-1) /* missing fdatasync() */
#define _POSIX_SYNCHRONIZED_IO (200809L)
#define _POSIX_THREAD_ATTR_STACKADDR (200809L)
#define _POSIX_THREAD_ATTR_STACKSIZE (200809L)
#define _POSIX_THREAD_CPUTIME (200809L)
@@ -401,6 +401,7 @@ extern off_t lseek(int fd, off_t offset, int whence);
extern void sync(void);
extern int fsync(int fd);
extern int fdatasync(int fd);
extern int chown(const char *path, uid_t owner, gid_t group);
extern int fchown(int fd, uid_t owner, gid_t group);
+1 -1
View File
@@ -165,7 +165,7 @@ struct fssh_fs_vnode_ops {
fssh_fs_cookie cookie, uint8_t event, fssh_selectsync *sync);
fssh_status_t (*deselect)(fssh_fs_volume *volume, fssh_fs_vnode *vnode,
fssh_fs_cookie cookie, uint8_t event, fssh_selectsync *sync);
fssh_status_t (*fsync)(fssh_fs_volume *volume, fssh_fs_vnode *vnode);
fssh_status_t (*fsync)(fssh_fs_volume *volume, fssh_fs_vnode *vnode, bool dataOnly);
fssh_status_t (*read_symlink)(fssh_fs_volume *volume, fssh_fs_vnode *link,
char *buffer, fssh_size_t *_bufferSize);
+1 -1
View File
@@ -185,7 +185,7 @@ int _user_open_dir_entry_ref(dev_t device, ino_t inode,
int _user_open_dir(int fd, const char *path);
int _user_open_parent_dir(int fd, char *name, size_t nameLength);
status_t _user_fcntl(int fd, int op, size_t argument);
status_t _user_fsync(int fd);
status_t _user_fsync(int fd, bool dataOnly);
status_t _user_flock(int fd, int op);
status_t _user_read_stat(int fd, const char *path, bool traverseLink,
struct stat *stat, size_t statSize);
+1 -1
View File
@@ -278,7 +278,7 @@ extern int _kern_open_dir(int fd, const char *path);
extern int _kern_open_parent_dir(int fd, char *name,
size_t nameLength);
extern status_t _kern_fcntl(int fd, int op, size_t argument);
extern status_t _kern_fsync(int fd);
extern status_t _kern_fsync(int fd, bool dataOnly);
extern status_t _kern_flock(int fd, int op);
extern off_t _kern_seek(int fd, off_t pos, int seekType);
extern status_t _kern_create_dir_entry_ref(dev_t device, ino_t inode,