Lines Matching refs:args
74 struct xfs_da_args *args, in xfs_ascii_ci_compname() argument
81 if (args->namelen != len) in xfs_ascii_ci_compname()
86 if (args->name[i] == name[i]) in xfs_ascii_ci_compname()
88 if (tolower(args->name[i]) != tolower(name[i])) in xfs_ascii_ci_compname()
230 struct xfs_da_args *args; in xfs_dir_init() local
238 args = kmem_zalloc(sizeof(*args), KM_NOFS); in xfs_dir_init()
239 if (!args) in xfs_dir_init()
242 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_init()
243 args->dp = dp; in xfs_dir_init()
244 args->trans = tp; in xfs_dir_init()
245 error = xfs_dir2_sf_create(args, pdp->i_ino); in xfs_dir_init()
246 kmem_free(args); in xfs_dir_init()
262 struct xfs_da_args *args; in xfs_dir_createname() local
275 args = kmem_zalloc(sizeof(*args), KM_NOFS); in xfs_dir_createname()
276 if (!args) in xfs_dir_createname()
279 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_createname()
280 args->name = name->name; in xfs_dir_createname()
281 args->namelen = name->len; in xfs_dir_createname()
282 args->filetype = name->type; in xfs_dir_createname()
283 args->hashval = xfs_dir2_hashname(dp->i_mount, name); in xfs_dir_createname()
284 args->inumber = inum; in xfs_dir_createname()
285 args->dp = dp; in xfs_dir_createname()
286 args->total = total; in xfs_dir_createname()
287 args->whichfork = XFS_DATA_FORK; in xfs_dir_createname()
288 args->trans = tp; in xfs_dir_createname()
289 args->op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT; in xfs_dir_createname()
291 args->op_flags |= XFS_DA_OP_JUSTCHECK; in xfs_dir_createname()
294 rval = xfs_dir2_sf_addname(args); in xfs_dir_createname()
298 rval = xfs_dir2_isblock(args, &v); in xfs_dir_createname()
302 rval = xfs_dir2_block_addname(args); in xfs_dir_createname()
306 rval = xfs_dir2_isleaf(args, &v); in xfs_dir_createname()
310 rval = xfs_dir2_leaf_addname(args); in xfs_dir_createname()
312 rval = xfs_dir2_node_addname(args); in xfs_dir_createname()
315 kmem_free(args); in xfs_dir_createname()
325 struct xfs_da_args *args, in xfs_dir_cilookup_result() argument
329 if (args->cmpresult == XFS_CMP_DIFFERENT) in xfs_dir_cilookup_result()
331 if (args->cmpresult != XFS_CMP_CASE || in xfs_dir_cilookup_result()
332 !(args->op_flags & XFS_DA_OP_CILOOKUP)) in xfs_dir_cilookup_result()
335 args->value = kmem_alloc(len, KM_NOFS | KM_MAYFAIL); in xfs_dir_cilookup_result()
336 if (!args->value) in xfs_dir_cilookup_result()
339 memcpy(args->value, name, len); in xfs_dir_cilookup_result()
340 args->valuelen = len; in xfs_dir_cilookup_result()
358 struct xfs_da_args *args; in xfs_dir_lookup() local
374 args = kmem_zalloc(sizeof(*args), KM_NOFS); in xfs_dir_lookup()
375 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_lookup()
376 args->name = name->name; in xfs_dir_lookup()
377 args->namelen = name->len; in xfs_dir_lookup()
378 args->filetype = name->type; in xfs_dir_lookup()
379 args->hashval = xfs_dir2_hashname(dp->i_mount, name); in xfs_dir_lookup()
380 args->dp = dp; in xfs_dir_lookup()
381 args->whichfork = XFS_DATA_FORK; in xfs_dir_lookup()
382 args->trans = tp; in xfs_dir_lookup()
383 args->op_flags = XFS_DA_OP_OKNOENT; in xfs_dir_lookup()
385 args->op_flags |= XFS_DA_OP_CILOOKUP; in xfs_dir_lookup()
389 rval = xfs_dir2_sf_lookup(args); in xfs_dir_lookup()
393 rval = xfs_dir2_isblock(args, &v); in xfs_dir_lookup()
397 rval = xfs_dir2_block_lookup(args); in xfs_dir_lookup()
401 rval = xfs_dir2_isleaf(args, &v); in xfs_dir_lookup()
405 rval = xfs_dir2_leaf_lookup(args); in xfs_dir_lookup()
407 rval = xfs_dir2_node_lookup(args); in xfs_dir_lookup()
413 *inum = args->inumber; in xfs_dir_lookup()
415 ci_name->name = args->value; in xfs_dir_lookup()
416 ci_name->len = args->valuelen; in xfs_dir_lookup()
421 kmem_free(args); in xfs_dir_lookup()
436 struct xfs_da_args *args; in xfs_dir_removename() local
443 args = kmem_zalloc(sizeof(*args), KM_NOFS); in xfs_dir_removename()
444 if (!args) in xfs_dir_removename()
447 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_removename()
448 args->name = name->name; in xfs_dir_removename()
449 args->namelen = name->len; in xfs_dir_removename()
450 args->filetype = name->type; in xfs_dir_removename()
451 args->hashval = xfs_dir2_hashname(dp->i_mount, name); in xfs_dir_removename()
452 args->inumber = ino; in xfs_dir_removename()
453 args->dp = dp; in xfs_dir_removename()
454 args->total = total; in xfs_dir_removename()
455 args->whichfork = XFS_DATA_FORK; in xfs_dir_removename()
456 args->trans = tp; in xfs_dir_removename()
459 rval = xfs_dir2_sf_removename(args); in xfs_dir_removename()
463 rval = xfs_dir2_isblock(args, &v); in xfs_dir_removename()
467 rval = xfs_dir2_block_removename(args); in xfs_dir_removename()
471 rval = xfs_dir2_isleaf(args, &v); in xfs_dir_removename()
475 rval = xfs_dir2_leaf_removename(args); in xfs_dir_removename()
477 rval = xfs_dir2_node_removename(args); in xfs_dir_removename()
479 kmem_free(args); in xfs_dir_removename()
494 struct xfs_da_args *args; in xfs_dir_replace() local
504 args = kmem_zalloc(sizeof(*args), KM_NOFS); in xfs_dir_replace()
505 if (!args) in xfs_dir_replace()
508 args->geo = dp->i_mount->m_dir_geo; in xfs_dir_replace()
509 args->name = name->name; in xfs_dir_replace()
510 args->namelen = name->len; in xfs_dir_replace()
511 args->filetype = name->type; in xfs_dir_replace()
512 args->hashval = xfs_dir2_hashname(dp->i_mount, name); in xfs_dir_replace()
513 args->inumber = inum; in xfs_dir_replace()
514 args->dp = dp; in xfs_dir_replace()
515 args->total = total; in xfs_dir_replace()
516 args->whichfork = XFS_DATA_FORK; in xfs_dir_replace()
517 args->trans = tp; in xfs_dir_replace()
520 rval = xfs_dir2_sf_replace(args); in xfs_dir_replace()
524 rval = xfs_dir2_isblock(args, &v); in xfs_dir_replace()
528 rval = xfs_dir2_block_replace(args); in xfs_dir_replace()
532 rval = xfs_dir2_isleaf(args, &v); in xfs_dir_replace()
536 rval = xfs_dir2_leaf_replace(args); in xfs_dir_replace()
538 rval = xfs_dir2_node_replace(args); in xfs_dir_replace()
540 kmem_free(args); in xfs_dir_replace()
568 struct xfs_da_args *args, in xfs_dir2_grow_inode() argument
572 struct xfs_inode *dp = args->dp; in xfs_dir2_grow_inode()
578 trace_xfs_dir2_grow_inode(args, space); in xfs_dir2_grow_inode()
584 count = args->geo->fsbcount; in xfs_dir2_grow_inode()
586 error = xfs_da_grow_inode_int(args, &bno, count); in xfs_dir2_grow_inode()
590 *dbp = xfs_dir2_da_to_db(args->geo, (xfs_dablk_t)bno); in xfs_dir2_grow_inode()
601 xfs_trans_log_inode(args->trans, dp, XFS_ILOG_CORE); in xfs_dir2_grow_inode()
612 struct xfs_da_args *args, in xfs_dir2_isblock() argument
615 struct xfs_mount *mp = args->dp->i_mount; in xfs_dir2_isblock()
619 error = xfs_bmap_last_offset(args->dp, &eof, XFS_DATA_FORK); in xfs_dir2_isblock()
624 if (XFS_FSB_TO_B(mp, eof) != args->geo->blksize) in xfs_dir2_isblock()
628 if (XFS_IS_CORRUPT(mp, args->dp->i_disk_size != args->geo->blksize)) in xfs_dir2_isblock()
638 struct xfs_da_args *args, in xfs_dir2_isleaf() argument
644 error = xfs_bmap_last_offset(args->dp, &eof, XFS_DATA_FORK); in xfs_dir2_isleaf()
649 if (eof != args->geo->leafblk + args->geo->fsbcount) in xfs_dir2_isleaf()
663 struct xfs_da_args *args, in xfs_dir2_shrink_inode() argument
675 trace_xfs_dir2_shrink_inode(args, db); in xfs_dir2_shrink_inode()
677 dp = args->dp; in xfs_dir2_shrink_inode()
679 tp = args->trans; in xfs_dir2_shrink_inode()
680 da = xfs_dir2_db_to_da(args->geo, db); in xfs_dir2_shrink_inode()
683 error = xfs_bunmapi(tp, dp, da, args->geo->fsbcount, 0, 0, &done); in xfs_dir2_shrink_inode()
707 if (db >= xfs_dir2_byte_to_db(args->geo, XFS_DIR2_LEAF_OFFSET)) in xfs_dir2_shrink_inode()
712 if (dp->i_disk_size > xfs_dir2_db_off_to_byte(args->geo, db + 1, 0)) in xfs_dir2_shrink_inode()
721 if (db == args->geo->datablk) in xfs_dir2_shrink_inode()
762 struct xfs_da_args *args, in xfs_dir2_compname() argument
766 if (unlikely(xfs_has_asciici(args->dp->i_mount))) in xfs_dir2_compname()
767 return xfs_ascii_ci_compname(args, name, len); in xfs_dir2_compname()
768 return xfs_da_compname(args, name, len); in xfs_dir2_compname()