In tracking down issue 2453 (commits that create fsfs revfiles greater
than 2gigs crash and burn on linux) I noticed that we don't pass
APR_LARGEFILE to svn_io_file_open in all the places where we need to.
Specifically, we do in a few spots related to hotcopying stuff, but we
don't in fs_fs.c when we open potentially huge files like revfiles.
So I got to thinking, why not just have svn_io_file_open tack it on to
flags all the time, just like we do with APR_BINARY. I mean it's not
really going to hurt anything, it only has an effect on some Unix
systems, where it results in O_LARGEFILE being passed to open. I
suppose this could result in a miniscule performance hit, but the
alternative is strange hard to track down bugs whenever we
accidentally forget to pass this flag and open a file whose size can't
be represented in 31 bits. Note that the result of opening such a
file on linux seems to be receiving SIGXFSZ, which by default crashes
the process. Ick.
With this in mind, any objection to the following patch? When
combined with a fix to APR to correct the size of the filePtr member
of apr_file_t it completely fixes issue 2453.
-garrett
[[[
Pass APR_LARGEFILE to apr_file_open, since it has no real down side and
allows us to stop worrying about whether or not any given file is going
to be big enough to require it.
* subversion/libsvn_subr/io.c
(svn_io_open_file,
get_default_file_perms,
svn_io_open_unique_file2): APR_LARGEFILE, it does a body good.
]]]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 8 06:27:56 2006