Commit ea3f00df authored by Andreas Dilger's avatar Andreas Dilger Committed by Greg Kroah-Hartman

staging: lustre: mdc: quiet console message for known -EINTR

If a user process is waiting for MDS recovery during close, but the
process is interrupted, the file is still closed but it prints a
message on the console. Quiet the console message for -EINTR, since
this is expected behaviour.
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6627
Reviewed-on: http://review.whamcloud.com/14911Reviewed-by: default avatarFrank Zago <fzago@cray.com>
Reviewed-by: default avatarEmoly Liu <emoly.liu@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 279b7afa
...@@ -122,26 +122,25 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp, ...@@ -122,26 +122,25 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
enum mds_op_bias bias, enum mds_op_bias bias,
void *data) void *data)
{ {
struct obd_export *exp = ll_i2mdexp(inode); const struct ll_inode_info *lli = ll_i2info(inode);
struct md_op_data *op_data; struct md_op_data *op_data;
struct ptlrpc_request *req = NULL; struct ptlrpc_request *req = NULL;
struct obd_device *obd = class_exp2obd(exp);
int rc; int rc;
if (!obd) { if (!class_exp2obd(md_exp)) {
/* CERROR("%s: invalid MDC connection handle closing " DFID "\n",
* XXX: in case of LMV, is this correct to access ll_get_fsname(inode->i_sb, NULL, 0),
* ->exp_handle? PFID(&lli->lli_fid));
*/
CERROR("Invalid MDC connection handle %#llx\n",
ll_i2mdexp(inode)->exp_handle.h_cookie);
rc = 0; rc = 0;
goto out; goto out;
} }
op_data = kzalloc(sizeof(*op_data), GFP_NOFS); op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
/*
* We leak openhandle and request here on error, but not much to be
* done in OOM case since app won't retry close on error either.
*/
if (!op_data) { if (!op_data) {
/* XXX We leak openhandle and request here. */
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
...@@ -170,10 +169,9 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp, ...@@ -170,10 +169,9 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
} }
rc = md_close(md_exp, op_data, och->och_mod, &req); rc = md_close(md_exp, op_data, och->och_mod, &req);
if (rc) { if (rc && rc != -EINTR) {
CERROR("%s: inode "DFID" mdc close failed: rc = %d\n", CERROR("%s: inode " DFID " mdc close failed: rc = %d\n",
ll_i2mdexp(inode)->exp_obd->obd_name, md_exp->exp_obd->obd_name, PFID(&lli->lli_fid), rc);
PFID(ll_inode2fid(inode)), rc);
} }
if (op_data->op_bias & (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP) && if (op_data->op_bias & (MDS_HSM_RELEASE | MDS_CLOSE_LAYOUT_SWAP) &&
...@@ -192,8 +190,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp, ...@@ -192,8 +190,7 @@ static int ll_close_inode_openhandle(struct obd_export *md_exp,
och->och_fh.cookie = DEAD_HANDLE_MAGIC; och->och_fh.cookie = DEAD_HANDLE_MAGIC;
kfree(och); kfree(och);
if (req) /* This is close request */ ptlrpc_req_finished(req);
ptlrpc_req_finished(req);
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment