* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct dt_object *o;
struct thandle *th;
int rc = 0;
+ int rc2 = 0;
int retries = 0;
int i;
bool soft_sync = false;
la->la_valid &= LA_ATIME | LA_MTIME | LA_CTIME;
/* do fake write, to simulate the write case for performance testing */
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_FAKE_WRITE)) {
+ if (OBD_FAIL_CHECK(OBD_FAIL_OST_FAKE_RW)) {
struct niobuf_local *last = &lnb[niocount - 1];
__u64 file_size = last->lnb_file_offset + last->lnb_len;
__u64 valid = la->la_valid;
granted = 0;
}
- ofd_trans_stop(env, ofd, th, rc);
+ rc2 = ofd_trans_stop(env, ofd, th, rc);
+ if (!rc)
+ rc = rc2;
if (rc == -ENOSPC && retries++ < 3) {
CDEBUG(D_INODE, "retry after force commit, retries:%d\n",
retries);