Moved comment over __osd_xattr_load() to __osd_xattr_get(),
where it really belongs, and converted it to Doxygen format.
Added a few other minor cleanups as well.
Signed-off-by: Isaac Huang <he.huang@intel.com>
Change-Id: If73048d046419eaa4e23cbc5acde32c09b588996
Reviewed-on: http://review.whamcloud.com/12350
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
.dbo_declare_punch = osd_declare_punch,
.dbo_punch = osd_punch,
};
.dbo_declare_punch = osd_declare_punch,
.dbo_punch = osd_punch,
};
.do_attr_get = osd_otable_it_attr_get,
.do_index_try = osd_index_try,
};
.do_attr_get = osd_otable_it_attr_get,
.do_index_try = osd_index_try,
};
#include <linux/posix_acl_xattr.h>
#include <linux/posix_acl_xattr.h>
-/*
- * Copy an extended attribute into the buffer provided, or compute the
- * required buffer size.
- *
- * If buf is NULL, it computes the required buffer size.
- *
- * Returns 0 on success or a negative error number on failure.
- * On success, the number of bytes used / required is stored in 'size'.
- *
- * No locking is done here.
- */
int __osd_xattr_load(struct osd_device *osd, uint64_t dnode, nvlist_t **sa)
{
sa_handle_t *sa_hdl;
int __osd_xattr_load(struct osd_device *osd, uint64_t dnode, nvlist_t **sa)
{
sa_handle_t *sa_hdl;
-int __osd_sa_xattr_get(const struct lu_env *env, struct osd_object *obj,
- const struct lu_buf *buf, const char *name, int *sizep)
+static int
+__osd_sa_xattr_get(const struct lu_env *env, struct osd_object *obj,
+ const struct lu_buf *buf, const char *name, int *sizep)
{
uchar_t *nv_value;
int rc;
{
uchar_t *nv_value;
int rc;
+/**
+ * Copy an extended attribute into the buffer provided, or compute
+ * the required buffer size if \a buf is NULL.
+ *
+ * On success, the number of bytes used or required is stored in \a sizep.
+ *
+ * Note that no locking is done here.
+ *
+ * \param[in] env execution environment
+ * \param[in] obj object for which to retrieve xattr
+ * \param[out] buf buffer to store xattr value in
+ * \param[in] name name of xattr to copy
+ * \param[out] sizep bytes used or required to store xattr
+ *
+ * \retval 0 on success
+ * \retval negative negated errno on failure
+ */
int __osd_xattr_get(const struct lu_env *env, struct osd_object *obj,
struct lu_buf *buf, const char *name, int *sizep)
{
int __osd_xattr_get(const struct lu_env *env, struct osd_object *obj,
struct lu_buf *buf, const char *name, int *sizep)
{
if (rc != -ENOENT)
return rc;
if (rc != -ENOENT)
return rc;
- rc = __osd_xattr_get_large(env, osd_obj2dev(obj), obj->oo_xattr,
- buf, name, sizep);
-
- return rc;
+ return __osd_xattr_get_large(env, osd_obj2dev(obj), obj->oo_xattr,
+ buf, name, sizep);
}
int osd_xattr_get(const struct lu_env *env, struct dt_object *dt,
}
int osd_xattr_get(const struct lu_env *env, struct dt_object *dt,