My bad. I figured it out. I was looking at (objset_phys_t)os, I should have looked at os as (objset_t).

Thanks,
Nagaraj.

Nagaraj Yedathore (from home) wrote:
Hi,

The function dnode_special_open had dnode_handle_t * as fourth argument.

dnode_t * dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object, dnode_handle_t *dnh)

But we send address of dnode_phys_t, while calling the function, in usr/src/uts/common/fs/zfs/dmu_objset.c
   390     DMU_META_DNODE(os) = dnode_special_open(os,
   391         &os->os_phys->os_meta_dnode, DMU_META_DNODE_OBJECT,
   392         &os->os_meta_dnode);

whereas, dnode_handle_t is defined as:

   237 typedef struct dnode_handle {
   238     /* Protects dnh_dnode from modification by dnode_move(). */
   239     zrlock_t dnh_zrlock;
   240     dnode_t *dnh_dnode;
   241 } dnode_handle_t;

It looks strange to me as to how dnode_phys_t * is mapped to dnode_handle_t *, when these structures are totally different. Am I making a silly mistake reading the code? Please help.

Thanks in advance,
Nagaraj.
_______________________________________________
zfs-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-code

_______________________________________________
zfs-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-code

Reply via email to