[OpenAFS] Re: Large files with 1.6.0pre2

Ryan C. Underwood nemesis@icequake.net
Sat, 5 Mar 2011 21:23:23 -0600

Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk"
Content-Disposition: inline

Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 05, 2011 at 08:10:42PM -0600, Ryan C. Underwood wrote:
> > More on pwritev().  Looks like there is not a 64-bit version of the call
> > per se.  But it sure looks like a wraparound issue of some sort.
> > http://lwn.net/Articles/311630/
> I stand corrected.  there is a 64-bit version.  Maybe some AFS compile
> time defines are wrong?  I foggily remember having these kinds of issues
> before, years ago, with other apps that were just becoming 64-bit aware.

Yes, this was exactly it.  Attached patch fixes the issue.=20

Ryan C. Underwood, <nemesis@icequake.net>

Content-Type: text/x-diff; charset=iso-8859-1
Content-Disposition: attachment; filename="1.6.0-pre2.largefile.patch"
Content-Transfer-Encoding: quoted-printable

--- temp/src/vol/ihandle.h	2011-03-05 21:04:16.885118383 -0600
+++ 1.6.0/openafs-1.6.0~pre2/src/vol/ihandle.h	2011-03-05 20:14:28.24910592=
4 -0600
@@ -528,8 +526,13 @@
 #ifdef HAVE_PIOV
+#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 */
 #define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O)


Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

Version: GnuPG v1.4.10 (GNU/Linux)