Skip to content

Commit

Permalink
Version 6.1.2.38
Browse files Browse the repository at this point in the history
- Fixed more error path memory leaks.
- Fixed some potential initialization issues in the UDS module.
- Rebased to version 6.2.0 of the UDS module
- Improved counting of dedupe timeouts by including in the count queries
  which are not made due to their being a lack of resources from previous
  queries taking too long.
- Fixed a NULL pointer dereference if dmeventd registration fails.
- Fixed a bug in the statistics tracking partial I/Os.
- Allowed VDO backing devices to be specified by major:minor device number.
- Suppressed egregious read-only error logging.
  • Loading branch information
corwin committed Mar 20, 2019
1 parent be8e141 commit 5fb0af9
Show file tree
Hide file tree
Showing 457 changed files with 4,570 additions and 4,839 deletions.
6 changes: 3 additions & 3 deletions kvdo.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%define spec_release 1

%define kmod_name kvdo
%define kmod_driver_version 6.1.1.125
%define kmod_driver_version 6.1.2.38
%define kmod_rpm_release %{spec_release}
%define kmod_kernel_version 3.10.0-693.el7
%define kmod_headers_version %(rpm -qa kernel-devel | sed 's/^kernel-devel-//')
Expand Down Expand Up @@ -215,5 +215,5 @@ install -m 644 -D $PWD/obj/%{kmod_kbuild_dir}/Module.symvers $RPM_BUILD_ROOT/usr
rm -rf $RPM_BUILD_ROOT

%changelog
* Fri Sep 14 2018 - J. corwin Coburn <[email protected]> - 6.1.1.125-1
HASH(0x18fdb28)
* Tue Mar 19 2019 - J. corwin Coburn <[email protected]> - 6.1.2.38-1
HASH(0x17d6a10)
2 changes: 1 addition & 1 deletion uds/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UDS_VERSION = 6.1.1.27
UDS_VERSION = 6.2.0.77

SOURCES = $(notdir $(wildcard $(src)/*.c)) murmur/MurmurHash3.c
SOURCES += $(addprefix util/,$(notdir $(wildcard $(src)/util/*.c)))
Expand Down
2 changes: 1 addition & 1 deletion uds/accessMode.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/accessMode.h#2 $
* $Id: //eng/uds-releases/gloria/src/uds/accessMode.h#1 $
**/

#ifndef ACCESS_MODE_H
Expand Down
2 changes: 1 addition & 1 deletion uds/assertDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/kernelLinux/uds/assertDefs.h#3 $
* $Id: //eng/uds-releases/gloria/kernelLinux/uds/assertDefs.h#1 $
*/

#ifndef LINUX_KERNEL_ASSERT_DEFS_H
Expand Down
2 changes: 1 addition & 1 deletion uds/atomicDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/kernelLinux/uds/atomicDefs.h#1 $
* $Id: //eng/uds-releases/gloria/kernelLinux/uds/atomicDefs.h#2 $
*/

#ifndef LINUX_KERNEL_ATOMIC_DEFS_H
Expand Down
29 changes: 16 additions & 13 deletions uds/bits.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/bits.c#2 $
* $Id: //eng/uds-releases/gloria/src/uds/bits.c#1 $
*/

#include "bits.h"
Expand All @@ -39,11 +39,12 @@ enum { MAX_BIG_FIELD_BITS = (sizeof(uint64_t) - 1) * CHAR_BIT + 1 };
*
* @return the bit field
**/
static INLINE uint64_t getBigField(const byte *memory, uint64_t offset,
int size)
static INLINE uint64_t getBigField(const byte *memory,
uint64_t offset,
int size)
{
const uint64_t *addr = (const uint64_t *) (memory + offset / CHAR_BIT);
return (*addr >> (offset % CHAR_BIT)) & ((1UL << size) - 1);
const void *addr = memory + offset / CHAR_BIT;
return (getUInt64LE(addr) >> (offset % CHAR_BIT)) & ((1UL << size) - 1);
}

/**
Expand All @@ -59,10 +60,12 @@ static INLINE uint64_t getBigField(const byte *memory, uint64_t offset,
static INLINE void setBigField(uint64_t value, byte *memory, uint64_t offset,
int size)
{
uint64_t *addr = (uint64_t *) (memory + offset / CHAR_BIT);
void *addr = memory + offset / CHAR_BIT;
int shift = offset % CHAR_BIT;
*addr &= ~(((1UL << size) - 1) << shift);
*addr |= value << shift;
uint64_t data = getUInt64LE(addr);
data &= ~(((1UL << size) - 1) << shift);
data |= value << shift;
storeUInt64LE(addr, data);
}

/***********************************************************************/
Expand All @@ -71,7 +74,7 @@ void getBytes(const byte *memory, uint64_t offset, byte *destination, int size)
const byte *addr = memory + offset / CHAR_BIT;
int shift = offset % CHAR_BIT;
while (--size >= 0) {
*destination++ = *(const uint16_t *) addr++ >> shift;
*destination++ = getUInt16LE(addr++) >> shift;
}
}

Expand All @@ -82,8 +85,8 @@ void setBytes(byte *memory, uint64_t offset, const byte *source, int size)
int shift = offset % CHAR_BIT;
uint16_t mask = ~((uint16_t) 0xFF << shift);
while (--size >= 0) {
uint16_t *addr16 = (uint16_t *) (addr++);
*addr16 = (*addr16 & mask) | (*source++ << shift);
uint16_t data = (getUInt16LE(addr) & mask) | (*source++ << shift);
storeUInt16LE(addr++, data);
}
}

