Check for NULL reply in mdc_close.
- fix thread race in portals_debug_dumplog() (3122)
- create lprocfs device entries at setup instead of at attach (1519)
- common AST error handler, don't evict client on completion race (3145)
- * miscellania
+ - check for NULL reply in mdc_close (2410)
+ * miscellania
- allow default OST striping configuration per directory (1414)
2004-03-22 Cluster File Systems, Inc. <info@clusterfs.com>
NULL, NULL);
rc = l_wait_event(req->rq_reply_waitq, mdc_close_check_reply(req),
&lwi);
- if (rc == 0) {
+ if (req->rq_repmsg == NULL) {
+ CDEBUG(D_HA, "request failed to send: %p, %d\n", req,
+ req->rq_status);
+ rc = req->rq_status;
+ } else if (rc == 0) {
LASSERTF(req->rq_repmsg != NULL, "req = %p", req);
rc = req->rq_repmsg->status;
if (req->rq_repmsg->type == PTL_RPC_MSG_ERR) {
sleep 1
rm -f $DIR/$tfile
touch $DIR/$tfile-2 || return 1
+ echo "pid: $pid will close"
kill -USR1 $pid
wait $pid || return 2
}
run_test 44 "race in target handle connect"
+# Handle failed close
+test_45() {
+ mdcdev=`awk '/mds_svc_MNT/ {print $1}' < /proc/fs/lustre/devices`
+ $LCTL --device $mdcdev recover
+
+ multiop $DIR/$tfile O_c &
+ pid=$!
+
+ # This will cause the CLOSE to fail before even
+ # allocating a reply buffer
+ $LCTL --device $mdcdev deactivate
+
+ # try the close
+ kill -USR1 $pid
+ wait $pid || return 1
+
+ $LCTL --device $mdcdev activate
+
+ $CHECKSTAT -t file $DIR/$tfile || return 2
+ return 0
+}
+run_test 45 "Handle failed close"
+
equals_msg test complete, cleaning up
$CLEANUP