You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/10/18 18:35:50 UTC
svn commit: r1533543 - in
/subversion/branches/log-addressing/subversion/libsvn_fs_fs: cached_data.c
pack.c
Author: stefan2
Date: Fri Oct 18 16:35:50 2013
New Revision: 1533543
URL: http://svn.apache.org/r1533543
Log:
On the log-addressing branch:
Replace magic numbers with recently introduced variable.
* subversion/libsvn_fs_fs/cached_data.c
(auto_select_stream): use SVN__LINE_CHUNK_SIZE
* subversion/libsvn_fs_fs/pack.c
(store_items): ditto
Suggested by: philip
Modified:
subversion/branches/log-addressing/subversion/libsvn_fs_fs/cached_data.c
subversion/branches/log-addressing/subversion/libsvn_fs_fs/pack.c
Modified: subversion/branches/log-addressing/subversion/libsvn_fs_fs/cached_data.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_fs_fs/cached_data.c?rev=1533543&r1=1533542&r2=1533543&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_fs_fs/cached_data.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_fs_fs/cached_data.c Fri Oct 18 16:35:50 2013
@@ -26,6 +26,7 @@
#include "svn_hash.h"
#include "svn_ctype.h"
+#include "private/svn_io_private.h"
#include "private/svn_temp_serializer.h"
#include "fs_fs.h"
@@ -2439,7 +2440,8 @@ auto_select_stream(svn_stream_t **stream
fs_fs_data_t *ffd = fs->fsap_data;
/* Item parser might be crossing block boundaries? */
- if (((entry->offset + entry->size + 80) ^ entry->offset) >= ffd->block_size)
+ if (((entry->offset + entry->size + SVN__LINE_CHUNK_SIZE) ^ entry->offset)
+ >= ffd->block_size)
{
/* Parsing items that cross block boundaries will cause the file
buffer to be re-read and misaligned. So, read the whole block
Modified: subversion/branches/log-addressing/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_fs_fs/pack.c?rev=1533543&r1=1533542&r2=1533543&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/log-addressing/subversion/libsvn_fs_fs/pack.c Fri Oct 18 16:35:50 2013
@@ -27,6 +27,7 @@
#include "private/svn_temp_serializer.h"
#include "private/svn_subr_private.h"
#include "private/svn_string_private.h"
+#include "private/svn_io_private.h"
#include "fs_fs.h"
#include "pack.h"
@@ -877,7 +878,9 @@ store_items(pack_context_t *context,
Take special care of textual noderevs since their parsers may
prefetch up to 80 bytes and we don't want them to cross block
boundaries. */
- safety_margin = entry->type == SVN_FS_FS__ITEM_TYPE_NODEREV ? 80 : 0;
+ safety_margin = entry->type == SVN_FS_FS__ITEM_TYPE_NODEREV
+ ? SVN__LINE_CHUNK_SIZE
+ : 0;
SVN_ERR(auto_pad_block(context, entry->size + safety_margin, iterpool));
/* select the item in the source file and copy it into the target