Skip to content

Commit

Permalink
Version 8.3.0.70
Browse files Browse the repository at this point in the history
- Rebased for kernel version 6.9.
  • Loading branch information
lorelei-sakai committed May 1, 2024
1 parent e7a687d commit 59ad798
Show file tree
Hide file tree
Showing 200 changed files with 15,182 additions and 26,322 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ Other Contributors:
Adding vdo --version command, and documentation fixes
Francisco Vilmar Cardoso Ruviaro <[email protected]>
Typo corrections in vdo and uds
Yukari Chiba <[email protected]>
User tools support for riscv64
Yang Huang <[email protected]>
User tools support for loongarch64

VDO was originally created at Permabit Technology Corporation, and was
subsequently acquired and open-sourced by Red Hat.
Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/chlorine/src/packaging/src-dist/user/Makefile#1 $

INSTALL = install
INSTALLOWNER ?= -o root -g root
defaultdocdir ?= /usr/share/doc
name ?= vdo
INSTALLDIR=$(DESTDIR)/$(defaultdocdir)/$(name)
defaultdocdir ?= /usr/share/doc
defaultlicensedir ?= /usr/share/licenses
DOCDIR=$(DESTDIR)/$(defaultdocdir)/$(name)
LICENSEDIR=$(DESTDIR)/$(defaultlicensedir)/$(name)

SUBDIRS = examples utils

Expand All @@ -33,8 +34,8 @@ all clean:
done

install:
$(INSTALL) $(INSTALLOWNER) -d $(INSTALLDIR)
$(INSTALL) $(INSTALLOWNER) -m 644 COPYING $(INSTALLDIR)
$(INSTALL) $(INSTALLOWNER) -d $(DOCDIR)
$(INSTALL) $(INSTALLOWNER) -D -m 644 COPYING -t $(LICENSEDIR)
for d in $(SUBDIRS); do \
$(MAKE) -C $$d $@ || exit 1; \
done
7 changes: 3 additions & 4 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/chlorine/src/packaging/src-dist/user/examples/Makefile#1 $

SUBDIRS = monitor

Expand Down
9 changes: 4 additions & 5 deletions examples/monitor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/chlorine/src/packaging/src-dist/user/examples/monitor/Makefile#1 $

INSTALLFILES=monitor_check_vdostats_logicalSpace.pl \
monitor_check_vdostats_physicalSpace.pl \
monitor_check_vdostats_physicalSpace.pl \
monitor_check_vdostats_savingPercent.pl


Expand Down
8 changes: 3 additions & 5 deletions examples/monitor/monitor_check_vdostats_logicalSpace.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# monitor_check_vdostats_logicalSpace.pl [--warning <warn_pct>|-w <warn_pct>]
# [--critical <crit_pct>|-c <crit_pct>]
Expand All @@ -36,8 +36,6 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/chlorine/src/tools/monitor/monitor_check_vdostats_logicalSpace.pl#1 $
#
##

use strict;
Expand Down
8 changes: 3 additions & 5 deletions examples/monitor/monitor_check_vdostats_physicalSpace.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# monitor_check_vdostats_physicalSpace.pl [--warning <warn_pct>|-w <warn_pct>]
# [--critical <crit_pct>|-c <crit_pct>]
Expand All @@ -36,8 +36,6 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/chlorine/src/tools/monitor/monitor_check_vdostats_physicalSpace.pl#1 $
#
##

use strict;
Expand Down
8 changes: 3 additions & 5 deletions examples/monitor/monitor_check_vdostats_savingPercent.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# monitor_check_vdostats_savingPercent.pl [--warning <warn_pct>|-w <warn_pct>]
# [--critical <crit_pct>|-c <crit_pct>]
Expand All @@ -36,8 +36,6 @@
#
# The "vdostats" program must be in the path used by "sudo".
#
# $Id: //eng/vdo-releases/chlorine/src/tools/monitor/monitor_check_vdostats_savingPercent.pl#1 $
#
##

use strict;
Expand Down
8 changes: 3 additions & 5 deletions utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,18 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#

# $Id: //eng/vdo-releases/chlorine/src/packaging/src-dist/user/utils/Makefile#1 $

SUBDIRS = uds vdo

.PHONY: all clean install
Expand Down
33 changes: 11 additions & 22 deletions utils/uds/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# 02110-1301, USA.
#
# $Id: //eng/vdo-releases/chlorine/src/packaging/src-dist/user/utils/uds/Makefile#1 $

BUILD_VERSION = 8.2.2.2
BUILD_VERSION = 8.4.0.0

