mirror of
https://github.com/postgres/postgres.git
synced 2025-11-15 03:41:20 +03:00
Provide helper for retrying partial vectored I/O.
compute_remaining_iovec() is a re-usable routine for retrying after pg_readv() or pg_writev() reports a short transfer. This will gain new users in a later commit, but can already replace the open-coded equivalent code in the existing pg_pwritev_with_retry() function. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi> Discussion: https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com
This commit is contained in:
@@ -46,6 +46,11 @@ extern PGFileType get_dirent_type(const char *path,
|
||||
bool look_through_symlinks,
|
||||
int elevel);
|
||||
|
||||
extern int compute_remaining_iovec(struct iovec *destination,
|
||||
const struct iovec *source,
|
||||
int iovcnt,
|
||||
size_t transferred);
|
||||
|
||||
extern ssize_t pg_pwritev_with_retry(int fd,
|
||||
const struct iovec *iov,
|
||||
int iovcnt,
|
||||
|
||||
Reference in New Issue
Block a user