Comments (4)
When OSX is reading Solaris pool, and attempts to mount, it failure comes from;
zfs_vfs_mount()
zfs_domount()
zfs_zget()
dmu_object_info_from_db(db, &doi);
if (doi.doi_bonus_type != DMU_OT_ZNODE ||
doi.doi_bonus_size < sizeof (znode_phys_t)) {
printf(" zget fail bonus_type %d (ZNODE %d) and size %d ( < %d)\n",
doi.doi_bonus_type,DMU_OT_ZNODE,
doi.doi_bonus_size,sizeof (znode_phys_t) );
dmu_buf_rele(db, NULL);
ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
return (EINVAL);
}
Apr 11 09:02:21 jind0806 kernel[0]: zget fail bonus_type 44 (ZNODE 17) and size 168 ( < 264)
I have verified our headers define DMU_OT_ZNODE, and znode_phys_t correctly, so it would appear that dmu_object_info_from_db is reading the wrong thing.
from zfs.
That was copied from MacZFS, and it turns out that it should handle DMU_OT_SA these days, so replaced with calls like
ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num);
err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db);
dmu_object_info_from_db(db, &doi);
if (doi.doi_bonus_type != DMU_OT_SA &&
(doi.doi_bonus_type != DMU_OT_ZNODE ||
(doi.doi_bonus_type == DMU_OT_ZNODE &&
doi.doi_bonus_size < sizeof (znode_phys_t)))) {
ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
return (EINVAL);
}
hdl = dmu_buf_get_user(db);
zp = sa_get_userdata(hdl);
with error checking of course. However the sa_buf_hold logic goes wrong. Basically, the call hdl= dmu_buf_get_user()
, which just return db->db_user_ptr
gives a hdl where hdl->sa_userp; is a truncated pointer.
(gdb) p *hdl
sa_userp = 0x21000000,
and from the looks of it, sa_os looks suspect as well. There are only 4 calls that directly accesses sa_userp in sa.c, and none of them are called.
If a hack is added like:
result = hdl->sa_userp;
printf("sa_get_userdata %p -> %p\n", hdl, result);
if (result < 0xffffffff) result = NULL;
return (result);
ie, the ptr is not 64bits like it should be, make it be NULL. We can infact import Solaris pool;
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
FROMSOLARIS 91Mi 31Ki 91Mi 1% 7 186087 0% /FROMSOLARIS
# ls -la /FROMSOLARIS
p--Srwsrwt 26922 2 sys 1365141802 Jan 1 1970 /FROMSOLARIS
So we clearly are misaligned elsewhere too. Our on-disk structures do not fit with official ZFS.
from zfs.
OSX structures:
bpobj 48 bptree_phys 40 bptree_entry_phys 168 ddt_phys 64
objset_phys 2048 dnode_phys 512, dsl_dataset_phys 320 dsl_deadlist_phys 320
dsl_dir_phys 256 dsl_scan_phys 192 sa_hdr_phys 8 spa_history_phys 40
vdev_phys 114688 mzap_ent_phys 64 mzap_phys 128 zap_phys 104
zap_table_phys 40 zap_leaf_phys 56 znode_phys 264 zfs_acl_phys_v0 88 zfs_acl_phys 88
ZoL structures:
bpobj 48 bptree_phys 40 bptree_entry_phys 168 ddt_phys 64
objset_phys 2048 dnode_phys 512, dsl_dataset_phys 320 dsl_deadlist_phys 320
dsl_dir_phys 256 dsl_scan_phys 192 sa_hdr_phys 8 spa_history_phys 40
vdev_phys 114688 mzap_ent_phys 64 mzap_phys 128 zap_phys 104
zap_table_phys 40 zap_leaf_phys 56 znode_phys 264 zfs_acl_phys_v0 88 zfs_acl_phys 88
So, it would appear to be some other issue.
from zfs.
Quite a large commit ca7243c goes and adds SA support. The MacZFS code that was merged in as part of the first port only handled pool version=8 and needed to be manually upgraded. There are still many issues with this (files show as directories), umount hangs etc.
from zfs.
Related Issues (20)
- diskutil erase ZFS shows -69832: file system formatter failed HOT 1
- Error "no pools available to import" in Big Sur x86_64
- Unexpectedly low performance of VMs with openzfsonosx backing store HOT 2
- Xcode not happy with ZFS HOT 14
- Photos cannot import photos to library on zfs HOT 5
- _zfs_findernotify_callback panic HOT 1
- Kernel Panic - OpenZFS 2.1.0 on Apple Silicon HOT 11
- Kernel Panic (Time Out) - OpenZFS 2.1.0 on Apple Silicon HOT 20
- Kernal Panic - 2.1.x arm64 HOT 16
- Kernel Panic: Kernel Data Abort (OpenZFS 2.1.0, M1 Ultra) HOT 15
- how can i create block dev as on linux HOT 1
- 2.1.99: `zsysctl` sets tunable incorrectly HOT 2
- Launchd: no pools available to import HOT 3
- Kernel Panic: OpenZFS 2.1.0 Catalina HOT 1
- System freezes with command: zpool offline
- System restarts with command: zpool export
- System freezes or reboots importing a degraded mirror image HOT 52
- System freezes on import HOT 1
- Mac ZFS triggers duplicating finding programs to fail randomly HOT 9
- `cargo build` breaks with "resource temporarily unavailable (error 35)" (I'm assuming EAGAIN) on v2.2.0 and v2.2.2 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zfs.