DEPDIR = .deps

Expand Down Expand Up @@ -56,58 +55,48 @@ GLOBAL_FLAGS = $(RPM_OPT_FLAGS) -D_GNU_SOURCE -g $(OPT_FLAGS) \
$(WARNS) $(shell getconf LFS_CFLAGS) $(DEBUG_FLAGS) \
-DCURRENT_VERSION='"$(BUILD_VERSION)"' \

CFLAGS = $(GLOBAL_FLAGS) -I. -std=gnu99 -pedantic $(C_WARNS) $(MY_CFLAGS)
CFLAGS = $(GLOBAL_FLAGS) -I. -std=gnu11 -pedantic $(C_WARNS) $(MY_CFLAGS)
LDFLAGS = $(RPM_LD_FLAGS) $(MY_LDFLAGS)

MY_FLAGS =
MY_CFLAGS = $(MY_FLAGS)
MY_LDFLAGS =

vpath %.c .
vpath %.c ./murmur

UDS_OBJECTS = murmurhash3.o \
buffer.o \
buffered-reader.o \
buffered-writer.o \
chapter-index.o \
UDS_OBJECTS = chapter-index.o \
config.o \
delta-index.o \
dm-bufio.o \
errors.o \
event-count.o \
fileIORegion.o \
fileUtils.o \
funnel-queue.o \
geometry.o \
hash-utils.o \
index.o \
index-layout.o \
index-page-map.o \
index-session.o \
ioFactory.o \
io-factory.o \
logger.o \
memoryAlloc.o \
minisyslog.o \
murmurhash3.o \
open-chapter.o \
page-cache.o \
permassert.o \
radix-sort.o \
random.o \
record-page.o \
requestQueue.o \
sparse-cache.o \
string-utils.o \
syscalls.o \
threadCondVar.o \
threadMutex.o \
threadSemaphore.o \
thread-utils.o \
time-utils.o \
uds-threads.o \
volume.o \
volume-index005.o \
volume-index006.o \
volume-index-ops.o \
volume-store.o
volume-index.o

.PHONY: all
all: libuds.a
Expand Down
48 changes: 41 additions & 7 deletions utils/uds/numericDefs.h → utils/uds/asm/unaligned.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,58 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
* 02110-1301, USA.
*/

#ifndef LINUX_USER_NUMERIC_DEFS_H
#define LINUX_USER_NUMERIC_DEFS_H 1
#ifndef ASM_UNALIGNED_H
#define ASM_UNALIGNED_H

#include <asm/byteorder.h>
#include <stdint.h>
#include <linux/types.h>

/* Type safe comparison macros, similar to the ones in linux/kernel.h. */

/*
* If pointers to types are comparable (without dereferencing them and
* potentially causing side effects) then types are the same.
*/
#define TYPECHECK(x, y) (!!(sizeof((typeof(x) *) 1 == (typeof(y) *) 1)))
#define CONSTCHECK(x, y) (__builtin_constant_p(x) && __builtin_constant_p(y))

/* It takes two levels of macro expansion to compose the unique temp names. */
#define CONCAT_(a, b) a##b
#define CONCAT(a, b) CONCAT_(a, b)
#define UNIQUE_ID(a) CONCAT(_UNIQUE_, CONCAT(a, __COUNTER__))

#define SAFE_COMPARE(x, y, unique_x, unique_y, op) \
__extension__({ \
typeof(x) unique_x = (x); \
typeof(y) unique_y = (y); \
unique_x op unique_y ? unique_x : unique_y; \
})

#define COMPARE(x, y, op) \
__builtin_choose_expr( \
(TYPECHECK(x, y) && CONSTCHECK(x, y)), \
(((x) op(y)) ? (x) : (y)), \
SAFE_COMPARE(x, y, UNIQUE_ID(x_), UNIQUE_ID(y_), op))

#define min(x, y) COMPARE(x, y, <)
#define max(x, y) COMPARE(x, y, >)

/* Defined in linux/math.h */
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))

/* Defined in asm/unaligned.h */
static inline uint16_t get_unaligned_le16(const void *p)
{
return __le16_to_cpup((const __le16 *)p);
Expand Down Expand Up @@ -83,4 +117,4 @@ static inline void put_unaligned_be64(uint64_t val, void *p)
*((__be64 *)p) = __cpu_to_be64(val);
}

#endif /* LINUX_USER_NUMERIC_DEFS_H */
#endif /* ASM_UNALIGNED_H */
Loading

0 comments on commit 59ad798

Please sign in to comment.