#include <libcfs/libcfs.h>
#include <linux/module.h>
#include <linux/math64.h>
+#include <linux/delay.h>
#include <obd.h>
#include <obd_class.h>
LASSERT(exp != NULL);
imp = class_exp2cliimp(exp);
+again:
switch (fld_op) {
case FLD_QUERY:
req = ptlrpc_request_alloc_pack(imp, &RQF_FLD_QUERY,
req->rq_reply_portal = MDC_REPLY_PORTAL;
ptlrpc_at_set_req_timeout(req);
- if (OBD_FAIL_CHECK(OBD_FAIL_FLD_QUERY_REQ && req->rq_no_delay)) {
+ if (OBD_FAIL_CHECK(OBD_FAIL_FLD_QUERY_REQ) && req->rq_no_delay) {
/* the same error returned by ptlrpc_import_delay_req */
rc = -EAGAIN;
req->rq_status = rc;
imp->imp_connect_flags_orig & OBD_CONNECT_MDS_MDS &&
OCD_HAS_FLAG(&imp->imp_connect_data, LIGHTWEIGHT) &&
rc != -ENOTSUPP) {
- /*
- * Since LWP is not replayable, so notify the caller
- * to retry if needed after a while.
- */
+ /* LWP is not replayable, retry after a while */
rc = -EAGAIN;
}
+ if (rc == -EAGAIN) {
+ ptlrpc_req_finished(req);
+ if (msleep_interruptible(2 * MSEC_PER_SEC))
+ GOTO(out_req, rc = -EINTR);
+ rc = 0;
+ goto again;
+ }
GOTO(out_req, rc);
}
stop mds2 || error "stop mds2 failed"
#define OBD_FAIL_FLD_QUERY_REQ 0x1103
- do_facet mds2 lctl set_param fail_loc=0x1103
+ do_facet mds2 lctl set_param fail_loc=0x80001103
local OPTS="$MDS_MOUNT_OPTS -o abort_recovery"
start mds2 $(mdsdevname 2) $OPTS ||
error "start MDS with abort_recovery should succeed"
}
run_test 24G "migrate symlink in rename"
+test_24H() {
+ [ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
+ [[ $(hostname) != $(facet_active_host mds2) ]] ||
+ skip "MDT1 should be on another node"
+
+ test_mkdir -i 1 -c 1 $DIR/$tdir
+#define OBD_FAIL_FLD_QUERY_REQ 0x1103
+ do_facet mds2 $LCTL set_param fail_loc=0x80001103
+ touch $DIR/$tdir/$tfile || error "touch failed"
+}
+run_test 24H "repeat FLD_QUERY rpc"
+
test_25a() {
echo '== symlink sanity ============================================='