[Pvfs2-developers] NULL op pointer in dbpf

Pete Wyckoff pw at osc.edu
Thu Oct 12 13:45:07 EDT 2006


I could use some help tracking this down.  Just updated from the
head into my local working copy and find that my standard tests
break.

On the server, in readdir, we end up in dbpf_keyval_iterate.  It
calls dbpf_op_init_queued_or_immediate, which because we are using
immediate completion, does not grab a queued op structure, and does
not modify the passed-in pointer q_op_pp.

Then dbpf_keyval_iterate calls on down into dbpf_queue_or_service
with q_op_p == NULL.  The first statement of that code does:

    if( coll_p->immediate_completion &&
           (DBPF_OP_IS_KEYVAL(op_p->type) || DBPF_OP_IS_DSPACE(op_p->type)))

but the op type is KEYVAL_ITERATE, so the condition fails.  Is this
the problem?

Sam, I recall you replaced the ranges of op types with lots
of explicit equality comparisons for some reason.  Did you leave
this one out on purpose?  If not, does that indicate we should maybe
try to bug-proof these comparisons a bit?  Maybe

    #define KEYVAL 1<<6
    #define DSPACE 1<<5
    #define BSTREAM 1<<4

    enum op_type {
	KEYVAL_READ = KEYVAL | 1
	KEYVAL_WRITE = KEYVAL | 2
	KEYVAL_ITERATE = KEYVAL | 3
	..
    }

    #define DBPF_OP_IS_KEYVAL(type) ((type) & KEYVAL)

Or tell me if I'm barking up the wrong tree.

		-- Pete


More information about the Pvfs2-developers mailing list