Lines Matching refs:cursor
43 #define XFS_ISRESET_CURSOR(cursor) \ argument
44 (!((cursor)->initted) && !((cursor)->hashval) && \
45 !((cursor)->blkno) && !((cursor)->offset))
57 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr_shortform_list() local
81 (XFS_ISRESET_CURSOR(cursor) && in xfs_attr_shortform_list()
164 cursor->initted = 1; in xfs_attr_shortform_list()
165 cursor->blkno = 0; in xfs_attr_shortform_list()
167 if (sbp->hash == cursor->hashval) { in xfs_attr_shortform_list()
168 if (cursor->offset == count) { in xfs_attr_shortform_list()
172 } else if (sbp->hash > cursor->hashval) { in xfs_attr_shortform_list()
183 if (cursor->hashval != sbp->hash) { in xfs_attr_shortform_list()
184 cursor->hashval = sbp->hash; in xfs_attr_shortform_list()
185 cursor->offset = 0; in xfs_attr_shortform_list()
202 cursor->offset++; in xfs_attr_shortform_list()
216 struct xfs_attrlist_cursor_kern *cursor, in xfs_attr_node_list_lookup() argument
233 cursor->blkno = 0; in xfs_attr_node_list_lookup()
235 error = xfs_da3_node_read(tp, dp, cursor->blkno, &bp, in xfs_attr_node_list_lookup()
262 if (cursor->blkno == 0) in xfs_attr_node_list_lookup()
271 if (cursor->hashval <= be32_to_cpu(btree->hashval)) { in xfs_attr_node_list_lookup()
272 cursor->blkno = be32_to_cpu(btree->before); in xfs_attr_node_list_lookup()
284 if (XFS_IS_CORRUPT(mp, cursor->blkno == 0)) { in xfs_attr_node_list_lookup()
314 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr_node_list() local
326 cursor->initted = 1; in xfs_attr_node_list()
334 if (cursor->blkno > 0) { in xfs_attr_node_list()
337 error = xfs_da3_node_read(context->tp, dp, cursor->blkno, &bp, in xfs_attr_node_list()
373 if (cursor->hashval > be32_to_cpu( in xfs_attr_node_list()
378 } else if (cursor->hashval <= be32_to_cpu( in xfs_attr_node_list()
399 error = xfs_attr_node_list_lookup(context, cursor, &bp); in xfs_attr_node_list()
418 cursor->blkno = leafhdr.forw; in xfs_attr_node_list()
421 cursor->blkno, &bp); in xfs_attr_node_list()
437 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr3_leaf_list_int() local
451 cursor->initted = 1; in xfs_attr3_leaf_list_int()
459 if (be32_to_cpu(entry->hashval) == cursor->hashval) { in xfs_attr3_leaf_list_int()
460 if (cursor->offset == context->dupcnt) { in xfs_attr3_leaf_list_int()
466 cursor->hashval) { in xfs_attr3_leaf_list_int()
489 if (be32_to_cpu(entry->hashval) != cursor->hashval) { in xfs_attr3_leaf_list_int()
490 cursor->hashval = be32_to_cpu(entry->hashval); in xfs_attr3_leaf_list_int()
491 cursor->offset = 0; in xfs_attr3_leaf_list_int()
526 cursor->offset++; in xfs_attr3_leaf_list_int()
544 context->cursor.blkno = 0; in xfs_attr_leaf_list()