History log of /freebsd/usr.sbin/makefs/zfs.c (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 4e15366c 14-Oct-2024 Mark Johnston <markj@FreeBSD.org>

makefs: Record a larger TXG number in the uberblock

By default, OpenZFS will perform metadata verification of the most
recent TXGs, but this can be very slow since all data in a pool
generated by ma

makefs: Record a larger TXG number in the uberblock

By default, OpenZFS will perform metadata verification of the most
recent TXGs, but this can be very slow since all data in a pool
generated by makefs was logically written in a single transaction.

Avoid triggering this verification by default, but add an option to
restore the previous behaviour and enable it in regression test cases.

Reported by: cperciva
Tested by: cperciva (previous version)
MFC after: 2 weeks

show more ...


# d9fe7182 04-Oct-2024 Mark Johnston <markj@FreeBSD.org>

makefs: Remove the warning printed when makefs -t zfs is used

We haven't seen bug reports relating to this feature for a while, so
stop printing a warning.

Reviewed by: cperciva
MFC after: 2 weeks


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# 8a77bc5e 30-Sep-2023 Dimitry Andric <dim@FreeBSD.org>

makefs/zfs: fix build with gcc 12 after b5a2bf512dbe

Due to integer promotion rules, dn_nlevels (uint8_t) gets promoted to a
plain int, resulting in -Werror warnings with gcc 12:

In file included

makefs/zfs: fix build with gcc 12 after b5a2bf512dbe

Due to integer promotion rules, dn_nlevels (uint8_t) gets promoted to a
plain int, resulting in -Werror warnings with gcc 12:

In file included from /workspace/src/usr.sbin/makefs/zfs.c:35:
/workspace/src/usr.sbin/makefs/zfs.c: In function '_dnode_cursor_flush':
/workspace/src/usr.sbin/makefs/zfs.c:684:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
684 | assert(levels <= c->dnode->dn_nlevels - 1);
| ^~
/workspace/src/usr.sbin/makefs/zfs.c:691:27: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
691 | if (level == c->dnode->dn_nlevels - 1) {
| ^~
/workspace/src/usr.sbin/makefs/zfs.c: In function 'dnode_cursor_next':
/workspace/src/usr.sbin/makefs/zfs.c:739:41: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare]
739 | for (levels = 0; levels < c->dnode->dn_nlevels - 1; levels++) {
| ^

Fix it by subtracting 1U instead of 1.

Fixes: b5a2bf512dbe
MFC after: 3 days

show more ...


# b5a2bf51 27-Sep-2023 Mark Johnston <markj@FreeBSD.org>

makefs/zfs: Use unsigned integers for indirect block level counts

No functional change intended.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 14c5cf3a 26-May-2023 Mark Johnston <markj@FreeBSD.org>

makefs/zfs: Avoid generating a GUID of zero


# 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

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

show more ...


Revision tags: release/13.2.0
# a9e7a44c 16-Dec-2022 Mark Johnston <markj@FreeBSD.org>

makefs: Add some validation of ZFS pool names

Reported by: imp


Revision tags: release/12.4.0
# 9821e244 23-Nov-2022 John Baldwin <jhb@FreeBSD.org>

makefs zfs: Use signed values for both results of ?:.

Reported by: GCC -Wsign-compare
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D37468


# c4d26f02 16-Aug-2022 Mark Johnston <markj@FreeBSD.org>

makefs: Style

Reported by: rpokala
Fixes: 187084dddd3e ("makefs: Align the block buffer used in ZFS mode")
Sponsored by: The FreeBSD Foundation


# 187084dd 16-Aug-2022 Mark Johnston <markj@FreeBSD.org>

makefs: Align the block buffer used in ZFS mode

For some dnode types, particularly ZAPs, we want the buffer to have
uint64_t alignment.

Sponsored by: The FreeBSD Foundation


# 240afd8c 05-Aug-2022 Mark Johnston <markj@FreeBSD.org>

makefs: Add ZFS support

This allows one to take a staged directory tree and create a file
consisting of a ZFS pool with one or more datasets that contain the
contents of the directory tree. This is

makefs: Add ZFS support

This allows one to take a staged directory tree and create a file
consisting of a ZFS pool with one or more datasets that contain the
contents of the directory tree. This is useful for creating virtual
machine images without using the kernel to create a pool; "zpool create"
requires root privileges and currently is not permitted in jails.
makefs -t zfs also provides reproducible images by using a fixed seed
for pseudo-random number generation, used for generating GUIDs and hash
salts. makefs -t zfs requires relatively little by way of machine
resources.

The "zpool_reguid" rc.conf setting can be used to ask a FreeBSD guest to
generate a unique pool GUID upon first boot.

A small number of pool and dataset properties are supported. The pool
is backed by a single disk vdev. Data is always checksummed using
Fletcher-4, no redundant copies are made, and no compression is used.
The manual page documents supported pool and filesystem properties.

The implementation uses a few pieces of ZFS support from with the boot
loader, especially definitions for various on-disk structures, but is
otherwise standalone and in particular doesn't depend on OpenZFS.

This feature should be treated as experimental for now, i.e., important
data shouldn't be trusted to a makefs-created pool, and the command-line
interface is subject to change.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35248

show more ...