static const char dot[] = ".";
static const char dotdot[] = "..";
-/**
+/*
* Implementation of dt_index_operations::dio_lookup
*
* Used with regular (non-striped) objects.
*
- * \see dt_index_operations::dio_lookup() in the API description for details.
+ * see dt_index_operations::dio_lookup() in the API description for details.
*/
static int lod_lookup(const struct lu_env *env, struct dt_object *dt,
struct dt_rec *rec, const struct dt_key *key)
return next->do_index_ops->dio_lookup(env, next, rec, key);
}
-/**
+/*
* Implementation of dt_index_operations::dio_declare_insert.
*
* Used with regular (non-striped) objects.
*
- * \see dt_index_operations::dio_declare_insert() in the API description
+ * see dt_index_operations::dio_declare_insert() in the API description
* for details.
*/
static int lod_declare_insert(const struct lu_env *env, struct dt_object *dt,
return lod_sub_declare_insert(env, dt_object_child(dt), rec, key, th);
}
-/**
+/*
* Implementation of dt_index_operations::dio_insert.
*
* Used with regular (non-striped) objects
*
- * \see dt_index_operations::dio_insert() in the API description for details.
+ * see dt_index_operations::dio_insert() in the API description for details.
*/
static int lod_insert(const struct lu_env *env, struct dt_object *dt,
const struct dt_rec *rec, const struct dt_key *key,
return lod_sub_insert(env, dt_object_child(dt), rec, key, th);
}
-/**
+/*
* Implementation of dt_index_operations::dio_declare_delete.
*
* Used with regular (non-striped) objects.
*
- * \see dt_index_operations::dio_declare_delete() in the API description
+ * see dt_index_operations::dio_declare_delete() in the API description
* for details.
*/
static int lod_declare_delete(const struct lu_env *env, struct dt_object *dt,
return lod_sub_declare_delete(env, dt_object_child(dt), key, th);
}
-/**
+/*
* Implementation of dt_index_operations::dio_delete.
*
* Used with regular (non-striped) objects.
*
- * \see dt_index_operations::dio_delete() in the API description for details.
+ * see dt_index_operations::dio_delete() in the API description for details.
*/
static int lod_delete(const struct lu_env *env, struct dt_object *dt,
const struct dt_key *key, struct thandle *th)
return lod_sub_delete(env, dt_object_child(dt), key, th);
}
-/**
+/*
* Implementation of dt_it_ops::init.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::init() in the API description for details.
+ * see dt_it_ops::init() in the API description for details.
*/
static struct dt_it *lod_it_init(const struct lu_env *env,
struct dt_object *dt, __u32 attr)
LASSERT((it)->lit_it != NULL); \
} while (0)
-/**
+/*
* Implementation of dt_index_operations::dio_it.fini.
*
* Used with regular (non-striped) objects.
*
- * \see dt_index_operations::dio_it.fini() in the API description for details.
+ * see dt_index_operations::dio_it.fini() in the API description for details.
*/
static void lod_it_fini(const struct lu_env *env, struct dt_it *di)
{
it->lit_it = NULL;
}
-/**
+/*
* Implementation of dt_it_ops::get.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::get() in the API description for details.
+ * see dt_it_ops::get() in the API description for details.
*/
static int lod_it_get(const struct lu_env *env, struct dt_it *di,
const struct dt_key *key)
return it->lit_obj->do_index_ops->dio_it.get(env, it->lit_it, key);
}
-/**
+/*
* Implementation of dt_it_ops::put.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::put() in the API description for details.
+ * see dt_it_ops::put() in the API description for details.
*/
static void lod_it_put(const struct lu_env *env, struct dt_it *di)
{
return it->lit_obj->do_index_ops->dio_it.put(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::next.
*
* Used with regular (non-striped) objects
*
- * \see dt_it_ops::next() in the API description for details.
+ * see dt_it_ops::next() in the API description for details.
*/
static int lod_it_next(const struct lu_env *env, struct dt_it *di)
{
return it->lit_obj->do_index_ops->dio_it.next(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::key.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::key() in the API description for details.
+ * see dt_it_ops::key() in the API description for details.
*/
static struct dt_key *lod_it_key(const struct lu_env *env,
const struct dt_it *di)
return it->lit_obj->do_index_ops->dio_it.key(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::key_size.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::key_size() in the API description for details.
+ * see dt_it_ops::key_size() in the API description for details.
*/
static int lod_it_key_size(const struct lu_env *env, const struct dt_it *di)
{
return it->lit_obj->do_index_ops->dio_it.key_size(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::rec.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::rec() in the API description for details.
+ * see dt_it_ops::rec() in the API description for details.
*/
static int lod_it_rec(const struct lu_env *env, const struct dt_it *di,
struct dt_rec *rec, __u32 attr)
attr);
}
-/**
+/*
* Implementation of dt_it_ops::rec_size.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::rec_size() in the API description for details.
+ * see dt_it_ops::rec_size() in the API description for details.
*/
static int lod_it_rec_size(const struct lu_env *env, const struct dt_it *di,
__u32 attr)
attr);
}
-/**
+/*
* Implementation of dt_it_ops::store.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::store() in the API description for details.
+ * see dt_it_ops::store() in the API description for details.
*/
static __u64 lod_it_store(const struct lu_env *env, const struct dt_it *di)
{
return it->lit_obj->do_index_ops->dio_it.store(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::load.
*
* Used with regular (non-striped) objects.
*
- * \see dt_it_ops::load() in the API description for details.
+ * see dt_it_ops::load() in the API description for details.
*/
static int lod_it_load(const struct lu_env *env, const struct dt_it *di,
__u64 hash)
}
};
-/**
+/*
* Implementation of dt_index_operations::dio_lookup
*
* Used with striped directories.
*
- * \see dt_index_operations::dio_lookup() in the API description for details.
+ * see dt_index_operations::dio_lookup() in the API description for details.
*/
static int lod_striped_lookup(const struct lu_env *env, struct dt_object *dt,
struct dt_rec *rec, const struct dt_key *key)
return next->do_index_ops->dio_lookup(env, next, rec, key);
}
-/**
+/*
* Implementation of dt_it_ops::init.
*
* Used with striped objects. Internally just initializes the iterator
* on the first stripe.
*
- * \see dt_it_ops::init() in the API description for details.
+ * see dt_it_ops::init() in the API description for details.
*/
static struct dt_it *lod_striped_it_init(const struct lu_env *env,
struct dt_object *dt, __u32 attr)
LASSERT((it)->lit_stripe_index < (lo)->ldo_dir_stripe_count); \
} while (0)
-/**
+/*
* Implementation of dt_it_ops::fini.
*
* Used with striped objects.
*
- * \see dt_it_ops::fini() in the API description for details.
+ * see dt_it_ops::fini() in the API description for details.
*/
static void lod_striped_it_fini(const struct lu_env *env, struct dt_it *di)
{
it->lit_stripe_index = 0;
}
-/**
+/*
* Implementation of dt_it_ops::get.
*
* Right now it's not used widely, only to reset the iterator to the
* initial position. It should be possible to implement a full version
* which chooses a correct stripe to be able to position with any key.
*
- * \see dt_it_ops::get() in the API description for details.
+ * see dt_it_ops::get() in the API description for details.
*/
static int lod_striped_it_get(const struct lu_env *env, struct dt_it *di,
const struct dt_key *key)
return next->do_index_ops->dio_it.get(env, it->lit_it, key);
}
-/**
+/*
* Implementation of dt_it_ops::put.
*
* Used with striped objects.
*
- * \see dt_it_ops::put() in the API description for details.
+ * see dt_it_ops::put() in the API description for details.
*/
static void lod_striped_it_put(const struct lu_env *env, struct dt_it *di)
{
return next->do_index_ops->dio_it.put(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::next.
*
* Used with striped objects. When the end of the current stripe is
* reached, the method takes the next stripe's iterator.
*
- * \see dt_it_ops::next() in the API description for details.
+ * see dt_it_ops::next() in the API description for details.
*/
static int lod_striped_it_next(const struct lu_env *env, struct dt_it *di)
{
RETURN(1);
}
-/**
+/*
* Implementation of dt_it_ops::key.
*
* Used with striped objects.
*
- * \see dt_it_ops::key() in the API description for details.
+ * see dt_it_ops::key() in the API description for details.
*/
static struct dt_key *lod_striped_it_key(const struct lu_env *env,
const struct dt_it *di)
return next->do_index_ops->dio_it.key(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::key_size.
*
* Used with striped objects.
*
- * \see dt_it_ops::size() in the API description for details.
+ * see dt_it_ops::size() in the API description for details.
*/
static int lod_striped_it_key_size(const struct lu_env *env,
const struct dt_it *di)
return next->do_index_ops->dio_it.key_size(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::rec.
*
* Used with striped objects.
*
- * \see dt_it_ops::rec() in the API description for details.
+ * see dt_it_ops::rec() in the API description for details.
*/
static int lod_striped_it_rec(const struct lu_env *env, const struct dt_it *di,
struct dt_rec *rec, __u32 attr)
return next->do_index_ops->dio_it.rec(env, it->lit_it, rec, attr);
}
-/**
+/*
* Implementation of dt_it_ops::rec_size.
*
* Used with striped objects.
*
- * \see dt_it_ops::rec_size() in the API description for details.
+ * see dt_it_ops::rec_size() in the API description for details.
*/
static int lod_striped_it_rec_size(const struct lu_env *env,
const struct dt_it *di, __u32 attr)
return next->do_index_ops->dio_it.rec_size(env, it->lit_it, attr);
}
-/**
+/*
* Implementation of dt_it_ops::store.
*
* Used with striped objects.
*
- * \see dt_it_ops::store() in the API description for details.
+ * see dt_it_ops::store() in the API description for details.
*/
static __u64 lod_striped_it_store(const struct lu_env *env,
const struct dt_it *di)
return next->do_index_ops->dio_it.store(env, it->lit_it);
}
-/**
+/*
* Implementation of dt_it_ops::load.
*
* Used with striped objects.
*
- * \see dt_it_ops::load() in the API description for details.
+ * see dt_it_ops::load() in the API description for details.
*/
static int lod_striped_it_load(const struct lu_env *env,
const struct dt_it *di, __u64 hash)
};
/**
- * Append the FID for each shard of the striped directory after the
- * given LMV EA header.
+ * lod_load_lmv_shards() - Append the FID for each shard of the striped
+ * directory after the given LMV EA header.
+ * @env: pointer to the thread context
+ * @lo: pointer to the master object of the striped directory
+ * @buf: pointer to the lu_buf which will hold the LMV EA
+ * @resize: whether re-allocate the buffer if it is not big enough
*
* To simplify striped directory and the consistency verification,
* we only store the LMV EA header on disk, for both master object
* There may be holes in the LMV EA if some shards' name entries
* are corrupted or lost.
*
- * \param[in] env pointer to the thread context
- * \param[in] lo pointer to the master object of the striped directory
- * \param[in] buf pointer to the lu_buf which will hold the LMV EA
- * \param[in] resize whether re-allocate the buffer if it is not big enough
- *
- * \retval positive size of the LMV EA
- * \retval 0 for nothing to be loaded
- * \retval negative error number on failure
+ * Return:
+ * * %positive size of the LMV EA
+ * * %0 for nothing to be loaded
+ * * %negative error number on failure
*/
int lod_load_lmv_shards(const struct lu_env *env, struct lod_object *lo,
struct lu_buf *buf, bool resize)
RETURN(rc > 0 ? lmv_mds_md_size(stripes, magic) : rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_index_try.
*
- * \see dt_object_operations::do_index_try() in the API description for details.
+ * see dt_object_operations::do_index_try() in the API description for details.
*/
static int lod_index_try(const struct lu_env *env, struct dt_object *dt,
const struct dt_index_features *feat)
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_read_lock.
*
- * \see dt_object_operations::do_read_lock() in the API description for details.
+ * see dt_object_operations::do_read_lock() in the API description for details.
*/
static void lod_read_lock(const struct lu_env *env, struct dt_object *dt,
unsigned role)
dt_read_lock(env, dt_object_child(dt), role);
}
-/**
+/*
* Implementation of dt_object_operations::do_write_lock.
*
- * \see dt_object_operations::do_write_lock() in the API description for
+ * see dt_object_operations::do_write_lock() in the API description for
* details.
*/
static void lod_write_lock(const struct lu_env *env, struct dt_object *dt,
dt_write_lock(env, dt_object_child(dt), role);
}
-/**
+/*
* Implementation of dt_object_operations::do_read_unlock.
*
- * \see dt_object_operations::do_read_unlock() in the API description for
+ * see dt_object_operations::do_read_unlock() in the API description for
* details.
*/
static void lod_read_unlock(const struct lu_env *env, struct dt_object *dt)
dt_read_unlock(env, dt_object_child(dt));
}
-/**
+/*
* Implementation of dt_object_operations::do_write_unlock.
*
- * \see dt_object_operations::do_write_unlock() in the API description for
+ * see dt_object_operations::do_write_unlock() in the API description for
* details.
*/
static void lod_write_unlock(const struct lu_env *env, struct dt_object *dt)
dt_write_unlock(env, dt_object_child(dt));
}
-/**
+/*
* Implementation of dt_object_operations::do_write_locked.
*
- * \see dt_object_operations::do_write_locked() in the API description for
+ * see dt_object_operations::do_write_locked() in the API description for
* details.
*/
static int lod_write_locked(const struct lu_env *env, struct dt_object *dt)
return dt_write_locked(env, dt_object_child(dt));
}
-/**
+/*
* Implementation of dt_object_operations::do_attr_get.
*
- * \see dt_object_operations::do_attr_get() in the API description for details.
+ * see dt_object_operations::do_attr_get() in the API description for details.
*/
static int lod_attr_get(const struct lu_env *env,
struct dt_object *dt,
return lod_sub_attr_set(env, dt, data->locd_attr, th);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_attr_set.
*
* If the object is striped, then apply the changes to all the stripes.
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_attr_set.
*
* If the object is striped, then apply the changes to all or subset of
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_xattr_get.
*
* If LOV EA is requested from the root object and it's not
}
/**
- * Verify LVM EA.
+ * lod_verify_md_striping() - Verify LVM EA.
+ * @lod: lod device
+ * @lum: a buffer storing LMV EA to verify
*
* Checks that the magic of the stripe is sane.
*
- * \param[in] lod lod device
- * \param[in] lum a buffer storing LMV EA to verify
- *
- * \retval 0 if the EA is sane
- * \retval negative otherwise
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_verify_md_striping(struct lod_device *lod,
const struct lmv_user_md_v1 *lum)
}
/**
- * Initialize LMV EA for a slave.
+ * lod_prep_slave_lmv_md() - Initialize LMV EA for a slave.
+ * @master_lmv: a buffer containing master's EA
+ * @slave_lmv: a buffer where slave's EA will be stored [out]
*
* Initialize slave's LMV EA from the master's LMV EA.
- *
- * \param[in] master_lmv a buffer containing master's EA
- * \param[out] slave_lmv a buffer where slave's EA will be stored
- *
*/
static void lod_prep_slave_lmv_md(struct lmv_mds_md_v1 *slave_lmv,
const struct lmv_mds_md_v1 *master_lmv)
}
/**
- * Generate LMV EA.
+ * lod_prep_lmv_md() - Generate LMV EA.
+ * @env: execution environment
+ * @dt: object
+ * @lmv_buf: buffer storing generated LMV EA
*
* Generate LMV EA from the object passed as \a dt. The object must have
* the stripes created and initialized.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[out] lmv_buf buffer storing generated LMV EA
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_prep_lmv_md(const struct lu_env *env, struct dt_object *dt,
struct lu_buf *lmv_buf)
}
/**
- * Create in-core represenation for a striped directory.
+ * lod_parse_dir_striping() - Create in-core represenation for a striped
+ * directory.
+ * @env: execution environment
+ * @lo: lod object
+ * @buf: buffer containing LMV EA
*
* Parse the buffer containing LMV EA and instantiate LU objects
* representing the stripe objects. The pointers to the objects are
* stored in ldo_stripe field of \a lo. This function is used when
* we need to access an already created object (i.e. load from a disk).
*
- * \param[in] env execution environment
- * \param[in] lo lod object
- * \param[in] buf buffer containing LMV EA
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
int lod_parse_dir_striping(const struct lu_env *env, struct lod_object *lo,
const struct lu_buf *buf)
}
/**
- * Declare create a striped directory.
+ * lod_dir_declare_create_stripes() - Declare create a striped directory.
+ * @env: execution environment
+ * @dt: object
+ * @attr: attributes to initialize the objects with
+ * @dof: type of objects to be created
+ * @th: transaction handle
*
* Declare creating a striped directory with a given stripe pattern on the
* specified MDTs. A striped directory is represented as a regular directory
* identifies it as a striped directory. The function allocates FIDs
* for all stripes.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] attr attributes to initialize the objects with
- * \param[in] dof type of objects to be created
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_declare_create_stripes(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Allocate a striping on a predefined set of MDTs.
+ * lod_mdt_alloc_specific() - Allocate a striping on a predefined set of MDTs.
+ * @env: execution environment for this thread
+ * @lo: LOD object
+ * @stripes: striping created
+ * @mdt_indices: MDT indices of striping created
+ * @is_specific: true if the MDTs are provided by lum; false if only the
+ * starting MDT index is provided
*
* Allocates new striping using the MDT index range provided by the data from
* the lum_objects contained in the lmv_user_md passed to this method if
* release the stripes allocated. All the internal structures are protected,
* but no concurrent allocation is allowed on the same objects.
*
- * \param[in] env execution environment for this thread
- * \param[in] lo LOD object
- * \param[out] stripes striping created
- * \param[out] mdt_indices MDT indices of striping created
- * \param[in] is_specific true if the MDTs are provided by lum; false if
- * only the starting MDT index is provided
- *
- * \retval positive stripes allocated, including the first stripe allocated
- * outside
- * \retval negative errno on failure
+ * Return:
+ * * %positive stripes allocated, including the first stripe allocated outside
+ * * %negative errno on failure
*/
static int lod_mdt_alloc_specific(const struct lu_env *env,
struct lod_object *lo,
}
/**
+ * lod_alloc_foreign_lov() - Alloc cached foreign LOV
+ * @lo: object
+ * @size: size of foreign LOV
*
- * Alloc cached foreign LOV
- *
- * \param[in] lo object
- * \param[in] size size of foreign LOV
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
int lod_alloc_foreign_lov(struct lod_object *lo, size_t size)
{
}
/**
- *
- * Free cached foreign LOV
- *
- * \param[in] lo object
+ * lod_free_foreign_lov() - Free cached foreign LOV
+ * @lo: object
*/
void lod_free_foreign_lov(struct lod_object *lo)
{
}
/**
+ * lod_alloc_foreign_lmv() - Alloc cached foreign LMV
+ * @lo: object
+ * @size: size of foreign LMV
*
- * Alloc cached foreign LMV
- *
- * \param[in] lo object
- * \param[in] size size of foreign LMV
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_alloc_foreign_lmv(struct lod_object *lo, size_t size)
{
}
/**
- *
- * Free cached foreign LMV
- *
- * \param[in] lo object
+ * lod_free_foreign_lmv() - Free cached foreign LMV
+ * @lo: object
*/
static void lod_free_foreign_lmv(struct lod_object *lo)
{
}
/**
- * Declare create striped md object.
+ * lod_declare_xattr_set_lmv() - Declare create striped md object.
+ * @env: execution environment
+ * @dt: object
+ * @attr: attributes to initialize the objects with
+ * @lum_buf: a pattern specifying the number of stripes and MDT to start from
+ * @dof: type of objects to be created
+ * @th: transaction handle
*
* The function declares intention to create a striped directory. This is a
* wrapper for lod_prep_md_striped_create(). The only additional functionality
- * is to verify pattern \a lum_buf is good. Check that function for the details.
- *
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] attr attributes to initialize the objects with
- * \param[in] lum_buf a pattern specifying the number of stripes and
- * MDT to start from
- * \param[in] dof type of objects to be created
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * is to verify pattern @lum_buf is good. Check that function for the details.
*
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_xattr_set_lmv(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Set or replace striped directory layout, and LFSCK may set layout on a plain
- * directory, so don't check stripe count.
- *
- * \param[in] env execution environment
- * \param[in] dt target object
- * \param[in] lmv_buf LMV buf which contains source stripe FIDs
- * \param[in] fl set or replace
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * lod_dir_layout_set() - Set or replace striped directory layout, and LFSCK
+ * may set layout on a plain directory, so don't check stripe count.
+ * @env: execution environment
+ * @dt: target object
+ * @lmv_buf: LMV buf which contains source stripe FIDs
+ * @fl: set or replace
+ * @th: transaction handle
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_layout_set(const struct lu_env *env,
struct dt_object *dt,
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_xattr_set.
*
* Used with regular (non-striped) objects. Basically it
}
/**
- * Reset parent FID on OST object
+ * lod_replace_parent_fid() - Reset parent FID on OST object
+ * @env: execution environment
+ * @dt: dt_object whose stripes's parent FID will be reset
+ * @buf: buffer holding parent FID
+ * @th: thandle
+ * @declare: if it is declare
*
* Replace parent FID with @dt object FID, which is only called during migration
* to reset the parent FID after the MDT object is migrated to the new MDT, i.e.
* the FID is changed.
*
- * \param[in] env execution environment
- * \param[in] dt dt_object whose stripes's parent FID will be reset
- * \parem[in] th thandle
- * \param[in] declare if it is declare
- *
- * \retval 0 if reset succeeds
- * \retval negative errno if reset fails
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_replace_parent_fid(const struct lu_env *env,
struct dt_object *dt,
}
/**
+ * lod_declare_layout_add() - Declare component add
+ * @env: execution environment
+ * @dt: dt_object to add components on
+ * @buf: buffer contains components to be added
+ * @th: thandle
+ *
* Declare component add. The xattr name is XATTR_LUSTRE_LOV.add, and
* the xattr value is binary lov_comp_md_v1 which contains component(s)
* to be added.
- *
- * \param[in] env execution environment
- * \param[in] dt dt_object to add components on
- * \param[in] buf buffer contains components to be added
- * \parem[in] th thandle
*
- * \retval 0 on success
- * \retval negative errno on failure
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_layout_add(const struct lu_env *env,
struct dt_object *dt,
/**
* lod_last_non_stale_mirror() - Check if a mirror is the last non-stale mirror.
* @mirror_id: Mirror id to be checked.
- * @lo: LOD object.
+ * @lo: LOD object.
*
* This function checks if a mirror with specified @mirror_id is the last
* non-stale mirror of a LOD object @lo.
}
/**
+ * lod_declare_layout_set() - Declare component set
+ * @env: execution environment
+ * @dt: dt_object to be modified
+ * @op: operation string, like "set.flags"
+ * @buf: buffer contains components to be set
+ * @th: thandle
+ *
* Declare component set. The xattr is name XATTR_LUSTRE_LOV.set.$field,
* the '$field' can only be 'flags' now. The xattr value is binary
* lov_comp_md_v1 which contains the component ID(s) and the value of
- * the field to be modified.
- * Please update allowed_lustre_lov macro if $field groks more values
- * in the future.
+ * the field to be modified. Please update allowed_lustre_lov macro if $field
+ * groks more values in the future.
*
- * \param[in] env execution environment
- * \param[in] dt dt_object to be modified
- * \param[in] op operation string, like "set.flags"
- * \param[in] buf buffer contains components to be set
- * \parem[in] th thandle
- *
- * \retval 0 on success
- * \retval negative errno on failure
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_layout_set(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Declare component deletion. The xattr name is XATTR_LUSTRE_LOV.del,
- * and the xattr value is a unique component ID or a special lcme_id.
- *
- * \param[in] env execution environment
- * \param[in] dt dt_object to be operated on
- * \param[in] buf buffer contains component ID or lcme_id
- * \parem[in] th thandle
- *
- * \retval 0 on success
- * \retval negative errno on failure
+ * lod_declare_layout_del() - Declare component deletion. The xattr name is
+ * XATTR_LUSTRE_LOV.del, and the xattr value is a unique component ID or a
+ * special lcme_id.
+ * @env: execution environment
+ * @dt: dt_object to be operated on
+ * @buf: buffer contains component ID or lcme_id
+ * @th: thandle
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_layout_del(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Declare layout add/set/del operations issued by special xattr names:
- *
+ * lod_declare_modify_layout() - Declare layout add/set/del
+ * @env: execution environment
+ * @dt: object
+ * @name: name of xattr
+ * @buf: lu_buf contains xattr value
+ * @th: transaction handle
+ *
+ * operations issued by special xattr names:
* XATTR_LUSTRE_LOV.add add component(s) to existing file
* XATTR_LUSTRE_LOV.del delete component(s) from existing file
* XATTR_LUSTRE_LOV.set.$field set specified field of certain component(s)
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] name name of xattr
- * \param[in] buf lu_buf contains xattr value
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_modify_layout(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Convert a plain file lov_mds_md to a composite layout.
+ * lod_layout_convert() - Convert a plain file lov_mds_md to a composite layout
+ * @info: the thread info::lti_ea_store buffer contains little endian plain file
+ * layout [in,out]
*
- * \param[in,out] info the thread info::lti_ea_store buffer contains little
- * endian plain file layout
- *
- * \retval 0 on success, <0 on failure
+ * Returns 0 on success, <0 on failure
*/
static int lod_layout_convert(struct lod_thread_info *info)
{
return rc;
}
-/**
+/*
* Merge layouts to form a mirrored file.
*/
static int lod_declare_layout_merge(const struct lu_env *env,
RETURN(rc);
}
-/**
+/*
* Split layouts, just set the LOVEA with the layout from mbuf.
*/
static int lod_declare_layout_split(const struct lu_env *env,
RETURN(rc);
}
-/**
+/*
* Purge layouts, delete sub objects in the mirror stored in the vic_buf,
* and set the LOVEA with the layout from mbuf.
*/
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_xattr_set.
*
* \see dt_object_operations::do_declare_xattr_set() in the API description
}
/**
- * Apply xattr changes to the object.
+ * lod_xattr_set_internal() - Apply xattr changes to the object.
+ * @env: execution environment
+ * @dt: object
+ * @buf: buffer pointing to the new value of xattr
+ * @name: name of xattr
+ * @fl: flags
+ * @th: transaction handle
*
* Applies xattr changes to the object and the stripes if the latter exist.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] buf buffer pointing to the new value of xattr
- * \param[in] name name of xattr
- * \param[in] fl flags
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_set_internal(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Delete an extended attribute.
+ * lod_xattr_del_internal() - Delete an extended attribute.
+ * @env: execution environment
+ * @dt: object
+ * @name: name of xattr
+ * @th: transaction handle
*
* Deletes specified xattr from the object and the stripes if the latter exist.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] name name of xattr
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_del_internal(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Set default striping on a directory.
+ * lod_xattr_set_lov_on_dir() - Set default striping on a directory.
+ * @env: execution environment
+ * @dt: the striped object
+ * @buf: buffer with the striping
+ * @name: name of EA
+ * @fl: xattr flag (see OSD API description)
+ * @th: transaction handle
*
* Sets specified striping on a directory object unless it matches the default
* striping (LOVEA_DELETE_VALUES() macro). In the latter case remove existing
* EA. This striping will be used when regular file is being created in this
* directory.
*
- * \param[in] env execution environment
- * \param[in] dt the striped object
- * \param[in] buf buffer with the striping
- * \param[in] name name of EA
- * \param[in] fl xattr flag (see OSD API description)
- * \param[in] th transaction handle
*
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_set_lov_on_dir(const struct lu_env *env,
struct dt_object *dt,
struct dt_allocation_hint *ah);
/**
- * Helper function to convert compound layout to compound layout with
- * pool
- *
- * Copy lcm_entries array of \a src to \a tgt. Replace lov_user_md_v1
- * components of \a src with lov_user_md_v3 using \a pool.
- *
- * \param[in] src source layout
- * \param[in] pool pool to use in \a tgt
- * \param[out] tgt target layout
+ * embed_pool_to_comp_v1() - Helper function to convert compound layout to
+ * compound layout with pool
+ * @src: source layout
+ * @pool: pool to use in \a tgt
+ * @tgt: target layout [out]
+ *
+ * Copy lcm_entries array of @src to @tgt. Replace lov_user_md_v1
+ * components of @src with lov_user_md_v3 using @pool.
*/
static void embed_pool_to_comp_v1(const struct lov_comp_md_v1 *src,
const char *pool,
}
/**
- * Set default striping on a directory.
+ * lod_xattr_set_default_lov_on_dir() - Set default striping on a directory.
+ * @env: execution environment
+ * @dt: the striped object
+ * @buf: buffer with the striping
+ * @name: name of EA
+ * @fl: xattr flag (see OSD API description)
+ * @th: transaction handle
*
* Sets specified striping on a directory object unless it matches the default
* striping (LOVEA_DELETE_VALUES() macro). In the latter case remove existing
* If current default striping includes a pool but specifed striping
* does not - retain the pool if it exists.
*
- * \param[in] env execution environment
- * \param[in] dt the striped object
- * \param[in] buf buffer with the striping
- * \param[in] name name of EA
- * \param[in] fl xattr flag (see OSD API description)
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_set_default_lov_on_dir(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Set default striping on a directory object.
+ * lod_xattr_set_default_lmv_on_dir() - Set default striping on directory object
+ * @env: execution environment
+ * @dt: the striped object
+ * @buf: buffer with the striping
+ * @name: name of EA
+ * @fl: xattr flag (see OSD API description)
+ * @th: transaction handle
*
* Sets specified striping on a directory object unless it matches the default
* striping (LOVEA_DELETE_VALUES() macro). In the latter case remove existing
* EA. This striping will be used when a new directory is being created in the
* directory.
*
- * \param[in] env execution environment
- * \param[in] dt the striped object
- * \param[in] buf buffer with the striping
- * \param[in] name name of EA
- * \param[in] fl xattr flag (see OSD API description)
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_set_default_lmv_on_dir(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Turn directory into a striped directory.
+ * lod_xattr_set_lmv() - Turn directory into a striped directory.
+ * @env: execution environment
+ * @dt: the striped object
+ * @buf: buf lmv_user_md for create, or lmv_mds_md for replay
+ * @name: not used currently
+ * @fl: xattr flag (see OSD API description)
+ * @th: transaction handle
*
* During replay the client sends the striping created before MDT
* failure, then the layer above LOD sends this defined striping
* of the stripes. Notice the original information for the striping
* (#stripes, FIDs, etc) was transferred in declare path.
*
- * \param[in] env execution environment
- * \param[in] dt the striped object
- * \param[in] buf buf lmv_user_md for create, or lmv_mds_md for replay
- * \param[in] name not used currently
- * \param[in] fl xattr flag (see OSD API description)
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_xattr_set_lmv(const struct lu_env *env, struct dt_object *dt,
const struct lu_buf *buf, const char *name,
}
/**
- * Helper function to declare/execute creation of a striped directory
+ * lod_dir_striping_create_internal() - Helper function to declare/execute
+ * creation of a striped directory
+ * @env: execution environment
+ * @dt: object
+ * @attr: attributes the stripes will be created with
+ * @lmu: lmv_user_md if MDT indices are specified
+ * @dof: format of stripes (see OSD API description)
+ * @th: transaction handle
+ * @declare: where to call "declare" or "execute" methods
*
* Called in declare/create object path, prepare striping for a directory
* and prepare defaults data striping for the objects to be created in
* arguments for the both phases are the same and this is the reason for
* this function to exist.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] attr attributes the stripes will be created with
- * \param[in] lmu lmv_user_md if MDT indices are specified
- * \param[in] dof format of stripes (see OSD API description)
- * \param[in] th transaction handle
- * \param[in] declare where to call "declare" or "execute" methods
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_striping_create_internal(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Make LOV EA for striped object.
+ * lod_generate_and_set_lovea() - Make LOV EA for striped object.
+ * @env: execution environment for this thread
+ * @lo: LOD object
+ * @th: transaction handle
*
* Generate striping information and store it in the LOV EA of the given
* object. The caller must ensure nobody else is calling the function
* FLDB service must be running as well; it's used to map FID to the target,
* which is stored in LOV EA.
*
- * \param[in] env execution environment for this thread
- * \param[in] lo LOD object
- * \param[in] th transaction handle
- *
- * \retval 0 if LOV EA is stored successfully
- * \retval negative error number on failure
+ * Return:
+ * * %0 if LOV EA is stored successfully
+ * * %negative error number on failure
*/
static int lod_generate_and_set_lovea(const struct lu_env *env,
struct lod_object *lo,
int mirror_id, int comp_idx);
/**
- * Repeat an existing component
+ * lod_layout_repeat_comp() - Repeat an existing component
+ * @env: execution environment for this thread
+ * @lo: object to update the layout of
+ * @index: index of component to copy
*
* Creates a new layout by replicating an existing component. Uses striping
* policy from previous component as a template for the striping for the new
* NB: Reallocates layout components array (lo->ldo_comp_entries), invalidating
* any pre-existing pointers to components. Handle with care.
*
- * \param[in] env execution environment for this thread
- * \param[in,out] lo object to update the layout of
- * \param[in] index index of component to copy
- *
- * \retval 0 on success
- * \retval negative errno on error
+ * Return:
+ * * %0 on success
+ * * %negative errno on error
*/
static int lod_layout_repeat_comp(const struct lu_env *env,
struct lod_object *lo, int index)
}
/**
- * Prepare new layout minus deleted components
+ * lod_layout_del_prep_layout() - Prepare new layout minus deleted components
+ * @env: execution environment for this thread
+ * @lo: object to update the layout of
+ * @th: transaction handle for this operation
*
* Removes components marked for deletion (LCME_ID_INVAL) by copying to a new
* layout and skipping those components. Removes stripe objects if any exist.
*
* Caller is responsible for updating mirror end (ldo_mirror[].lme_end).
*
- * \param[in] env execution environment for this thread
- * \param[in,out] lo object to update the layout of
- * \param[in] th transaction handle for this operation
- *
- * \retval # of components deleted
- * \retval negative errno on error
+ * Return:
+ * * %positive# of components deleted
+ * * %negative errno on error
*/
static int lod_layout_del_prep_layout(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Delete layout component(s)
+ * lod_layout_del() - Delete layout component(s)
+ * @env: execution environment for this thread
+ * @dt: object
+ * @th: transaction handle
*
* This function sets up the layout data in the env and does the setattrs
* required to write out the new layout. The layout itself is modified in
* lod_layout_del_prep_layout.
*
- * \param[in] env execution environment for this thread
- * \param[in] dt object
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative error number on failure
+ * Return:
+ * * %0 on success
+ * * %negative error number on failure
*/
static int lod_layout_del(const struct lu_env *env, struct dt_object *dt,
struct thandle *th)
/**
- * Implementation of dt_object_operations::do_xattr_set.
+ * lod_xattr_set() - Implementation of dt_object_operations::do_xattr_set
+ * @env: execution environment for this thread
+ * @dt: object to lock for reading
+ * @buf: unused, may be removed in the future
+ * @name: name of the extended attribute
+ * @fl: LU_XATTR_CREATE - fail if EA exists
+ * LU_XATTR_REPLACE - fail if EA doesn't exist
+ * @th: transaction handle
*
* Sets specified extended attribute on the object. Three types of EAs are
* special:
* LOV EA storing all the stripes directly or LMV EA storing just a small header
* with striping configuration.
*
- * \see dt_object_operations::do_xattr_set() in the API description for details.
+ * see dt_object_operations::do_xattr_set() in the API description for details.
+ *
+ * Return:
+ * * %0 on success
+ * * %negative on failure
*/
static int lod_xattr_set(const struct lu_env *env,
struct dt_object *dt, const struct lu_buf *buf,
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_xattr_del.
*
- * \see dt_object_operations::do_declare_xattr_del() in the API description
+ * see dt_object_operations::do_declare_xattr_del() in the API description
* for details.
*/
static int lod_declare_xattr_del(const struct lu_env *env,
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_xattr_del.
*
* If EA storing a regular striping is being deleted, then release
* all the references to the stripe objects in core.
*
- * \see dt_object_operations::do_xattr_del() in the API description for details.
+ * see dt_object_operations::do_xattr_del() in the API description for details.
*/
static int lod_xattr_del(const struct lu_env *env, struct dt_object *dt,
const char *name, struct thandle *th)
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_xattr_list.
*
- * \see dt_object_operations::do_xattr_list() in the API description
+ * see dt_object_operations::do_xattr_list() in the API description
* for details.
*/
static int lod_xattr_list(const struct lu_env *env,
}
/**
- * Copy OST list from layout provided by user.
+ * lod_comp_copy_ost_lists() - Copy OST list from layout provided by user.
+ * @lod_comp: layout_component to be filled
+ * @v3: LOV EA V3 user data
*
- * \param[in] lod_comp layout_component to be filled
- * \param[in] v3 LOV EA V3 user data
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
int lod_comp_copy_ost_lists(struct lod_layout_component *lod_comp,
struct lov_user_md_v3 *v3)
/**
- * Get default striping.
- *
- * \param[in] env execution environment
- * \param[in] lo object
- * \param[out] lds default striping
- *
- * \retval 0 on success
- * \retval negative if failed
+ * lod_get_default_lov_striping() - Get default striping.
+ * @env: execution environment
+ * @lo: object
+ * @lds: default striping
+ * @dah: pointer to a struct that gives allocation hints
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_get_default_lov_striping(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Get default directory striping.
- *
- * \param[in] env execution environment
- * \param[in] lo object
- * \param[out] lds default striping
- *
- * \retval 0 on success
- * \retval negative if failed
+ * lod_get_default_lmv_striping() - Get default directory striping.
+ * @env: execution environment
+ * @lo: object
+ * @lds: default striping
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_get_default_lmv_striping(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Get default striping in the object.
+ * lod_get_default_striping() - Get default striping in the object.
+ * @env: execution environment
+ * @lo: object
+ * @ah: pointer to a struct that gives allocation hints
+ * @lds: default striping
*
* Get object default striping and default directory striping.
*
- * \param[in] env execution environment
- * \param[in] lo object
- * \param[out] lds default striping
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_get_default_striping(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Apply default striping on object.
+ * lod_striping_from_default() - Apply default striping on object.
+ * @lo: new object
+ * @lds: default striping
+ * @mode: new object's mode
*
* If object striping pattern is not set, set to the one in default striping.
* The default striping is from parent or fs.
- *
- * \param[in] lo new object
- * \param[in] lds default striping
- * \param[in] mode new object's mode
*/
static void lod_striping_from_default(struct lod_object *lo,
const struct lod_default_striping *lds,
return false;
}
-/**
+/*
* Implementation of dt_object_operations::do_ah_init.
*
* This method is used to make a decision on the striping configuration for the
* stripe size/offset, pool name, hash_type, etc.) is stored in the object
* itself and will be used by the methods like ->doo_declare_create().
*
- * \see dt_object_operations::do_ah_init() in the API description for details.
+ * see dt_object_operations::do_ah_init() in the API description for details.
*/
static void lod_ah_init(const struct lu_env *env,
struct dt_allocation_hint *ah,
}
/**
- * Size initialization on late striping.
+ * lod_declare_init_size() - Size initialization on late striping.
*
* Propagate the size of a truncated object to a deferred striping.
* This function handles a special case when truncate was done on a
* we can't lose that size, so we have to propagate it to the stripes
* being created.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] th transaction handle
+ * @env: execution environment
+ * @dt: object
+ * @th: transaction handle
*
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_declare_init_size(const struct lu_env *env,
struct dt_object *dt, struct thandle *th)
}
/**
- * Declare creation of striped object.
+ * lod_declare_striped_create() - Declare creation of striped object.
*
* The function declares creation stripes for a regular object. The function
* also declares whether the stripes will be created with non-zero size if
- * previously size was set non-zero on the master object. If object \a dt is
- * not local, then only fully defined striping can be applied in \a lovea.
- * Otherwise \a lovea can be in the form of pattern, see lod_qos_parse_config()
+ * previously size was set non-zero on the master object. If object @dt is
+ * not local, then only fully defined striping can be applied in @lovea.
+ * Otherwise @lovea can be in the form of pattern, see lod_qos_parse_config()
* for the details.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] attr attributes the stripes will be created with
- * \param[in] lovea a buffer containing striping description
- * \param[in] th transaction handle
+ * @env: execution environment
+ * @dt: object
+ * @attr: attributes the stripes will be created with
+ * @lovea: a buffer containing striping description
+ * @th: transaction handle
*
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
int lod_declare_striped_create(const struct lu_env *env, struct dt_object *dt,
struct lu_attr *attr,
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_create.
*
* The method declares creation of a new object. If the object will be striped,
* creation of the stripes and declare initialization of the striping
* information to be stored in the master object.
*
- * \see dt_object_operations::do_declare_create() in the API description
+ * see dt_object_operations::do_declare_create() in the API description
* for details.
*/
static int lod_declare_create(const struct lu_env *env, struct dt_object *dt,
}
/**
- * Generate component ID for new created component.
- *
- * \param[in] lo LOD object
- * \param[in] comp_idx index of ldo_comp_entries
- *
- * \retval component ID on success
- * \retval LCME_ID_INVAL on failure
+ * lod_gen_component_id() - Generate component ID for new created component.
+ * @lo: LOD object
+ * @mirror_id: New generated component will have this @mirror_id
+ * @comp_idx: index of ldo_comp_entries
+ *
+ * Return:
+ * * %component ID on success
+ * * %LCME_ID_INVAL on failure
*/
static __u32 lod_gen_component_id(struct lod_object *lo,
int mirror_id, int comp_idx)
}
/**
- * Creation of a striped regular object.
+ * lod_striped_create() - Creation of a striped regular object.
+ * @env: execution environment
+ * @dt: object
+ * @attr: attributes the stripes will be created with
+ * @dof: format of stripes (see OSD API description)
+ * @th: transaction handle
*
* The function is called to create the stripe objects for a regular
* striped file. This can happen at the initial object creation or
* prepared in the form of the list of objects (ldo_stripe field).
* This is done during declare phase.
*
- * \param[in] env execution environment
- * \param[in] dt object
- * \param[in] attr attributes the stripes will be created with
- * \param[in] dof format of stripes (see OSD API description)
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
int lod_striped_create(const struct lu_env *env, struct dt_object *dt,
struct lu_attr *attr, struct dt_object_format *dof,
LOV_PATTERN_MDT);
}
-/**
+/*
* Implementation of dt_object_operations::do_create.
*
* If any of preceeding methods (like ->do_declare_create(),
* ->do_ah_init(), etc) chose to create a striped object,
* then this method will create the master and the stripes.
*
- * \see dt_object_operations::do_create() in the API description for details.
+ * see dt_object_operations::do_create() in the API description for details.
*/
static int lod_create(const struct lu_env *env, struct dt_object *dt,
struct lu_attr *attr, struct dt_allocation_hint *hint,
return 0;
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_destroy.
*
* If the object is a striped directory, then the function declares reference
* destroy of all the stripes. In all the cases, it declares an intention to
* destroy the object itself.
*
- * \see dt_object_operations::do_declare_destroy() in the API description
+ * see dt_object_operations::do_declare_destroy() in the API description
* for details.
*/
static int lod_declare_destroy(const struct lu_env *env, struct dt_object *dt,
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_destroy.
*
* If the object is a striped directory, then the function removes references
* from the master object (this is an index) to the stripes and destroys all
* the stripes. In all the cases, the function destroys the object itself.
*
- * \see dt_object_operations::do_destroy() in the API description for details.
+ * see dt_object_operations::do_destroy() in the API description for details.
*/
static int lod_destroy(const struct lu_env *env, struct dt_object *dt,
struct thandle *th)
RETURN(rc);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_ref_add.
*
- * \see dt_object_operations::do_declare_ref_add() in the API description
+ * see dt_object_operations::do_declare_ref_add() in the API description
* for details.
*/
static int lod_declare_ref_add(const struct lu_env *env,
return lod_sub_declare_ref_add(env, dt_object_child(dt), th);
}
-/**
+/*
* Implementation of dt_object_operations::do_ref_add.
*
- * \see dt_object_operations::do_ref_add() in the API description for details.
+ * see dt_object_operations::do_ref_add() in the API description for details.
*/
static int lod_ref_add(const struct lu_env *env,
struct dt_object *dt, struct thandle *th)
return lod_sub_ref_add(env, dt_object_child(dt), th);
}
-/**
+/*
* Implementation of dt_object_operations::do_declare_ref_del.
*
- * \see dt_object_operations::do_declare_ref_del() in the API description
+ * see dt_object_operations::do_declare_ref_del() in the API description
* for details.
*/
static int lod_declare_ref_del(const struct lu_env *env,
return lod_sub_declare_ref_del(env, dt_object_child(dt), th);
}
-/**
+/*
* Implementation of dt_object_operations::do_ref_del
*
- * \see dt_object_operations::do_ref_del() in the API description for details.
+ * see dt_object_operations::do_ref_del() in the API description for details.
*/
static int lod_ref_del(const struct lu_env *env,
struct dt_object *dt, struct thandle *th)
return lod_sub_ref_del(env, dt_object_child(dt), th);
}
-/**
+/*
* Implementation of dt_object_operations::do_object_sync.
*
- * \see dt_object_operations::do_object_sync() in the API description
+ * see dt_object_operations::do_object_sync() in the API description
* for details.
*/
static int lod_object_sync(const struct lu_env *env, struct dt_object *dt,
return dt_object_sync(env, dt_object_child(dt), start, end);
}
-/**
+/*
* Implementation of dt_object_operations::do_object_unlock.
*
* Used to release LDLM lock(s).
*
- * \see dt_object_operations::do_object_unlock() in the API description
+ * see dt_object_operations::do_object_unlock() in the API description
* for details.
*/
static int lod_object_unlock(const struct lu_env *env, struct dt_object *dt,
RETURN(0);
}
-/**
+/*
* Implementation of dt_object_operations::do_object_lock.
*
* Used to get LDLM lock on the non-striped and striped objects.
*
- * \see dt_object_operations::do_object_lock() in the API description
+ * see dt_object_operations::do_object_lock() in the API description
* for details.
*/
static int lod_object_lock(const struct lu_env *env,
RETURN(0);
}
-/**
+/*
* Implementation of dt_object_operations::do_invalidate.
*
- * \see dt_object_operations::do_invalidate() in the API description for details
+ * see dt_object_operations::do_invalidate() in the API description for details
*/
static int lod_invalidate(const struct lu_env *env, struct dt_object *dt)
{
}
/**
- * Check OSTs for an existing component for further extension
+ * lod_sel_osts_allowed() - Check OSTs for an existing component for further
+ * extension
+ * @env: execution environment for this thread
+ * @lo: object we're checking
+ * @index: index of this component
+ * @reserve: space to be reserved for each OST.
+ * @extent: layout extent for requested operation
+ * @comp_extent: extension component extent
+ * @write: if this is write operation
*
* Checks if OSTs are still healthy and not out of space. Gets free space
* on OSTs (relative to allocation watermark rmb_low) and compares to
*
* Decides whether or not to extend a component on its current OSTs.
*
- * \param[in] env execution environment for this thread
- * \param[in] lo object we're checking
- * \param[in] index index of this component
- * \param[in] extension_size extension size for this component
- * \param[in] extent layout extent for requested operation
- * \param[in] comp_extent extension component extent
- * \param[in] write if this is write operation
- *
- * \retval true - OK to extend on current OSTs
- * \retval false - do not extend on current OSTs
+ * Return:
+ * * %true - OK to extend on current OSTs
+ * * %false - do not extend on current OSTs
*/
static bool lod_sel_osts_allowed(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Adjust extents after component removal
+ * lod_sel_adjust_extents() - Adjust extents after component removal
+ * @env: execution environment for this thread
+ * @lo: object
+ * @max_comp: layout component
+ * @index: index of this component
*
* When we remove an extension component, we move the start of the next
* component to match the start of the extension component, so no space is left
* without layout.
*
- * \param[in] env execution environment for this thread
- * \param[in] lo object
- * \param[in] max_comp layout component
- * \param[in] index index of this component
- *
- * \retval 0 on success
- * \retval negative errno on error
+ * Return:
+ * * %0 on success
+ * * %negative errno on error
*/
static void lod_sel_adjust_extents(const struct lu_env *env,
struct lod_object *lo,
}
/**
+ * lod_sel_stripe_reserved() - Calculate reservation (per-OST extension_size)
+ * @lod_comp: lod component we are checking
+ *
* Calculate the exact reservation (per-OST extension_size) on the OSTs being
* instantiated. It needs to be calculated in advance and taken into account at
* the instantiation time, because otherwise lod_statfs_and_check() may consider
* OST may turn out to be low-on-space, thus inappropriate OST may be used and
* ENOSPC occurs.
*
- * \param[in] lod_comp lod component we are checking
- *
- * \retval size to reserved on each OST of lod_comp's stripe.
+ * Returns size to reserved on each OST of lod_comp's stripe.
*/
static __u64 lod_sel_stripe_reserved(struct lod_layout_component *lod_comp)
{
* times, this is the data for the next call. Fields could be changed to
* component indexes when needed, (e.g. if there is no need to instantiate
* all the previous components up to the current position) to tell the caller
- * where to start over from. */
+ * where to start over from.
+ */
struct sel_data {
int sd_force;
int sd_repeat;
};
/**
- * Process extent updates for a particular layout component
+ * lod_sel_handler() - Process extent updates for a particular layout component
+ * @env: execution environment for this thread
+ * @lo: object to update the layout of
+ * @extent: layout extent for requested operation, update layout to fit this
+ * operation
+ * @th: transaction handle for this operation
+ * @max_comp: the highest comp for the portion of the layout we are operating
+ * on (For FLR, the chosen replica). Updated because we may remove components.
+ * @index: index of the extension space component we're working on
+ * @write: if this is write op
+ * @sd: if the extension is to be forced; set here to force it on the arshad
+ * 2nd call for the same extension component
*
* Handle layout updates for a particular extension space component touched by
* a layout update operation. Core function of self-extending PFL feature.
* component is exhausted (all of its range has been given to real components),
* so we remove it and restart processing.
*
- * \param[in] env execution environment for this thread
- * \param[in,out] lo object to update the layout of
- * \param[in] extent layout extent for requested operation, update
- * layout to fit this operation
- * \param[in] th transaction handle for this operation
- * \param[in,out] max_comp the highest comp for the portion of the layout
- * we are operating on (For FLR, the chosen
- * replica). Updated because we may remove
- * components.
- * \param[in] index index of the extension space component we're
- * working on
- * \param[in] write if this is write op
- * \param[in,out] force if the extension is to be forced; set here
- to force it on the 2nd call for the same
- extension component
- *
- * \retval 0 on success
- * \retval negative errno on error
+ * Return:
+ * * %0 on success
+ * * %negative errno on error
*/
static int lod_sel_handler(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Declare layout extent updates
+ * lod_declare_update_extents() - Declare layout extent updates
+ * @env: execution environment for this thread
+ * @lo: object to update the layout of
+ * @extent: layout extent for requested operation, update layout to
+ * fit this operation
+ * @th: transaction handle for this operation
+ * @pick: identifies chosen mirror for FLR layouts
+ * @write: if this is write op
*
* Handles extensions. Identifies extension components touched by current
* operation and passes them to processing function.
* Restarts with updated layouts from the processing function until the current
* operation no longer touches an extension space component.
*
- * \param[in] env execution environment for this thread
- * \param[in,out] lo object to update the layout of
- * \param[in] extent layout extent for requested operation, update layout to
- * fit this operation
- * \param[in] th transaction handle for this operation
- * \param[in] pick identifies chosen mirror for FLR layouts
- * \param[in] write if this is write op
- *
- * \retval 1 on layout changed, 0 on no change
- * \retval negative errno on error
+ * Return:
+ * * %1 on layout changed
+ * * %0 on no change
+ * * %negative errno on error
*/
static int lod_declare_update_extents(const struct lu_env *env,
struct lod_object *lo, struct lu_extent *extent,
}
/**
- * Declare layout update for a non-FLR layout.
- *
- * \param[in] env execution environment for this thread
- * \param[in,out] lo object to update the layout of
- * \param[in] layout layout intent for requested operation, "update" is
- * a process of reacting to this
- * \param[in] buf buffer containing lov ea (see comment on usage inline)
- * \param[in] th transaction handle for this operation
- *
- * \retval 0 on success
- * \retval negative errno on error
+ * lod_declare_update_plain() - Declare layout update for a non-FLR layout.
+ * @env: execution environment for this thread
+ * @lo: object to update the layout of
+ * @layout: layout intent for requested operation, "update" is a process of
+ * reacting to this
+ * @buf: buffer containing lov ea (see comment on usage inline)
+ * @th: transaction handle for this operation
+ *
+ * Return:
+ * * %0 on success
+ * * %negative errno on error
*/
static int lod_declare_update_plain(const struct lu_env *env,
struct lod_object *lo, struct layout_intent *layout,
return lod_comp - lo->ldo_comp_entries;
}
-/**
+/*
* Stale other mirrors by writing extent.
*/
static int lod_stale_components(const struct lu_env *env, struct lod_object *lo,
}
/**
- * check an OST's availability
- * \param[in] env execution environment
- * \param[in] lo lod object
- * \param[in] dt dt object
- * \param[in] index mirror index
- *
- * \retval negative if failed
- * \retval 1 if \a dt is available
- * \retval 0 if \a dt is not available
+ * lod_check_ost_avail() - check an OST's availability
+ * @env: execution environment
+ * @lo: lod object
+ * @dt: dt object
+ * @index: mirror index
+ *
+ * Return:
+ * * %negative if failed
+ * * %1 if @dt is available
+ * * %0 if @dt is not available
*/
static inline int lod_check_ost_avail(const struct lu_env *env,
struct lod_object *lo,
}
/**
- * Pick primary mirror for write
- * \param[in] env execution environment
- * \param[in] lo object
- * \param[in] extent write range
+ * lod_primary_pick() - Pick primary mirror for write
+ * @env: execution environment
+ * @lo: object
+ * @extent: write range
+ *
+ * Return:
+ * * %0 on success
+ * * %negative on failure
*/
static int lod_primary_pick(const struct lu_env *env, struct lod_object *lo,
struct lu_extent *extent)
return 0;
}
-/**
+/*
* figure out the components should be instantiated for resync.
*/
static int lod_prepare_resync(const struct lu_env *env, struct lod_object *lo,
struct thandle *th);
/**
- * Attach stripes after target's for migrating directory. NB, we
- * only need to declare this, the actual work is done inside
+ * lod_dir_declare_layout_attach() - Attach stripes after target's for migrating
+ * directory. NB, we only need to declare this, the actual work is done inside
* lod_xattr_set_lmv().
- *
- * \param[in] env execution environment
- * \param[in] dt target object
- * \param[in] mlc layout change data
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * @env: execution environment
+ * @dt: target object
+ * @mlc: layout change data
+ * @th: transaction handle
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_declare_layout_attach(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Allocate stripes for split directory.
- *
- * \param[in] env execution environment
- * \param[in] dt target object
- * \param[in] mlc layout change data
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * lod_dir_declare_layout_split() - Allocate stripes for split directory.
+ * @env: execution environment
+ * @dt: target object
+ * @mlc: layout change data
+ * @th: transaction handle
+ *
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_declare_layout_split(const struct lu_env *env,
struct dt_object *dt,
RETURN(rc);
}
-/*
- * detach all stripes from dir master object, NB, stripes are not destroyed, but
+/**
+ * lod_dir_layout_detach() - detach all stripes from dir master object
+ * @env: execution environment
+ * @dt: target object
+ * @mlc: layout change data
+ * @th: transaction handle
+ *
+ * Detach all stripes from dir master object, NB, stripes are not destroyed, but
* deleted from it's parent namespace, this function is called in two places:
* 1. mdd_migrate_mdt() detach stripes from source, and attach them to
* target.
* 2. mdd_dir_layout_update() detach stripe before turning 1-stripe directory to
* a plain directory.
*
- * \param[in] env execution environment
- * \param[in] dt target object
- * \param[in] mlc layout change data
- * \param[in] th transaction handle
- *
- * \retval 0 on success
- * \retval negative if failed
+ * Return:
+ * * %0 on success
+ * * %negative if failed
*/
static int lod_dir_layout_detach(const struct lu_env *env,
struct dt_object *dt,
}
/**
- * Instantiate layout component objects which covers the intent write offset.
+ * lod_layout_change() - Client is trying to write to un-instantiated
+ * layout component.
+ * @env: execution environment for this thread
+ * @dt: object
+ * @mlc: data structure to describe the changes to the DT object's layout
+ * @th: transactional handle (for atomic changes)
+ *
+ * Instantiate layout component objects which covers the intent write
+ * offset.
+ *
+ * Return: 0 on success, negative on error
*/
static int lod_layout_change(const struct lu_env *env, struct dt_object *dt,
struct md_layout_change *mlc, struct thandle *th)
.do_layout_check = lod_layout_check,
};
-/**
+/*
* Implementation of dt_body_operations::dbo_read.
*
- * \see dt_body_operations::dbo_read() in the API description for details.
+ * see dt_body_operations::dbo_read() in the API description for details.
*/
static ssize_t lod_read(const struct lu_env *env, struct dt_object *dt,
struct lu_buf *buf, loff_t *pos)
return next->do_body_ops->dbo_read(env, next, buf, pos);
}
-/**
+/*
* Implementation of dt_body_operations::dbo_declare_write.
*
- * \see dt_body_operations::dbo_declare_write() in the API description
+ * see dt_body_operations::dbo_declare_write() in the API description
* for details.
*/
static ssize_t lod_declare_write(const struct lu_env *env,
return lod_sub_declare_write(env, dt_object_child(dt), buf, pos, th);
}
-/**
+/*
* Implementation of dt_body_operations::dbo_write.
*
- * \see dt_body_operations::dbo_write() in the API description for details.
+ * see dt_body_operations::dbo_write() in the API description for details.
*/
static ssize_t lod_write(const struct lu_env *env, struct dt_object *dt,
const struct lu_buf *buf, loff_t *pos,
};
/**
- * Implementation of lu_object_operations::loo_object_init.
+ * lod_object_init() - Implementation of lu_object_operations::loo_object_init.
+ * @env: execution environment
+ * @lo: pointer to lu_object (based on FID)
+ * @conf: @lo configuration
*
* The function determines the type and the index of the target device using
* sequence of the object's FID. Then passes control down to the
- * corresponding device:
- * OSD for the local objects, OSP for remote
+ * corresponding device: OSD for the local objects, OSP for remote
*
- * \see lu_object_operations::loo_object_init() in the API description
+ * see lu_object_operations::loo_object_init() in the API description
* for details.
+ *
+ * Return:
+ * * %0 on Success
+ * * %negative on Error
*/
static int lod_object_init(const struct lu_env *env, struct lu_object *lo,
const struct lu_object_conf *conf)
}
/**
- *
- * Release resources associated with striping.
+ * lod_striping_free_nolock() - Release resources associated with striping.
+ * @env: execution environment
+ * @lo: object (file/folder)
*
* If the object is striped (regular or directory), then release
* the stripe objects references and free the ldo_stripe array.
- *
- * \param[in] env execution environment
- * \param[in] lo object
*/
void lod_striping_free_nolock(const struct lu_env *env, struct lod_object *lo)
{
mutex_unlock(&lo->ldo_layout_mutex);
}
-/**
+/*
* Implementation of lu_object_operations::loo_object_free.
*
- * \see lu_object_operations::loo_object_free() in the API description
+ * see lu_object_operations::loo_object_free() in the API description
* for details.
*/
static void lod_object_free(const struct lu_env *env, struct lu_object *o)
OBD_SLAB_FREE_PTR(lo, lod_object_kmem);
}
-/**
+/*
* Implementation of lu_object_operations::loo_object_release.
*
- * \see lu_object_operations::loo_object_release() in the API description
+ * see lu_object_operations::loo_object_release() in the API description
* for details.
*/
static void lod_object_release(const struct lu_env *env, struct lu_object *o)
* creation failed before? */
}
-/**
+/*
* Implementation of lu_object_operations::loo_object_print.
*
- * \see lu_object_operations::loo_object_print() in the API description
+ * see lu_object_operations::loo_object_print() in the API description
* for details.
*/
static int lod_object_print(const struct lu_env *env, void *cookie,