[OpenAFS] Re: Large files with 1.6.0pre2

Derrick Brashear shadow@dementia.org
Sat, 5 Mar 2011 22:54:17 -0500


do we know that all the platforms we support large files on deal with this c=
orrectly? I'd bet not.

Derrick


On Mar 5, 2011, at 10:41 PM, Russ Allbery <rra@stanford.edu> wrote:

> "Ryan C. Underwood" <nemesis-lists@icequake.net> writes:
>=20
>> Yes, this was exactly it.  Attached patch fixes the issue.=20
>=20
>> --- 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.249=
105924 -0600
>> @@ -528,8 +526,13 @@
>> #endif
>>=20
>> #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
>>=20
>> #define FDH_PREAD(H, B, S, O) OS_PREAD((H)->fd_fd, B, S, O)
>=20
> This begs the question of why __USE_FILE_OFFSET64 is not being defined,
> which would make this unnecessary.  This is defined on Linux if
> _FILE_OFFSET_BITS is defined to 64, which presumably we indeed want to
> define.
>=20
> The normal way to do this is with the Autoconf macro AC_SYS_LARGEFILE,
> which indeed we're not using.  Is there any reason why not, or should we
> just add it?
>=20
> I'm not sure what we were doing before.  I thought maybe we accidentally
> dropped some setting when we switched to AC_USE_SYSTEM_EXTENSIONS, but I
> looked at 129b6954a6f491c6f3c3e417055bdc68d4726408 and don't see anything
> there that would have been related.
>=20
> --=20
> Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>=

> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info