[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1446113 - /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Thu, 14 Feb 2013 23:54:41 +0100

On Thu, Feb 14, 2013 at 1:13 PM, Bert Huijben <bert_at_qqmail.nl> wrote:

>
>
> > -----Original Message-----
> > From: stefan2_at_apache.org [mailto:stefan2_at_apache.org]
> > Sent: donderdag 14 februari 2013 11:58
> > To: commits_at_subversion.apache.org
> > Subject: svn commit: r1446113 - /subversion/branches/fsfs-
> > format7/subversion/libsvn_fs_fs/index.c
> >
> > Author: stefan2
> > Date: Thu Feb 14 10:58:15 2013
> > New Revision: 1446113
> >
> > URL: http://svn.apache.org/r1446113
> > Log:
> > On the fsfs-format7 branch: Prevent the packed number stream from
> > prefetching across block boundaries.
> >
> > * subversion/libsvn_fs_fs/index.c
> > (stream_error_create): new error construction utility
> > (packed_stream_read): limit the prefetch close to block boundaries
> >
> > Modified:
> > subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
> >
> > Modified: subversion/branches/fsfs-
> > format7/subversion/libsvn_fs_fs/index.c
> > URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-
> > format7/subversion/libsvn_fs_fs/index.c?rev=1446113&r1=1446112&r2=144
> > 6113&view=diff
> > ==========================================================
> > ====================
> > --- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c
> > (original)
> > +++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/index.c Thu
> > Feb 14 10:58:15 2013
> > @@ -170,6 +170,23 @@ typedef struct packed_number_stream_t
> > value_position_pair_t buffer[MAX_NUMBER_PREFETCH];
> > } packed_number_stream_t;
> >
> > +/* Return an svn_error_t * object for error ERR on STREAM with the given
> > + * MESSAGE string. The latter must have a placeholder for the index
> file
> > + * name ("%s") and the current read offset (e.g. "%lx").
> > + */
> > +static svn_error_t *
> > +stream_error_create(packed_number_stream_t *stream,
> > + apr_status_t err,
> > + const char *message)
> > +{
> > + const char *file_name;
> > + apr_off_t offset = 0;
> > + SVN_ERR(svn_io_file_name_get(&file_name, stream->file,
> > + stream->pool));
> > + SVN_ERR(svn_io_file_seek(stream->file, SEEK_CUR, &offset, stream-
> > >pool));
> > + return svn_error_createf(err, NULL, message, file_name, offset);
> > +}
>
> %lx handles 32 bit on Windows x86 and x64 as long is 32 bit there, while
> apr_off_t is 64 bit on these platforms.
> (Or is this special cased in apr or svn?)
>
> And I would recommend using 0x%<something> to make it obvious for readers
> of the message that the value is hexadecimal, without having to check the
> sourcecode.
>

Fixed in r1446377.

Thanks for the review!

-- Stefan^2.

-- 
Certified & Supported Apache Subversion Downloads:
*
http://www.wandisco.com/subversion/download
*
Received on 2013-02-14 23:55:14 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.