Skip to content

Commit

Permalink
Compile fixes for rebase
Browse files Browse the repository at this point in the history
ASSERT0P
set active allocator

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Oct 18, 2023
1 parent 9ede992 commit 4b13e97
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/os/windows/spl/sys/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ extern void printBuffer(const char *fmt, ...);
#define ASSERT3S(x, y, z) VERIFY3S(x, y, z)
#define ASSERT3U(x, y, z) VERIFY3U(x, y, z)
#define ASSERT3P(x, y, z) VERIFY3P(x, y, z)
#define ASSERT0P(x) VERIFY0P(x)
#define ASSERT0(x) VERIFY0(x)

#define ASSERTV(x) x
Expand All @@ -190,6 +191,7 @@ extern void printBuffer(const char *fmt, ...);
#define ASSERT3S(x, y, z) ((void)0)
#define ASSERT3U(x, y, z) ((void)0)
#define ASSERT3P(x, y, z) ((void)0)
#define ASSERT0P(x) ((void)0)
#define ASSERT0(x) ((void)0)

#endif /* DBG */
Expand All @@ -210,6 +212,7 @@ extern void printBuffer(const char *fmt, ...);
#define VERIFY3U(x, y, z) VERIFY3_IMPL(x, y, z, uint64_t, "%llu", \
(unsigned long long))
#define VERIFY3P(x, y, z) VERIFY3_IMPL(x, y, z, uintptr_t, "%p", (void *))
#define VERIFY0P(x) VERIFY3_IMPL(0, ==, x, uintptr_t, "%p", (void *))
#define VERIFY0(x) VERIFY3_IMPL(0, ==, x, int64_t, "%lld", (long long))

#define VERIFY(EX) do { \
Expand Down
2 changes: 2 additions & 0 deletions include/os/windows/zfs/zfs_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,5 @@

/* Define the project alias string. */
#define ZFS_META_ALIAS ZFS_META_GITREV

#define ZFSEXECDIR "C:/Program Files/OpenZFS on Windows"
20 changes: 20 additions & 0 deletions module/os/windows/zfs/sysctl_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,26 @@ param_set_arc_int(ZFS_MODULE_PARAM_ARGS)
/* dsl_scan.c */

/* metaslab.c */
int
param_set_active_allocator(ZFS_MODULE_PARAM_ARGS)
{
char buf[16];

*type = ZT_TYPE_STRING;

if (set == B_FALSE) {
*ptr = (void *)zfs_active_allocator;
*len = strlen(zfs_active_allocator) + 1;
return (0);
}

strlcpy(buf, *ptr, sizeof (buf));

if (strcmp(buf, zfs_active_allocator) == 0)
return (0);

return (-param_set_active_allocator_common(buf));
}

/* spa_misc.c */
extern int zfs_flags;
Expand Down

0 comments on commit 4b13e97

Please sign in to comment.