mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Add linux user disk support
This topic branch contains all the changes needed to integrate the user side zfs tools with Linux style devices. Primarily this includes fixing up the Solaris libefi library to be Linux friendly, and integrating with the libblkid library which is provided by e2fsprogs. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -48,6 +48,26 @@ extern "C" {
|
||||
#define ZFS_MAXPROPLEN MAXPATHLEN
|
||||
#define ZPOOL_MAXPROPLEN MAXPATHLEN
|
||||
|
||||
/*
|
||||
* Default device paths
|
||||
*/
|
||||
|
||||
#if defined(__sun__) || defined(__sun)
|
||||
#define DISK_ROOT "/dev/dsk"
|
||||
#define RDISK_ROOT "/dev/rdsk"
|
||||
#define UDISK_ROOT RDISK_ROOT
|
||||
#define FIRST_SLICE "s0"
|
||||
#define BACKUP_SLICE "s2"
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#define DISK_ROOT "/dev"
|
||||
#define RDISK_ROOT DISK_ROOT
|
||||
#define UDISK_ROOT "/dev/disk"
|
||||
#define FIRST_SLICE "1"
|
||||
#define BACKUP_SLICE ""
|
||||
#endif
|
||||
|
||||
/*
|
||||
* libzfs errors
|
||||
*/
|
||||
@@ -248,6 +268,7 @@ extern nvlist_t *zpool_find_vdev(zpool_handle_t *, const char *, boolean_t *,
|
||||
boolean_t *, boolean_t *);
|
||||
extern nvlist_t *zpool_find_vdev_by_physpath(zpool_handle_t *, const char *,
|
||||
boolean_t *, boolean_t *, boolean_t *);
|
||||
extern int zpool_label_disk_wait(char *, int);
|
||||
extern int zpool_label_disk(libzfs_handle_t *, zpool_handle_t *, char *);
|
||||
|
||||
/*
|
||||
@@ -661,9 +682,6 @@ extern int zpool_in_use(libzfs_handle_t *, int, pool_state_t *, char **,
|
||||
extern int zpool_read_label(int, nvlist_t **);
|
||||
extern int zpool_clear_label(int);
|
||||
|
||||
/* is this zvol valid for use as a dump device? */
|
||||
extern int zvol_check_dump_config(char *);
|
||||
|
||||
/*
|
||||
* Management interfaces for SMB ACL files
|
||||
*/
|
||||
|
||||
@@ -191,6 +191,8 @@ zfs_handle_t *make_dataset_handle(libzfs_handle_t *, const char *);
|
||||
|
||||
int zpool_open_silent(libzfs_handle_t *, const char *, zpool_handle_t **);
|
||||
|
||||
int zvol_create_link(libzfs_handle_t *, const char *);
|
||||
int zvol_remove_link(libzfs_handle_t *, const char *);
|
||||
boolean_t zpool_name_valid(libzfs_handle_t *, boolean_t, const char *);
|
||||
|
||||
int zfs_validate_name(libzfs_handle_t *hdl, const char *path, int type,
|
||||
|
||||
Reference in New Issue
Block a user