Fix positional I/O support for largefiles

Commit 335ccb40 introduced positional I/O support for the fileserver,
but didn't handle the largefile versions of preadv and pwritev. As a
result, the fileserver cannot handle files of more than 2Gb in size.

Fix this by using preadv64 and pwritev64 where O_LARGEFILE is defined,
in the same way as for all other I/O primitives.

Change-Id: Ia9f6411d0c8115176e1ec42dd9f72c96ba939bab
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-on: http://gerrit.openafs.org/4152
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Ryan C. Underwood 2011-03-06 10:40:53 +00:00 committed by Derrick Brashear
parent 98a0c2f47b
commit bbf406da30

View File

@ -528,8 +528,13 @@ extern afs_sfsize_t ih_size(FD_t);
#endif #endif
#ifdef HAVE_PIOV #ifdef HAVE_PIOV
#ifdef O_LARGEFILE
#define FDH_PREADV(H, I, N, O) preadv64((H)->fd_fd, I, N, O)
#define FDH_PWRITEV(H, I, N, O) pwritev64((H)->fd_fd, I, N, O)
#else /* !O_LARGEFILE */
#define FDH_PREADV(H, I, N, O) preadv((H)->fd_fd, I, N, O) #define FDH_PREADV(H, I, N, O) preadv((H)->fd_fd, I, N, O)
#define FDH_PWRITEV(H, I, N, O) pwritev((H)->fd_fd, I, N, O) #define FDH_PWRITEV(H, I, N, O) pwritev((H)->fd_fd, I, N, O)
#endif /* !O_LARGEFILE */
#endif #endif
#define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O) #define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O)