Lines Matching refs:cursor

42 #define XFS_ISRESET_CURSOR(cursor) \  argument
43 (!((cursor)->initted) && !((cursor)->hashval) && \
44 !((cursor)->blkno) && !((cursor)->offset))
56 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr_shortform_list() local
81 (XFS_ISRESET_CURSOR(cursor) && in xfs_attr_shortform_list()
153 cursor->initted = 1; in xfs_attr_shortform_list()
154 cursor->blkno = 0; in xfs_attr_shortform_list()
156 if (sbp->hash == cursor->hashval) { in xfs_attr_shortform_list()
157 if (cursor->offset == count) { in xfs_attr_shortform_list()
161 } else if (sbp->hash > cursor->hashval) { in xfs_attr_shortform_list()
172 if (cursor->hashval != sbp->hash) { in xfs_attr_shortform_list()
173 cursor->hashval = sbp->hash; in xfs_attr_shortform_list()
174 cursor->offset = 0; in xfs_attr_shortform_list()
189 cursor->offset++; in xfs_attr_shortform_list()
203 struct xfs_attrlist_cursor_kern *cursor, in xfs_attr_node_list_lookup() argument
219 cursor->blkno = 0; in xfs_attr_node_list_lookup()
221 error = xfs_da3_node_read(tp, dp, cursor->blkno, &bp, in xfs_attr_node_list_lookup()
244 if (cursor->blkno == 0) in xfs_attr_node_list_lookup()
253 if (cursor->hashval <= be32_to_cpu(btree->hashval)) { in xfs_attr_node_list_lookup()
254 cursor->blkno = be32_to_cpu(btree->before); in xfs_attr_node_list_lookup()
266 if (XFS_IS_CORRUPT(mp, cursor->blkno == 0)) in xfs_attr_node_list_lookup()
286 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr_node_list() local
297 cursor->initted = 1; in xfs_attr_node_list()
305 if (cursor->blkno > 0) { in xfs_attr_node_list()
306 error = xfs_da3_node_read(context->tp, dp, cursor->blkno, &bp, in xfs_attr_node_list()
327 if (cursor->hashval > be32_to_cpu( in xfs_attr_node_list()
332 } else if (cursor->hashval <= be32_to_cpu( in xfs_attr_node_list()
353 error = xfs_attr_node_list_lookup(context, cursor, &bp); in xfs_attr_node_list()
372 cursor->blkno = leafhdr.forw; in xfs_attr_node_list()
374 error = xfs_attr3_leaf_read(context->tp, dp, cursor->blkno, in xfs_attr_node_list()
391 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr3_leaf_list_int() local
405 cursor->initted = 1; in xfs_attr3_leaf_list_int()
413 if (be32_to_cpu(entry->hashval) == cursor->hashval) { in xfs_attr3_leaf_list_int()
414 if (cursor->offset == context->dupcnt) { in xfs_attr3_leaf_list_int()
420 cursor->hashval) { in xfs_attr3_leaf_list_int()
442 if (be32_to_cpu(entry->hashval) != cursor->hashval) { in xfs_attr3_leaf_list_int()
443 cursor->hashval = be32_to_cpu(entry->hashval); in xfs_attr3_leaf_list_int()
444 cursor->offset = 0; in xfs_attr3_leaf_list_int()
474 cursor->offset++; in xfs_attr3_leaf_list_int()
492 context->cursor.blkno = 0; in xfs_attr_leaf_list()