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()
163 cursor->initted = 1; in xfs_attr_shortform_list()
164 cursor->blkno = 0; in xfs_attr_shortform_list()
166 if (sbp->hash == cursor->hashval) { in xfs_attr_shortform_list()
167 if (cursor->offset == count) { in xfs_attr_shortform_list()
171 } else if (sbp->hash > cursor->hashval) { in xfs_attr_shortform_list()
182 if (cursor->hashval != sbp->hash) { in xfs_attr_shortform_list()
183 cursor->hashval = sbp->hash; in xfs_attr_shortform_list()
184 cursor->offset = 0; in xfs_attr_shortform_list()
201 cursor->offset++; in xfs_attr_shortform_list()
209 * We didn't find the block & hash mentioned in the cursor state, so
215 struct xfs_attrlist_cursor_kern *cursor, in xfs_attr_node_list_lookup() argument
232 cursor->blkno = 0; in xfs_attr_node_list_lookup()
234 error = xfs_da3_node_read(tp, dp, cursor->blkno, &bp, in xfs_attr_node_list_lookup()
261 if (cursor->blkno == 0) in xfs_attr_node_list_lookup()
270 if (cursor->hashval <= be32_to_cpu(btree->hashval)) { in xfs_attr_node_list_lookup()
271 cursor->blkno = be32_to_cpu(btree->before); in xfs_attr_node_list_lookup()
283 if (XFS_IS_CORRUPT(mp, cursor->blkno == 0)) { in xfs_attr_node_list_lookup()
313 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr_node_list() local
325 cursor->initted = 1; in xfs_attr_node_list()
328 * Do all sorts of validation on the passed-in cursor structure. in xfs_attr_node_list()
329 * If anything is amiss, ignore the cursor and look up the hashval in xfs_attr_node_list()
333 if (cursor->blkno > 0) { in xfs_attr_node_list()
336 error = xfs_da3_node_read(context->tp, dp, cursor->blkno, &bp, in xfs_attr_node_list()
372 if (cursor->hashval > be32_to_cpu( in xfs_attr_node_list()
377 } else if (cursor->hashval <= be32_to_cpu( in xfs_attr_node_list()
392 * We did not find what we expected given the cursor's contents, in xfs_attr_node_list()
398 error = xfs_attr_node_list_lookup(context, cursor, &bp); in xfs_attr_node_list()
417 cursor->blkno = leafhdr.forw; in xfs_attr_node_list()
420 cursor->blkno, &bp); in xfs_attr_node_list()
436 struct xfs_attrlist_cursor_kern *cursor = &context->cursor; in xfs_attr3_leaf_list_int() local
450 cursor->initted = 1; in xfs_attr3_leaf_list_int()
458 if (be32_to_cpu(entry->hashval) == cursor->hashval) { in xfs_attr3_leaf_list_int()
459 if (cursor->offset == context->dupcnt) { in xfs_attr3_leaf_list_int()
465 cursor->hashval) { in xfs_attr3_leaf_list_int()
488 if (be32_to_cpu(entry->hashval) != cursor->hashval) { in xfs_attr3_leaf_list_int()
489 cursor->hashval = be32_to_cpu(entry->hashval); in xfs_attr3_leaf_list_int()
490 cursor->offset = 0; in xfs_attr3_leaf_list_int()
525 cursor->offset++; in xfs_attr3_leaf_list_int()
543 context->cursor.blkno = 0; in xfs_attr_leaf_list()