/*
* CDDL HEADER START
*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
#include <sys/dsl_dataset.h>
#include <sys/dsl_prop.h>
#include <sys/dsl_synctask.h>
#include <sys/dmu_impl.h>
#include <sys/zfeature.h>
#include <sys/dsl_bookmark.h>
#include <zfs_namecheck.h>
static int
{
char *hashp;
return (SET_ERROR(ENAMETOOLONG));
}
/*
* Returns ESRCH if bookmark is not found.
*/
static int
{
int err;
if (bmark_zapobj == 0)
else
}
/*
* If later_ds is non-NULL, this will return EXDEV if the the specified bookmark
* does not represents an earlier point in later_ds's timeline.
*
* Returns ENOENT if the dataset containing the bookmark does not exist.
* Returns ESRCH if the dataset exists but the bookmark was not found in it.
*/
int
{
char *shortname;
int error;
if (error != 0)
return (error);
}
return (error);
}
typedef struct dsl_bookmark_create_arg {
static int
{
char *shortname;
int error;
if (!snapds->ds_is_snapshot)
if (error != 0)
return (error);
}
&bmark_phys);
if (error == 0)
return (0);
return (error);
}
static int
{
int rv = 0;
int error;
/* note: validity of nvlist checked by ioctl layer */
if (error == 0) {
}
if (error != 0) {
}
}
return (rv);
}
static void
{
char *shortname;
if (bmark_fs->ds_bookmarks == 0) {
}
sizeof (zfs_bookmark_phys_t) / sizeof (uint64_t),
&bmark_phys, tx));
"name=%s creation_txg=%llu target_snap=%llu",
}
}
/*
* The bookmarks must all be in the same pool.
*/
int
{
return (0);
}
int
{
int err = 0;
if (bmark_zapobj == 0)
return (0);
zap_cursor_advance(&zc)) {
if (err != 0)
break;
if (nvlist_exists(props,
}
if (nvlist_exists(props,
}
if (nvlist_exists(props,
}
}
return (err);
}
/*
* Retrieve the bookmarks that exist in the specified dataset, and the
* requested properties of each bookmark.
*
* The "props" nvlist specifies which properties are requested.
* See lzc_get_bookmarks() for the list of valid properties.
*/
int
{
int err;
if (err != 0)
return (err);
if (err != 0) {
return (err);
}
return (err);
}
typedef struct dsl_bookmark_destroy_arg {
static int
{
else
}
static int
{
int rv = 0;
return (0);
int error;
char *shortname;
/* ignore it; the bookmark is "already destroyed" */
continue;
}
if (error == 0) {
/*
* ignore it; the bookmark is
* "already destroyed"
*/
continue;
}
}
if (error == 0) {
} else {
}
}
return (rv);
}
static void
{
char *shortname;
/*
* If all of this dataset's bookmarks have been destroyed,
* free the zap object and decrement the feature's use count.
*/
&zap_cnt));
if (zap_cnt == 0) {
ds->ds_bookmarks = 0;
}
"name=%s", shortname);
}
}
/*
* The bookmarks must all be in the same pool.
*/
int
{
int rv;
return (0);
return (rv);
}