MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zfs_ioc_vdev_attach

Function zfs_ioc_vdev_attach

freebsd/contrib/openzfs/module/zfs/zfs_ioctl.c:1932–1953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1930}
1931
1932static int
1933zfs_ioc_vdev_attach(zfs_cmd_t *zc)
1934{
1935 spa_t *spa;
1936 nvlist_t *config;
1937 int replacing = zc->zc_cookie;
1938 int rebuild = zc->zc_simple;
1939 int error;
1940
1941 if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0)
1942 return (error);
1943
1944 if ((error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
1945 zc->zc_iflags, &config)) == 0) {
1946 error = spa_vdev_attach(spa, zc->zc_guid, config, replacing,
1947 rebuild);
1948 nvlist_free(config);
1949 }
1950
1951 spa_close(spa, FTAG);
1952 return (error);
1953}
1954
1955static int
1956zfs_ioc_vdev_detach(zfs_cmd_t *zc)

Callers

nothing calls this directly

Calls 5

spa_openFunction · 0.85
get_nvlistFunction · 0.85
spa_vdev_attachFunction · 0.85
spa_closeFunction · 0.85
nvlist_freeFunction · 0.50

Tested by

no test coverage detected