aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/osc/osc_object.c
diff options
context:
space:
mode:
authorBen Evans <bevans@cray.com>2017-08-19 22:25:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-22 18:36:47 -0700
commit7d2fa4cbf32ed385fd7364469cce6d390ba5602d (patch)
tree634719f3d6903802ececcf2422b8ac75b867f2eb /drivers/staging/lustre/lustre/osc/osc_object.c
parentstaging: lustre: uapi: remove unused functions for lustre_fid.h (diff)
downloadlinux-dev-7d2fa4cbf32ed385fd7364469cce6d390ba5602d.tar.xz
linux-dev-7d2fa4cbf32ed385fd7364469cce6d390ba5602d.zip
staging: lustre: uapi: return error code for ostid_set_id
Currently the function ostid_set_id() just logs an error and just keeps going. This function is also used by user land tools so having special lustre kernel debugging code is not desired. So instead just return an error code and have the calling kernel code print the error instead. Signed-off-by: Ben Evans <bevans@cray.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401 Reviewed-on: https://review.whamcloud.com/22712 Reviewed-on: https://review.whamcloud.com/24569 Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/osc/osc_object.c')
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_object.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c b/drivers/staging/lustre/lustre/osc/osc_object.c
index fa621bda1ffe..945ae6e5a8b1 100644
--- a/drivers/staging/lustre/lustre/osc/osc_object.c
+++ b/drivers/staging/lustre/lustre/osc/osc_object.c
@@ -369,7 +369,14 @@ static void osc_req_attr_set(const struct lu_env *env, struct cl_object *obj,
oa->o_valid |= OBD_MD_FLGROUP;
}
if (flags & OBD_MD_FLID) {
- ostid_set_id(&oa->o_oi, ostid_id(&oinfo->loi_oi));
+ int rc;
+
+ rc = ostid_set_id(&oa->o_oi, ostid_id(&oinfo->loi_oi));
+ if (rc) {
+ CERROR("Bad %llu to set " DOSTID " : rc %d\n",
+ (unsigned long long)ostid_id(&oinfo->loi_oi),
+ POSTID(&oa->o_oi), rc);
+ }
oa->o_valid |= OBD_MD_FLID;
}
if (flags & OBD_MD_FLHANDLE) {