Skip to content

Commit

Permalink
Version 6.2.5.72
Browse files Browse the repository at this point in the history
- Fixed a bug which could result in the UDS index issuing I/O while
  suspended.
  • Loading branch information
corwin committed Aug 10, 2021
1 parent ce82ed9 commit 0be1cd3
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
8 changes: 4 additions & 4 deletions kvdo.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%define spec_release 1
%define kmod_name kvdo
%define kmod_driver_version 6.2.5.71
%define kmod_driver_version 6.2.5.72
%define kmod_rpm_release %{spec_release}
%define kmod_kernel_version 3.10.0-693.el7

Expand Down Expand Up @@ -96,6 +96,6 @@ rm -rf $RPM_BUILD_ROOT
%{_usr}/src/%{kmod_name}-%{version}

%changelog
* Thu Aug 05 2021 - Red Hat VDO Team <[email protected]> - 6.2.5.71-1
- Reduced context switches when a vdo is idle.

* Tue Aug 10 2021 - Red Hat VDO Team <[email protected]> - 6.2.5.72-1
- Fixed a bug which could result in the UDS index issuing I/O while
suspended.
2 changes: 1 addition & 1 deletion uds/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
UDS_VERSION = 8.0.3.38
UDS_VERSION = 8.0.3.39

SOURCES = $(notdir $(wildcard $(src)/*.c)) murmur/MurmurHash3.c
SOURCES += $(addprefix util/,$(notdir $(wildcard $(src)/util/*.c)))
Expand Down
27 changes: 23 additions & 4 deletions uds/indexSession.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/jasper/src/uds/indexSession.c#10 $
* $Id: //eng/uds-releases/jasper/src/uds/indexSession.c#11 $
*/

#include "indexSession.h"
Expand Down Expand Up @@ -216,6 +216,7 @@ int makeEmptyIndexSession(struct uds_index_session **indexSessionPtr)
int udsSuspendIndexSession(struct uds_index_session *session, bool save)
{
int result;
bool flushIndex = false;
bool saveIndex = false;
bool suspendIndex = false;
lockMutex(&session->requestMutex);
Expand All @@ -233,13 +234,21 @@ int udsSuspendIndexSession(struct uds_index_session *session, bool save)
suspendIndex = true;
result = UDS_SUCCESS;
} else if (!(session->state & IS_FLAG_LOADED)) {
session->state |= IS_FLAG_SUSPENDED;
broadcastCond(&session->requestCond);
if (session->router != NULL) {
flushIndex = true;
session->state |= IS_FLAG_WAITING;
} else {
session->state |= IS_FLAG_SUSPENDED;
broadcastCond(&session->requestCond);
}
result = UDS_SUCCESS;
} else {
saveIndex = save;
if (saveIndex) {
session->state |= IS_FLAG_WAITING;
} else if (session->router != NULL) {
flushIndex = true;
session->state |= IS_FLAG_WAITING;
} else {
session->state |= IS_FLAG_SUSPENDED;
broadcastCond(&session->requestCond);
Expand All @@ -248,7 +257,17 @@ int udsSuspendIndexSession(struct uds_index_session *session, bool save)
}
unlockMutex(&session->requestMutex);

if (!saveIndex && !suspendIndex) {
if (!saveIndex && !suspendIndex && !flushIndex) {
return result;
}

if (flushIndex) {
result = udsFlushIndexSession(session);
lockMutex(&session->requestMutex);
session->state &= ~IS_FLAG_WAITING;
session->state |= IS_FLAG_SUSPENDED;
broadcastCond(&session->requestCond);
unlockMutex(&session->requestMutex);
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion vdo/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VDO_VERSION = 6.2.5.71
VDO_VERSION = 6.2.5.72

VDO_VERSION_MAJOR = $(word 1,$(subst ., ,$(VDO_VERSION)))
VDO_VERSION_MINOR = $(word 2,$(subst ., ,$(VDO_VERSION)))
Expand Down

0 comments on commit 0be1cd3

Please sign in to comment.