Lines Matching full: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
72 * If the buffer is large enough and the cursor is at the start, in xfs_attr_shortform_list()
74 * one buffer and another call using the cursor won't need to be in xfs_attr_shortform_list()
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()
210 * We didn't find the block & hash mentioned in the cursor state, so
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()
329 * Do all sorts of validation on the passed-in cursor structure. in xfs_attr_node_list()
330 * If anything is amiss, ignore the cursor and look up the hashval 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()
393 * We did not find what we expected given the cursor's contents, 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()