POSIX: add posix_fallocate and a preallocate syscall
the preallocate syscall will call the preallocate filesystem hook, if available. fix #6285 Change-Id: Ifff4595548610c8e009d4e5ffb64c37e0884e62d Reviewed-on: https://review.haiku-os.org/c/haiku/+/3382 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
@@ -99,6 +99,7 @@ extern int openat(int fd, const char *path, int openMode, ...);
|
||||
extern int fcntl(int fd, int op, ...);
|
||||
|
||||
extern int posix_fadvise(int fd, off_t offset, off_t len, int advice);
|
||||
extern int posix_fallocate(int fd, off_t offset, off_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -252,6 +252,7 @@ int _user_dup(int fd);
|
||||
int _user_dup2(int ofd, int nfd);
|
||||
status_t _user_lock_node(int fd);
|
||||
status_t _user_unlock_node(int fd);
|
||||
status_t _user_preallocate(int fd, off_t offset, off_t length);
|
||||
|
||||
/* socket user prototypes (implementation in socket.cpp) */
|
||||
int _user_socket(int family, int type, int protocol);
|
||||
|
||||
@@ -338,6 +338,7 @@ extern status_t _kern_lock_node(int fd);
|
||||
extern status_t _kern_unlock_node(int fd);
|
||||
extern status_t _kern_get_next_fd_info(team_id team, uint32 *_cookie,
|
||||
struct fd_info *info, size_t infoSize);
|
||||
extern status_t _kern_preallocate(int fd, off_t offset, off_t length);
|
||||
|
||||
// socket functions
|
||||
extern int _kern_socket(int family, int type, int protocol);
|
||||
|
||||
Reference in New Issue
Block a user