Page MenuHomeFreeBSD

D38415.diff
No OneTemporary

D38415.diff

diff --git a/sys/fs/tarfs/tarfs_io.c b/sys/fs/tarfs/tarfs_io.c
--- a/sys/fs/tarfs/tarfs_io.c
+++ b/sys/fs/tarfs/tarfs_io.c
@@ -40,6 +40,12 @@
#include <sys/uio.h>
#include <sys/vnode.h>
+#if defined(ZSTDIO)
+#define TARFS_ZIO 1
+#else
+#undef TARFS_ZIO
+#endif
+
#ifdef ZSTDIO
#define ZSTD_STATIC_LINKING_ONLY
#include <contrib/zstd/lib/zstd.h>
@@ -214,6 +220,7 @@
};
#endif
+#ifdef TARFS_ZIO
/*
* Updates the decompression frame index, recording the current input and
* output offsets in a new index entry, and growing the index if
@@ -240,6 +247,7 @@
MPASS(zio->idx[zio->curidx].i == i);
MPASS(zio->idx[zio->curidx].o == o);
}
+#endif
/*
* VOP_ACCESS for zio node.
@@ -600,6 +608,7 @@
};
VFS_VOP_VECTOR_REGISTER(tarfs_znodeops);
+#ifdef TARFS_ZIO
/*
* Initializes the decompression layer.
*/
@@ -630,6 +639,7 @@
TARFS_DPF(ZIO, "%s: created zio node\n", __func__);
return (zio);
}
+#endif
/*
* Initializes the I/O layer, including decompression if the signature of
@@ -640,7 +650,7 @@
tarfs_io_init(struct tarfs_mount *tmp)
{
uint8_t *block;
-#ifdef ZSTDIO
+#ifdef TARFS_ZIO
struct tarfs_zio *zio = NULL;
#endif
ssize_t res;
@@ -676,6 +686,7 @@
return (error);
}
+#ifdef TARFS_ZIO
/*
* Tears down the decompression layer.
*/
@@ -712,6 +723,7 @@
tmp->zio = NULL;
return (error);
}
+#endif
/*
* Tears down the I/O layer, including the decompression layer if
@@ -722,8 +734,10 @@
{
int error = 0;
+#ifdef TARFS_ZIO
if (tmp->zio != NULL) {
error = tarfs_zio_fini(tmp);
}
+#endif
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Fri, Aug 7, 1:30 PM (9 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36176118
Default Alt Text
D38415.diff (1 KB)

Event Timeline