Lines Matching refs:context
136 void *context, in xfs_handle_acceptable() argument
306 struct xfs_attr_list_context *context, in xfs_ioc_attr_put_listent() argument
312 struct xfs_attrlist *alist = context->buffer; in xfs_ioc_attr_put_listent()
316 ASSERT(!context->seen_enough); in xfs_ioc_attr_put_listent()
317 ASSERT(context->count >= 0); in xfs_ioc_attr_put_listent()
318 ASSERT(context->count < (ATTR_MAX_VALUELEN/8)); in xfs_ioc_attr_put_listent()
319 ASSERT(context->firstu >= sizeof(*alist)); in xfs_ioc_attr_put_listent()
320 ASSERT(context->firstu <= context->bufsize); in xfs_ioc_attr_put_listent()
325 if (context->attr_filter != (flags & XFS_ATTR_NSP_ONDISK_MASK)) in xfs_ioc_attr_put_listent()
329 context->count * sizeof(alist->al_offset[0]); in xfs_ioc_attr_put_listent()
332 context->firstu -= round_up(offsetof(struct xfs_attrlist_ent, a_name) + in xfs_ioc_attr_put_listent()
334 if (context->firstu < arraytop) { in xfs_ioc_attr_put_listent()
335 trace_xfs_attr_list_full(context); in xfs_ioc_attr_put_listent()
337 context->seen_enough = 1; in xfs_ioc_attr_put_listent()
341 aep = context->buffer + context->firstu; in xfs_ioc_attr_put_listent()
345 alist->al_offset[context->count++] = context->firstu; in xfs_ioc_attr_put_listent()
346 alist->al_count = context->count; in xfs_ioc_attr_put_listent()
347 trace_xfs_attr_list_add(context); in xfs_ioc_attr_put_listent()
380 struct xfs_attr_list_context context = { }; in xfs_ioc_attr_list() local
400 if (copy_from_user(&context.cursor, ucursor, sizeof(context.cursor))) in xfs_ioc_attr_list()
402 if (context.cursor.pad1 || context.cursor.pad2) in xfs_ioc_attr_list()
404 if (!context.cursor.initted && in xfs_ioc_attr_list()
405 (context.cursor.hashval || context.cursor.blkno || in xfs_ioc_attr_list()
406 context.cursor.offset)) in xfs_ioc_attr_list()
416 context.dp = dp; in xfs_ioc_attr_list()
417 context.resynch = 1; in xfs_ioc_attr_list()
418 context.attr_filter = xfs_attr_filter(flags); in xfs_ioc_attr_list()
419 context.buffer = buffer; in xfs_ioc_attr_list()
420 context.bufsize = round_down(bufsize, sizeof(uint32_t)); in xfs_ioc_attr_list()
421 context.firstu = context.bufsize; in xfs_ioc_attr_list()
422 context.put_listent = xfs_ioc_attr_put_listent; in xfs_ioc_attr_list()
424 alist = context.buffer; in xfs_ioc_attr_list()
427 alist->al_offset[0] = context.bufsize; in xfs_ioc_attr_list()
429 error = xfs_attr_list(&context); in xfs_ioc_attr_list()
434 copy_to_user(ucursor, &context.cursor, sizeof(context.cursor))) in xfs_ioc_attr_list()