xfs_dahash_t xfs_parent_hashval(struct xfs_mount *mp, const uint8_t *name, int namelen, xfs_ino_t parent_ino);
xfs_dahash_t xfs_parent_hashattr(struct xfs_mount *mp, const uint8_t *name, int namelen, constvoid *value, int valuelen);
/* Initializes a xfs_parent_rec to be stored as an attribute name. */ staticinlinevoid
xfs_parent_rec_init( struct xfs_parent_rec *rec,
xfs_ino_t ino,
uint32_t gen)
{
rec->p_ino = cpu_to_be64(ino);
rec->p_gen = cpu_to_be32(gen);
}
/* Initializes a xfs_parent_rec to be stored as an attribute name. */ staticinlinevoid
xfs_inode_to_parent_rec( struct xfs_parent_rec *rec, conststruct xfs_inode *dp)
{
xfs_parent_rec_init(rec, dp->i_ino, VFS_IC(dp)->i_generation);
}
externstruct kmem_cache *xfs_parent_args_cache;
/* * Parent pointer information needed to pass around the deferred xattr update * machinery.
*/ struct xfs_parent_args { struct xfs_parent_rec rec; struct xfs_parent_rec new_rec; struct xfs_da_args args;
};
/* * Start a parent pointer update by allocating the context object we need to * perform a parent pointer update.
*/ staticinlineint
xfs_parent_start( struct xfs_mount *mp, struct xfs_parent_args **ppargsp)
{ if (!xfs_has_parent(mp)) {
*ppargsp = NULL; return0;
}
*ppargsp = kmem_cache_zalloc(xfs_parent_args_cache, GFP_KERNEL); if (!*ppargsp) return -ENOMEM; return0;
}
/* Finish a parent pointer update by freeing the context object. */ staticinlinevoid
xfs_parent_finish( struct xfs_mount *mp, struct xfs_parent_args *ppargs)
{ if (ppargs)
kmem_cache_free(xfs_parent_args_cache, ppargs);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.