Expand All @@ -110,7 +113,7 @@ void moveBits(const byte *sMemory, uint64_t source, byte *dMemory,
const byte *src = sMemory + (source - offset) / CHAR_BIT;
byte *dest = dMemory + destination / CHAR_BIT;
while (size > MAX_BIG_FIELD_BITS) {
*(uint32_t *) dest = *(const uint64_t *) src >> offset;
storeUInt32LE(dest, getUInt64LE(src) >> offset);
src += sizeof(uint32_t);
dest += sizeof(uint32_t);
source += UINT32_BIT;
Expand All @@ -136,7 +139,7 @@ void moveBits(const byte *sMemory, uint64_t source, byte *dMemory,
src -= sizeof(uint32_t);
dest -= sizeof(uint32_t);
size -= UINT32_BIT;
*(uint32_t *) dest = *(const uint64_t *) src >> offset;
storeUInt32LE(dest, getUInt64LE(src) >> offset);
}
}
}
Expand Down
15 changes: 9 additions & 6 deletions uds/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/bits.h#2 $
* $Id: //eng/uds-releases/gloria/src/uds/bits.h#1 $
*/

#ifndef BITS_H
#define BITS_H 1

#include "compiler.h"
#include "numeric.h"
#include "typeDefs.h"

/*
Expand Down Expand Up @@ -71,8 +72,8 @@ enum { POST_FIELD_GUARD_BYTES = sizeof(uint64_t) - 1 };
static INLINE unsigned int getField(const byte *memory, uint64_t offset,
int size)
{
const uint32_t *addr = (const uint32_t *) (memory + offset / CHAR_BIT);
return (*addr >> (offset % CHAR_BIT)) & ((1 << size) - 1);
const void *addr = memory + offset / CHAR_BIT;
return (getUInt32LE(addr) >> (offset % CHAR_BIT)) & ((1 << size) - 1);
}

/**
Expand All @@ -88,10 +89,12 @@ static INLINE unsigned int getField(const byte *memory, uint64_t offset,
static INLINE void setField(unsigned int value, byte *memory, uint64_t offset,
int size)
{
uint32_t *addr = (uint32_t *) (memory + offset / CHAR_BIT);
void *addr = memory + offset / CHAR_BIT;
int shift = offset % CHAR_BIT;
*addr &= ~(((1 << size) - 1) << shift);
*addr |= value << shift;
uint32_t data = getUInt32LE(addr);
data &= ~(((1 << size) - 1) << shift);
data |= value << shift;
storeUInt32LE(addr, data);
}

/**
Expand Down
53 changes: 6 additions & 47 deletions uds/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/block.c#8 $
* $Id: //eng/uds-releases/gloria/src/uds/block.c#2 $
*/

