Update linux-user-disk

Minor updates to handle changes in the user side of ZFS, utils and such.
This commit is contained in:
Brian Behlendorf 2010-06-14 16:03:02 -07:00
parent 1b55fad32f
commit 302238d84f
5 changed files with 13 additions and 4 deletions

View File

@ -55,7 +55,6 @@
#include <sys/arc.h> #include <sys/arc.h>
#include <sys/ddt.h> #include <sys/ddt.h>
#undef ZFS_MAXNAMELEN #undef ZFS_MAXNAMELEN
#undef verify
#include <libzfs.h> #include <libzfs.h>
#define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \ #define ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \

View File

@ -311,6 +311,7 @@ safe_malloc(size_t size)
return (data); return (data);
} }
#ifdef HAVE_ZPL
static char * static char *
safe_strdup(char *str) safe_strdup(char *str)
{ {
@ -321,6 +322,7 @@ safe_strdup(char *str)
return (dupstr); return (dupstr);
} }
#endif /* HAVE_ZPL */
/* /*
* Callback routine that will print out information for each of * Callback routine that will print out information for each of
@ -488,6 +490,7 @@ parse_depth(char *opt, int *flags)
#define PROGRESS_DELAY 2 /* seconds */ #define PROGRESS_DELAY 2 /* seconds */
#ifdef HAVE_ZPL
static char *pt_reverse = "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"; static char *pt_reverse = "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
static time_t pt_begin; static time_t pt_begin;
static char *pt_header = NULL; static char *pt_header = NULL;
@ -539,6 +542,8 @@ finish_progress(char *done)
free(pt_header); free(pt_header);
pt_header = NULL; pt_header = NULL;
} }
#endif /* HAVE_ZPL */
/* /*
* zfs clone [-p] [-o prop=value] ... <snap> <fs | vol> * zfs clone [-p] [-o prop=value] ... <snap> <fs | vol>
* *

View File

@ -1042,6 +1042,7 @@ ztest_pattern_set(void *buf, uint64_t size, uint64_t value)
*ip++ = value; *ip++ = value;
} }
#ifndef NDEBUG
static boolean_t static boolean_t
ztest_pattern_match(void *buf, uint64_t size, uint64_t value) ztest_pattern_match(void *buf, uint64_t size, uint64_t value)
{ {
@ -1054,6 +1055,7 @@ ztest_pattern_match(void *buf, uint64_t size, uint64_t value)
return (diff == 0); return (diff == 0);
} }
#endif
static void static void
ztest_bt_generate(ztest_block_tag_t *bt, objset_t *os, uint64_t object, ztest_bt_generate(ztest_block_tag_t *bt, objset_t *os, uint64_t object,
@ -4779,7 +4781,6 @@ ztest_run_zdb(char *pool)
isa, isa,
zopt_verbose >= 3 ? "s" : "", zopt_verbose >= 3 ? "s" : "",
zopt_verbose >= 4 ? "v" : "", zopt_verbose >= 4 ? "v" : "",
spa_config_path,
pool); pool);
free(isa); free(isa);

View File

@ -1353,6 +1353,7 @@ sa_lookup(sa_handle_t *hdl, sa_attr_type_t attr, void *buf, uint32_t buflen)
int int
sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio) sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio)
{ {
#ifdef HAVE_ZPL
int error; int error;
sa_bulk_attr_t bulk; sa_bulk_attr_t bulk;
@ -1371,7 +1372,9 @@ sa_lookup_uio(sa_handle_t *hdl, sa_attr_type_t attr, uio_t *uio)
} }
mutex_exit(&hdl->sa_lock); mutex_exit(&hdl->sa_lock);
return (error); return (error);
#else
return ENOSYS;
#endif /* HAVE_ZPL */
} }
#endif #endif

View File

@ -67,7 +67,7 @@ sa_attr_reg_t zfs_attr_table[ZPL_END+1] = {
}; };
#ifdef _KERNEL #ifdef _KERNEL
#ifdef HAVE_ZPL
int int
zfs_sa_readlink(znode_t *zp, uio_t *uio) zfs_sa_readlink(znode_t *zp, uio_t *uio)
{ {
@ -309,4 +309,5 @@ zfs_sa_upgrade_txholds(dmu_tx_t *tx, znode_t *zp)
} }
} }
#endif /* HAVE_ZPL */
#endif #endif