Lines Matching full:context

150 	void			*context,  in xfs_handle_acceptable()  argument
353 struct xfs_attr_list_context *context, in xfs_ioc_attr_put_listent() argument
360 struct xfs_attrlist *alist = context->buffer; in xfs_ioc_attr_put_listent()
364 ASSERT(!context->seen_enough); in xfs_ioc_attr_put_listent()
365 ASSERT(context->count >= 0); in xfs_ioc_attr_put_listent()
366 ASSERT(context->count < (ATTR_MAX_VALUELEN/8)); in xfs_ioc_attr_put_listent()
367 ASSERT(context->firstu >= sizeof(*alist)); in xfs_ioc_attr_put_listent()
368 ASSERT(context->firstu <= context->bufsize); in xfs_ioc_attr_put_listent()
373 if (context->attr_filter != (flags & XFS_ATTR_NSP_ONDISK_MASK)) in xfs_ioc_attr_put_listent()
377 context->count * sizeof(alist->al_offset[0]); in xfs_ioc_attr_put_listent()
380 context->firstu -= round_up(offsetof(struct xfs_attrlist_ent, a_name) + in xfs_ioc_attr_put_listent()
382 if (context->firstu < arraytop) { in xfs_ioc_attr_put_listent()
383 trace_xfs_attr_list_full(context); in xfs_ioc_attr_put_listent()
385 context->seen_enough = 1; in xfs_ioc_attr_put_listent()
389 aep = context->buffer + context->firstu; in xfs_ioc_attr_put_listent()
393 alist->al_offset[context->count++] = context->firstu; in xfs_ioc_attr_put_listent()
394 alist->al_count = context->count; in xfs_ioc_attr_put_listent()
395 trace_xfs_attr_list_add(context); in xfs_ioc_attr_put_listent()
431 struct xfs_attr_list_context context = { }; in xfs_ioc_attr_list() local
451 if (copy_from_user(&context.cursor, ucursor, sizeof(context.cursor))) in xfs_ioc_attr_list()
453 if (context.cursor.pad1 || context.cursor.pad2) in xfs_ioc_attr_list()
455 if (!context.cursor.initted && in xfs_ioc_attr_list()
456 (context.cursor.hashval || context.cursor.blkno || in xfs_ioc_attr_list()
457 context.cursor.offset)) in xfs_ioc_attr_list()
467 context.dp = dp; in xfs_ioc_attr_list()
468 context.resynch = 1; in xfs_ioc_attr_list()
469 context.attr_filter = xfs_attr_filter(flags); in xfs_ioc_attr_list()
470 context.buffer = buffer; in xfs_ioc_attr_list()
471 context.bufsize = round_down(bufsize, sizeof(uint32_t)); in xfs_ioc_attr_list()
472 context.firstu = context.bufsize; in xfs_ioc_attr_list()
473 context.put_listent = xfs_ioc_attr_put_listent; in xfs_ioc_attr_list()
475 alist = context.buffer; in xfs_ioc_attr_list()
478 alist->al_offset[0] = context.bufsize; in xfs_ioc_attr_list()
480 error = xfs_attr_list(&context); in xfs_ioc_attr_list()
485 copy_to_user(ucursor, &context.cursor, sizeof(context.cursor))) in xfs_ioc_attr_list()
681 struct xfs_attr_list_context context; member
706 struct xfs_attr_list_context *context, in xfs_getparents_put_listent() argument
714 container_of(context, struct xfs_getparents_ctx, context); in xfs_getparents_put_listent()
715 struct xfs_inode *ip = context->dp; in xfs_getparents_put_listent()
718 struct xfs_getparents_rec *gpr = gpx->krecords + context->firstu; in xfs_getparents_put_listent()
732 context->seen_enough = -EFSCORRUPTED; in xfs_getparents_put_listent()
741 if (context->firstu > context->bufsize - reclen) { in xfs_getparents_put_listent()
742 context->seen_enough = 1; in xfs_getparents_put_listent()
752 trace_xfs_getparents_put_listent(ip, gp, context, gpr); in xfs_getparents_put_listent()
754 context->firstu += reclen; in xfs_getparents_put_listent()
772 trace_xfs_getparents_expand_lastrec(gpx->ip, gp, &gpx->context, gpr); in xfs_getparents_expand_lastrec()
806 gpx->context.dp = ip; in xfs_getparents()
807 gpx->context.resynch = 1; in xfs_getparents()
808 gpx->context.put_listent = xfs_getparents_put_listent; in xfs_getparents()
809 gpx->context.bufsize = bufsize; in xfs_getparents()
811 gpx->context.firstu = 0; in xfs_getparents()
814 memcpy(&gpx->context.cursor, &gp->gp_cursor, in xfs_getparents()
819 trace_xfs_getparents_begin(ip, gp, &gpx->context.cursor); in xfs_getparents()
821 error = xfs_attr_list(&gpx->context); in xfs_getparents()
824 if (gpx->context.seen_enough < 0) { in xfs_getparents()
825 error = gpx->context.seen_enough; in xfs_getparents()
831 memcpy(&gp->gp_cursor, &gpx->context.cursor, in xfs_getparents()
838 if (gpx->context.seen_enough == 0) { in xfs_getparents()
854 trace_xfs_getparents_end(ip, gp, &gpx->context.cursor); in xfs_getparents()
856 ASSERT(gpx->context.firstu <= gpx->gph.gph_request.gp_bufsize); in xfs_getparents()
860 gpx->krecords, gpx->context.firstu)) in xfs_getparents()