Skip to content

Commit

Permalink
Version 8.1.1.360
Browse files Browse the repository at this point in the history
- Fixed vdostats output issues.
- Removed incorrect assumptions about major device numbers in vdostats.
- Made improvements to the vdorecover script.
- Added a tool to make LVMVDO pools read/write so that support and
  debugging tools may access them.
  • Loading branch information
corwin committed Feb 12, 2022
1 parent e3f1b5b commit 0bbe708
Show file tree
Hide file tree
Showing 88 changed files with 539 additions and 204 deletions.
4 changes: 2 additions & 2 deletions utils/uds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/sulfur/src/packaging/src-dist/user/utils/uds/Makefile#20 $
# $Id: //eng/vdo-releases/sulfur/src/packaging/src-dist/user/utils/uds/Makefile#23 $

UDS_VERSION = 8.1.1.58
UDS_VERSION = 8.1.1.66
BUILD_VERSION = $(UDS_VERSION)
DISTRO_CODENAME := $(shell lsb_release -s -c)

Expand Down
13 changes: 12 additions & 1 deletion utils/uds/cachedChapterIndex.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/krusty/src/uds/cachedChapterIndex.c#20 $
* $Id: //eng/uds-releases/krusty/src/uds/cachedChapterIndex.c#21 $
*/

#include "cachedChapterIndex.h"
Expand Down Expand Up @@ -58,6 +58,17 @@ int initialize_cached_chapter_index(struct cached_chapter_index *chapter,
return UDS_SUCCESS;
}

/**********************************************************************/
void release_cached_chapter_index(struct cached_chapter_index *chapter)
{
if (chapter->volume_pages != NULL) {
unsigned int i;
for (i = 0; i < chapter->index_pages_count; i++) {
release_volume_page(&chapter->volume_pages[i]);
}
}
}

/**********************************************************************/
void destroy_cached_chapter_index(struct cached_chapter_index *chapter)
{
Expand Down
9 changes: 8 additions & 1 deletion utils/uds/cachedChapterIndex.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/krusty/src/uds/cachedChapterIndex.h#15 $
* $Id: //eng/uds-releases/krusty/src/uds/cachedChapterIndex.h#16 $
*/

#ifndef CACHED_CHAPTER_INDEX_H
Expand Down Expand Up @@ -106,6 +106,13 @@ int __must_check
initialize_cached_chapter_index(struct cached_chapter_index *chapter,
const struct geometry *geometry);

/**
* Release the all cached page data for a cached_chapter_index.
*
* @param chapter the chapter index cache entry to release
**/
void release_cached_chapter_index(struct cached_chapter_index *chapter);

/**
* Destroy a cached_chapter_index, freeing the memory allocated for the
* ChapterIndexPages and raw index page data.
Expand Down
16 changes: 11 additions & 5 deletions utils/uds/index.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/krusty/src/uds/index.c#73 $
* $Id: //eng/uds-releases/krusty/src/uds/index.c#74 $
*/


Expand Down Expand Up @@ -677,6 +677,12 @@ int save_index(struct uds_index *index)
return result;
}

/**********************************************************************/
int replace_index_storage(struct uds_index *index, const char *path)
{
return replace_volume_storage(index->volume, index->layout, path);
}

/**
* Search an index zone. This function is only correct for LRU.
*
Expand Down Expand Up @@ -1261,7 +1267,7 @@ struct uds_request_queue *select_index_queue(struct uds_index *index,
enum request_stage next_stage)
{
switch (next_stage) {
case STAGE_TRIAGE:
case STAGE_TRIAGE:
// The triage queue is only needed for multi-zone sparse
// indexes and won't be allocated by the index if not needed,
// so simply check for NULL.
Expand All @@ -1270,15 +1276,15 @@ struct uds_request_queue *select_index_queue(struct uds_index *index,
}
// Dense index or single zone, so route it directly to the zone
// queue.
fallthrough;
fallthrough;

case STAGE_INDEX:
case STAGE_INDEX:
request->zone_number =
get_volume_index_zone(index->volume_index,
&request->chunk_name);
fallthrough;

case STAGE_MESSAGE:
case STAGE_MESSAGE:
return index->zone_queues[request->zone_number];

default:
Expand Down
25 changes: 15 additions & 10 deletions utils/uds/index.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/krusty/src/uds/index.h#28 $
* $Id: //eng/uds-releases/krusty/src/uds/index.h#29 $
*/

#ifndef INDEX_H
Expand Down Expand Up @@ -125,16 +125,10 @@ int __must_check allocate_index(struct index_layout *layout,
struct uds_index **new_index);

/**
* Save an index.
* Save an index. The caller must ensure that there are no index requests in
* progress.
*
* Before saving an index and while saving an index, the caller must ensure
* that there are no index requests in progress.
*
* Some users follow save_index immediately with a free_index. But some tests
* use index_layout to modify the saved index. The index will then have
* some cached information that does not reflect these updates.
*
* @param index The index to save
* @param index The index to save
*
* @return UDS_SUCCESS if successful
**/
Expand All @@ -147,6 +141,17 @@ int __must_check save_index(struct uds_index *index);
**/
void free_index(struct uds_index *index);

/**
* Replace the existing index backing store with a different one.
*
* @param index The index
* @param path The path to the new backing store
*
* @return UDS_SUCCESS or an error code
**/
int __must_check replace_index_storage(struct uds_index *index,
const char *path);

/**
* Perform the index operation specified by the type field of a UDS request.
*
Expand Down
9 changes: 8 additions & 1 deletion utils/uds/indexLayout.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/krusty/src/uds/indexLayout.c#83 $
* $Id: //eng/uds-releases/krusty/src/uds/indexLayout.c#84 $
*/

#include "indexLayout.h"
Expand Down Expand Up @@ -1966,6 +1966,13 @@ int verify_uds_index_config(struct index_layout *layout,
return UDS_SUCCESS;
}

/**********************************************************************/
int replace_index_layout_storage(struct index_layout *layout,
const char *name)
{
return replace_uds_storage(layout->factory, name);
}

/**********************************************************************/
int open_uds_volume_region(struct index_layout *layout,
struct io_region **region_ptr)
Expand Down
13 changes: 12 additions & 1 deletion utils/uds/indexLayout.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/krusty/src/uds/indexLayout.h#34 $
* $Id: //eng/uds-releases/krusty/src/uds/indexLayout.h#35 $
*/

#ifndef INDEX_LAYOUT_H
Expand Down Expand Up @@ -84,6 +84,17 @@ make_uds_index_layout_from_factory(struct io_factory *factory,
**/
void put_uds_index_layout(struct index_layout *layout);

/**
* Replace the backing store for the layout.
*
* @param layout The layout
* @param name A name describing the new backing store
*
* @return UDS_SUCCESS or an error code
**/
int __must_check replace_index_layout_storage(struct index_layout *layout,
const char *name);

/**********************************************************************/
int __must_check cancel_uds_index_save(struct index_layout *layout,
unsigned int save_slot);
Expand Down
Loading

0 comments on commit 0bbe708

Please sign in to comment.