]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix positional I/O support for largefiles
authorRyan C. Underwood <nemesis@icequake.net>
Sun, 6 Mar 2011 10:40:53 +0000 (10:40 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Mar 2011 04:26:35 +0000 (20:26 -0800)
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.

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>
(cherry picked from commit bbf406da30428a22b4a6d28a7d36dbb786013cfa)

Change-Id: I5d15097e4c9aa83444520628f484407d244ddf97
Reviewed-on: http://gerrit.openafs.org/4161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/ihandle.h

index 90292a174f16b205a883dafb7513c34cc04da41d..3f863cd2ec7db2ed7b2d29953706f5735fdd27a5 100644 (file)
@@ -528,8 +528,13 @@ extern afs_sfsize_t ih_size(FD_t);
 #endif
 
 #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_PWRITEV(H, I, N, O) pwritev((H)->fd_fd, I, N, O)
+#endif /* !O_LARGEFILE */
 #endif
 
 #define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O)