1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Jitendra Patidar 2ed1aebaf6
Fix ZDB to dump projid for projectquota enabled (#16291)
ZDB is supposed to dump "projid" via dump_znode(), when projectquota
is enabled.
-----------
static void
dump_znode(objset_t *os, uint64_t object, void *data, size_t size)
{
...
    if (dmu_objset_projectquota_enabled(os) && (pflags & ZFS_PROJID)) {
	uint64_t projid;

	if (sa_lookup(hdl, sa_attr_table[ZPL_PROJID], &projid,
	    sizeof (uint64_t)) == 0)
		(void) printf("\tprojid %llu\n", (u_longlong_t)projid);
    }
...
}
----------
But its not dumping "projid", even for project quota enabled.

dmu_objset_projectquota_enabled() does following 3 checks,
----------
boolean_t
dmu_objset_projectquota_enabled(objset_t *os)
{
        return (file_cbs[os->os_phys->os_type] != NULL &&
            DMU_PROJECTUSED_DNODE(os) != NULL &&
            spa_feature_is_enabled(os->os_spa,
		SPA_FEATURE_PROJECT_QUOTA));
}
----------
It fails on file_cbs[] check. file_cbs[] gets initialised via
dmu_objset_register_type(); which is not done for the ZDB, its done for
the kernel via zfs_init().

Register a dummy callback handle for the DMU_OST_ZFS type in
ZDB main() function to dump the projid for projectquota enabled.

Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #16290
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
2024-07-25 17:18:11 -07:00
.github Move nodes into correct subgraphs 2024-01-29 09:16:02 -08:00
cmd Fix ZDB to dump projid for projectquota enabled (#16291) 2024-07-25 17:18:11 -07:00
config Use kmap_local_page instead of kmap_atomic (#16329) 2024-07-16 17:27:29 -07:00
contrib contrib/bash_completion.d: squelch FreeBSD seq when first < last 2024-06-06 17:37:26 -07:00
etc etc/init.d: decide which variant to use at build time. 2024-04-08 16:52:24 -07:00
include zil: add stats for commit failure/fallback (#16315) 2024-07-25 16:53:59 -07:00
lib ddt: dedup table quota enforcement 2024-07-25 09:47:36 -07:00
man Several improvements to ARC shrinking (#16197) 2024-07-25 10:31:14 -07:00
module zil: add stats for commit failure/fallback (#16315) 2024-07-25 16:53:59 -07:00
rpm zfs-kmod: fix empty rpm requires/conflicts 2024-04-22 17:55:41 -07:00
scripts disable automatic dependency tracking for dkms builds 2024-06-13 18:08:49 -07:00
tests Replace goo.gl style link (#16373) 2024-07-25 11:00:32 -07:00
udev udev: correctly handle partition #16 and later 2024-03-21 16:38:24 -07:00
.cirrus.yml
.editorconfig
.gitignore Packaging: Auto-generate changelog during configure (#15528) 2023-11-16 08:58:47 -08:00
.gitmodules
.mailmap AUTHORS: refresh with recent new contributors (#16362) 2024-07-23 11:47:04 -07:00
AUTHORS AUTHORS: refresh with recent new contributors (#16362) 2024-07-23 11:47:04 -07:00
autogen.sh
CODE_OF_CONDUCT.md
configure.ac Packaging: Auto-generate changelog during configure (#15528) 2023-11-16 08:58:47 -08:00
copy-builtin
COPYRIGHT
LICENSE
Makefile.am
META Linux 6.9 compat: META (#16358) 2024-07-16 16:27:54 -07:00
NEWS
NOTICE
README.md FreeBSD: Fix the build on FreeBSD 12 2023-11-27 12:58:03 -08:00
RELEASES.md
TEST
zfs.release.in

img

OpenZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community. This repository contains the code for running OpenZFS on Linux and FreeBSD.

codecov coverity

Official Resources

Installation

Full documentation for installing OpenZFS on your favorite operating system can be found at the Getting Started Page.

Contribute & Develop

We have a separate document with contribution guidelines.

We have a Code of Conduct.

Release

OpenZFS is released under a CDDL license. For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels

  • The META file contains the officially recognized supported Linux kernel versions.
  • Supported FreeBSD versions are any supported branches and releases starting from 12.4-RELEASE.