Browse Source

dfs: Read at the aligned position

The position is anyway aligned in BlockBasedFile, so this is no-op.

Change-Id: Iba037e0ecff339393dd2c03fc5ae4fe858031e4f
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
next
Masaya Suzuki 5 years ago
parent
commit
46678b303c
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java

3
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java

@ -412,8 +412,7 @@ public final class DfsBlockCache {
getStat(statMiss, key).incrementAndGet();
boolean credit = true;
try {
v = file.readOneBlock(requestedPosition, ctx,
fileChannel.get());
v = file.readOneBlock(position, ctx, fileChannel.get());
credit = false;
} finally {
if (credit) {

Loading…
Cancel
Save