History log of /freebsd-current/lib/libbe/be_error.c
Revision Date Author Comments
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 6966ac05 23-Jan-2020 Kyle Evans <kevans@FreeBSD.org>

Drop "All Rights Reserved" from all libbe/bectl files

I sent out an e-mail on 2020/01/21 with a plan to do this to Kyle, Rob, and
Wes; all parties have responded in the affirmative that it's OK to drop it
from these files.


# 8f5c6c31 02-Jan-2020 Kyle Evans <kevans@FreeBSD.org>

libbe(3): promote dependent clones when destroying an environment

When removing a boot environment iterate over the dependents and process the
snapshots by grabbing any clones. Promote the clones we found and then
remove the target environment.

This fixes the ability to destroy a boot environment when it has been used
to spawn one or more other boot environments.

PR: 242592
Submitted by: Wes Maag <jwmaag gmail com> (with changes by myself)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D22953


# be7dd423 12-Feb-2019 Kyle Evans <kevans@FreeBSD.org>

libbe(3): Fix be_destroy behavior w.r.t. deep BE snapshots and -o

be_destroy is documented to recursively destroy a boot environment. In the
case of snapshots, one would take this to mean that these are also
recursively destroyed. However, this was previously not the case.
be_destroy would descend into the be_destroy callback and attempt to
zfs_iter_children on the top-level snapshot, which is bogus.

Our alternative approach is to take note of the snapshot name and iterate
through all of fs children of the BE to try destruction in the children.

The -o option is also fixed to work properly with deep BEs. If the BE was
created with `bectl create -e otherDeepBE newDeepBE`, for instance, then a
recursive snapshot of otherDeepBE would have been taken for construction of
newDeepBE but a subsequent destroy with BE_DESTROY_ORIGIN set would only
clean up the snapshot at the root of otherDeepBE: ${BEROOT}/otherDeepBE@...

The most recent iteration instead pretends not to know how these things
work, verifies that the origin is another BE and then passes that back
through be_destroy to DTRT when snapshots and deep BEs may be in play.

MFC after: 1 week


# 162ec569 31-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3): Fix error handling with respect to be_exists

Some paths through be_exists will set the error state, others will not
There are multiple reasons that a call can fail, so clean it up a bit: all
paths now return an appropriate error code so the caller can attempt to
distinguish between a BE legitimately not existing and just having the wrong
mountpoint. The caller is expected to bubble the error through to the
internal error handler as needed.

This fixes some unfriendliness with bectl(8)'s activate subcommand, where
it might fail due to a bad mountpoint but the only message output is a
generic "failed to activate" message.

Approved by: re (gjb)


# c65a2111 10-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3): More error handling bits

be_add_child functionality gets split out into separate places as a bonus.
A lot of places here we'll gloss over libzfs errors, because they shouldn't
be happening given the conditions that we're operating under. "Unknown
error" is what I'm intending to use for the moment to indicate an
exceptional circumstance- exceptional enough that we can't tell the consumer
did because we're not so certain that they did anything.


# 2989df09 07-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3): Clarify some errors

While here, fix a bug with 'rename' that checked the wrong name for being
the active BE.


# 50a1972e 07-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

Catch up on BE_ERR messages


# b6e7c421 07-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3)/bectl(8): Standardize $FreeBSD$ IDs


# b179da01 07-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3)/bectl(8): Standardize copyright headers

- File names don't necessarily need to be repeated
- Add SPDX tags
- Add a missing copyright for Kyle Kneitinger in bectl.8, originally written
by him in GSoC 2017; his standard copyright notice has been copied from
other files within the same directory to remain consistent with how he
clearly wished to portray it


# 20b7b8d8 06-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3): Document that we'll clobber previous errors set by set_error


# bfe0869c 24-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

libbe(3): make style consistent with what I'll use going forward


# 28f16a0f 24-Jul-2018 Kyle Evans <kevans@FreeBSD.org>

Import libbe(3)/be(1) from socsvn/soc2017/kneitinger/libbe-head