The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ecd41c0df3a0e5f98716c5aabbdeb36c2c29b86f

commit ecd41c0df3a0e5f98716c5aabbdeb36c2c29b86f
Author:     Warner Losh <[email protected]>
AuthorDate: 2026-10-03 14:42:21 +0000
Commit:     Warner Losh <[email protected]>
CommitDate: 2026-10-03 17:32:07 +0000

    stand: zfs_dnode_stat move from spa to mount argument
    
    When reading dynamic system attributes, we'll need the mount argument
    since we can no longer hard-code the offsets. Adjust zfs_dnode_stat to
    take it.
    
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D60261
---
 stand/efi/boot1/zfs_module.c | 2 +-
 stand/libsa/zfs/zfs.c        | 2 +-
 stand/libsa/zfs/zfsimpl.c    | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c
index 3c3e9f6a1015..1d6d71127f29 100644
--- a/stand/efi/boot1/zfs_module.c
+++ b/stand/efi/boot1/zfs_module.c
@@ -217,7 +217,7 @@ load(const char *filepath, dev_info_t *devinfo, void 
**bufp, size_t *bufsize)
        }
 
        /* Only st_size is inspected here, so identity is irrelevant. */
-       if ((err = zfs_dnode_stat(spa, &dn, &st, 0, 0)) != 0) {
+       if ((err = zfs_dnode_stat(&zmount, &dn, &st, 0, 0)) != 0) {
                printf("Failed to stat '%s' on pool '%s' (%d)\n", filepath,
                    spa->spa_name, err);
                return (EFI_INVALID_PARAMETER);
diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c
index 156c78d6869c..5241bdc19716 100644
--- a/stand/libsa/zfs/zfs.c
+++ b/stand/libsa/zfs/zfs.c
@@ -218,7 +218,7 @@ zfs_stat(struct open_file *f, struct stat *sb)
        struct zfsmount *zm = dev->d_opendata;
        struct file *fp = (struct file *)f->f_fsdata;
 
-       return (zfs_dnode_stat(zm->spa, &fp->f_dnode, sb, zm->fsid_guid,
+       return (zfs_dnode_stat(zm, &fp->f_dnode, sb, zm->fsid_guid,
            fp->f_objnum));
 }
 
diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c
index 123aadc37b53..d4ebb2cfdea8 100644
--- a/stand/libsa/zfs/zfsimpl.c
+++ b/stand/libsa/zfs/zfsimpl.c
@@ -3713,7 +3713,7 @@ zfs_spa_init(spa_t *spa)
 }
 
 static int
-zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, struct stat *sb,
+zfs_dnode_stat(struct zfsmount *mount, dnode_phys_t *dn, struct stat *sb,
     uint64_t fsid_guid, uint64_t objnum)
 {
 
@@ -3749,7 +3749,7 @@ zfs_dnode_stat(const spa_t *spa, dnode_phys_t *dn, struct 
stat *sb,
                                if (buf == NULL)
                                        error = ENOMEM;
                                else
-                                       error = zio_read(spa, bp, buf);
+                                       error = zio_read(mount->spa, bp, buf);
 
                                if (error != 0) {
                                        free(buf);
@@ -3933,7 +3933,7 @@ zfs_lookup(struct zfsmount *mount, const char *upath,
                p = q;
 
                /* Only st_mode is inspected here, so identity is irrelevant. */
-               if ((rc = zfs_dnode_stat(spa, &dn, &sb, 0, 0)) != 0)
+               if ((rc = zfs_dnode_stat(mount, &dn, &sb, 0, 0)) != 0)
                        goto done;
                if (!S_ISDIR(sb.st_mode)) {
                        rc = ENOTDIR;
@@ -3959,7 +3959,7 @@ zfs_lookup(struct zfsmount *mount, const char *upath,
                 * Check for symlink.
                 */
                /* Only st_mode is inspected here, so identity is irrelevant. */
-               rc = zfs_dnode_stat(spa, &dn, &sb, 0, 0);
+               rc = zfs_dnode_stat(mount, &dn, &sb, 0, 0);
                if (rc)
                        goto done;
                if (S_ISLNK(sb.st_mode)) {

Reply via email to