struct xfs_inode *dp,
struct xfs_name *name,
xfs_ino_t inum, /* new entry inode number */
- xfs_fsblock_t *first, /* bmap's firstblock */
xfs_extlen_t total) /* bmap's total block count */
{
struct xfs_da_args *args;
int v; /* type-checking value */
ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
- ASSERT(tp->t_dfops || !first);
if (inum) {
rval = xfs_dir_ino_validate(tp->t_mountp, inum);
args->total = total;
args->whichfork = XFS_DATA_FORK;
args->trans = tp;
- args->firstblock = first;
+ args->firstblock = &tp->t_firstblock;
args->op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
if (!inum)
args->op_flags |= XFS_DA_OP_JUSTCHECK;
struct xfs_inode *dp,
struct xfs_name *name,
xfs_ino_t ino,
- xfs_fsblock_t *first, /* bmap's firstblock */
xfs_extlen_t total) /* bmap's total block count */
{
struct xfs_da_args *args;
args->hashval = dp->i_mount->m_dirnameops->hashname(name);
args->inumber = ino;
args->dp = dp;
- args->firstblock = first;
+ args->firstblock = &tp->t_firstblock;
args->total = total;
args->whichfork = XFS_DATA_FORK;
args->trans = tp;
struct xfs_inode *dp,
struct xfs_name *name, /* name of entry to replace */
xfs_ino_t inum, /* new inode number */
- xfs_fsblock_t *first, /* bmap's firstblock */
xfs_extlen_t total) /* bmap's total block count */
{
struct xfs_da_args *args;
args->hashval = dp->i_mount->m_dirnameops->hashname(name);
args->inumber = inum;
args->dp = dp;
- args->firstblock = first;
+ args->firstblock = &tp->t_firstblock;
args->total = total;
args->whichfork = XFS_DATA_FORK;
args->trans = tp;
xfs_inode_t *dp,
struct xfs_name *name) /* name of entry to add */
{
- return xfs_dir_createname(tp, dp, name, 0, NULL, 0);
+ return xfs_dir_createname(tp, dp, name, 0, 0);
}
/*
struct xfs_inode *pdp);
extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name, xfs_ino_t inum,
- xfs_fsblock_t *first, xfs_extlen_t tot);
+ xfs_extlen_t tot);
extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name, xfs_ino_t *inum,
struct xfs_name *ci_name);
extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name, xfs_ino_t ino,
- xfs_fsblock_t *first, xfs_extlen_t tot);
+ xfs_extlen_t tot);
extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name, xfs_ino_t inum,
- xfs_fsblock_t *first, xfs_extlen_t tot);
+ xfs_extlen_t tot);
extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name);
xfs_trans_t *tp,
xfs_inode_t *pip,
struct xfs_name *name,
- xfs_ino_t inum,
- xfs_fsblock_t *first)
+ xfs_ino_t inum)
{
int error;
int rsv;
rsv = XFS_DIRENTER_SPACE_RES(mp, name->len);
- error = -libxfs_dir_createname(tp, pip, name, inum, first, rsv);
+ error = -libxfs_dir_createname(tp, pip, name, inum, rsv);
if (error)
fail(_("directory createname error"), error);
}
free(buf);
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_REG_FILE;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
break;
case IF_RESERVED: /* pre-allocated space only */
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_REG_FILE;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
libxfs_trans_log_inode(tp, ip, flags);
libxfs_defer_ijoin(&dfops, ip);
}
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_BLKDEV;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
flags |= XFS_ILOG_DEV;
break;
fail(_("Inode allocation failed"), error);
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_CHRDEV;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
flags |= XFS_ILOG_DEV;
break;
fail(_("Inode allocation failed"), error);
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_FIFO;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
break;
case IF_SYMLINK:
buf = getstr(pp);
flags |= newfile(tp, ip, &first, 1, 1, buf, len);
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_SYMLINK;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
break;
case IF_DIRECTORY:
tp = getres(mp, 0);
} else {
libxfs_trans_ijoin(tp, pip, 0);
xname.type = XFS_DIR3_FT_DIR;
- newdirent(mp, tp, pip, &xname, ip->i_ino, &first);
+ newdirent(mp, tp, pip, &xname, ip->i_ino);
inc_nlink(VFS_I(pip));
libxfs_trans_log_inode(tp, pip, XFS_ILOG_CORE);
}
/*
* create the actual entry
*/
- error = -libxfs_dir_createname(tp, pip, &xname, ip->i_ino, &first,
- nres);
+ error = -libxfs_dir_createname(tp, pip, &xname, ip->i_ino, nres);
if (error)
do_error(
_("can't make %s, createname error %d\n"),
libxfs_defer_init(tp, &dfops, &first);
err = -libxfs_dir_createname(tp, orphanage_ip, &xname,
- ino, &first, nres);
+ ino, nres);
if (err)
do_error(
_("name create failed in %s (%d), filesystem may be out of space\n"),
libxfs_trans_log_inode(tp, orphanage_ip, XFS_ILOG_CORE);
err = -libxfs_dir_createname(tp, ino_p, &xfs_name_dotdot,
- orphanage_ino, &first, nres);
+ orphanage_ino, nres);
if (err)
do_error(
_("creation of .. entry failed (%d), filesystem may be out of space\n"),
libxfs_defer_init(tp, &dfops, &first);
err = -libxfs_dir_createname(tp, orphanage_ip, &xname,
- ino, &first, nres);
+ ino, nres);
if (err)
do_error(
_("name create failed in %s (%d), filesystem may be out of space\n"),
if (entry_ino_num != orphanage_ino) {
err = -libxfs_dir_replace(tp, ino_p,
&xfs_name_dotdot, orphanage_ino,
- &first, nres);
+ nres);
if (err)
do_error(
_("name replace op failed (%d), filesystem may be out of space\n"),
libxfs_defer_init(tp, &dfops, &first);
err = -libxfs_dir_createname(tp, orphanage_ip, &xname, ino,
- &first, nres);
+ nres);
if (err)
do_error(
_("name create failed in %s (%d), filesystem may be out of space\n"),
libxfs_defer_init(tp, &dfops, &firstblock);
error = -libxfs_dir_createname(tp, ip, &p->name, p->inum,
- &firstblock, nres);
+ nres);
if (error) {
do_warn(
_("name create failed in ino %" PRIu64 " (%d), filesystem may be out of space\n"),
libxfs_defer_init(tp, &dfops, &first);
error = -libxfs_dir_createname(tp, ip, &xfs_name_dotdot,
- ip->i_ino, &first, nres);
+ ip->i_ino, nres);
if (error)
do_error(
_("can't make \"..\" entry in root inode %" PRIu64 ", createname error %d\n"), ino, error);
libxfs_defer_init(tp, &dfops, &first);
error = -libxfs_dir_createname(tp, ip, &xfs_name_dot,
- ip->i_ino, &first, nres);
+ ip->i_ino, nres);
if (error)
do_error(
_("can't make \".\" entry in dir ino %" PRIu64 ", createname error %d\n"),