File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ void MDSDaemon::asok_command(
149149 if (command == " status" ) {
150150 dump_status (f);
151151 r = 0 ;
152+ } else if (command == " lockup" ) {
153+ int64_t millisecs;
154+ cmd_getval (cmdmap, " millisecs" , millisecs);
155+ derr << " (lockup) sleeping with mds_lock for " << millisecs << dendl;
156+ std::lock_guard l (mds_lock);
157+ std::this_thread::sleep_for (std::chrono::milliseconds (millisecs));
158+ r = 0 ;
152159 } else if (command == " exit" ) {
153160 outbl.append (" Exiting...\n " );
154161 r = 0 ;
@@ -256,6 +263,11 @@ void MDSDaemon::set_up_admin_socket()
256263 r = admin_socket->register_command (" status" , asok_hook,
257264 " high-level status of MDS" );
258265 ceph_assert (r == 0 );
266+ r = admin_socket->register_command (" lockup "
267+ " name=millisecs,type=CephInt,req=true,range=0"
268+ , asok_hook
269+ , " sleep with mds_lock held (dev)" );
270+ ceph_assert (r == 0 );
259271 r = admin_socket->register_command (" dump_ops_in_flight" , asok_hook,
260272 " show the ops currently in flight" );
261273 ceph_assert (r == 0 );
You can’t perform that action at this time.
0 commit comments