#include "uds-block.h"
Expand All @@ -27,14 +27,15 @@
#include "uds-error.h"

/**********************************************************************/
int udsOpenBlockContext(UdsIndexSession session,
unsigned int metadataSize,
UdsBlockContext *context)
int udsOpenBlockContext(UdsIndexSession session,
unsigned int metadataSize __attribute__((unused)),
UdsBlockContext *context)
{
// XXX the metadataSize argument is unused and can be deleted
if (context == NULL) {
return UDS_CONTEXT_PTR_REQUIRED;
}
return openContext(session, metadataSize, &context->id);
return openContext(session, &context->id);
}

/**********************************************************************/
Expand Down Expand Up @@ -69,42 +70,6 @@ int udsStartChunkOperation(UdsRequest *request)
return launchAllocatedClientRequest((Request *) request);
}

/**********************************************************************/
int udsPostBlockName(UdsBlockContext context,
UdsCookie cookie,
UdsBlockAddress blockAddress,
const UdsChunkName *chunkName)
{
if (blockAddress == NULL) {
return UDS_BLOCK_ADDRESS_REQUIRED;
}
return launchClientRequest(context.id, UDS_POST, false, chunkName, cookie,
blockAddress);
}

/**********************************************************************/
int udsRegisterDedupeBlockCallback(UdsBlockContext context,
UdsDedupeBlockCallback callbackFunction,
void *callbackArgument)
{
return registerDedupeCallback(context.id, callbackFunction,
callbackArgument);
}

/**********************************************************************/
int udsSetBlockContextRequestQueueLimit(UdsBlockContext context,
unsigned int maxRequests)
{
return setRequestQueueLimit(context.id, maxRequests);
}

/**********************************************************************/
int udsGetBlockContextConfiguration(UdsBlockContext context,
UdsConfiguration *conf)
{
return getConfiguration(context.id, conf);
}

/**********************************************************************/
int udsGetBlockContextIndexStats(UdsBlockContext context,
UdsIndexStats *stats)
Expand All @@ -117,9 +82,3 @@ int udsGetBlockContextStats(UdsBlockContext context, UdsContextStats *stats)
{
return getContextStats(context.id, stats);
}

/**********************************************************************/
int udsResetBlockContextStats(UdsBlockContext context)
{
return resetStats(context.id);
}
2 changes: 1 addition & 1 deletion uds/blockIORegion.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/blockIORegion.c#3 $
* $Id: //eng/uds-releases/gloria/src/uds/blockIORegion.c#1 $
*/

#include "blockIORegion.h"
Expand Down
4 changes: 2 additions & 2 deletions uds/blockIORegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
* $Id: //eng/uds-releases/flanders/src/uds/blockIORegion.h#2 $
* $Id: //eng/uds-releases/gloria/src/uds/blockIORegion.h#1 $
*/

#ifndef BLOCK_IO_REGION_H
Expand All @@ -30,7 +30,7 @@
* Obtain access to a block-based subregion of an IORegion.
*
* @param [in] parent An underlying region to read and write from.
* @parent[in] access Access type (must be compatible with that of
* @param [in] access Access type (must be compatible with that of
* underlying region).
* @param [in] start Start of data region.
* @param [in] end End of data region.
Expand Down
Loading

0 comments on commit 5fb0af9

Please sign in to comment.