On Thu, Mar 3, 2011 at 10:55 AM, Derrick Brashear <[email protected]> wrote: > wild guess: m_hdr changed size because of: > > - m_contig_t *mh_contig; /* contig mpool support struct */ > + struct mclContig *mh_contig; /* contig mpool support > struct > */ > > where > -typedef struct m_contig > -{ > - caddr_t va; /* addr of contiguous block */ > - uint elemsize; /* size of the elements of the block */ > - uint elemcnt; /* # of elements in the block */ > - ulong freecnt; /* how many of these have been freed */ > - memreg_t memreg; /* contains the mem reg corr for block */ > -} m_contig_t; > > +typedef struct mclContig { > + caddr_t mclcCB; /* addr of contiguous block */ > + uint32_t mclcElemSize; /* size of the elements of the block */ > + uint32_t mclcElemCnt; /* # of elements in the block */ > + memreg_t mclcMemReg; /* contains the mem reg corr for block */ > +} mclContig_t; > > meaning struct mbuf shrank by 4 bytes > > so the question is, what's the best way to get a mbuf provided to us > by the kernel that we can check out the size, and > then presumably we provide our own struct mbufs, so we can make > m_next, m_len, m_flags, m_ext, m_pkthdr and whatever > else be instead macros which dtrt given what we booted on... and screw > the whole "build twice" plan.
kern_sogetopt will return to us an mbuf allocated by the kernel. so then it's just a matter of figuring out how we can discern from that mbuf which size we are, which even if we do not provide MGET/MGETHDR can at least mean we don't panic, but instead fail to mount AFS. _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
