Clear the grant when disconnect the import to prevent the grant being erased
wrongly when the import is evicted.
b=12371
i=green
i=adilger
to update the client grant space info.
Severity : normal
+Frequency : when client is evicted
+Bugzilla : 11662
+Description: Grant might be wrongly erased when osc is evicted by OST
+Details : when the import is evicted by server, it will fork another
+ thread ptlrpc_invalidate_import_thread to invalidate the
+ import, where the grant will be set to 0. While the original
+ thread will update the grant it got when connecting. So if
+ the former happened latter, the grant will be wrongly errased
+ because of this race.
+
+Severity : normal
Frequency : rare
Bugzilla : 12401
Description: Checking Stale with correct fid
oscc->oscc_flags |= OSCC_FLAG_RECOVERING;
spin_unlock(&oscc->oscc_lock);
}
+ cli = &obd->u.cli;
+ client_obd_list_lock(&cli->cl_loi_list_lock);
+ cli->cl_avail_grant = 0;
+ cli->cl_lost_grant = 0;
+ client_obd_list_unlock(&cli->cl_loi_list_lock);
break;
}
/* Reset grants */
cli = &obd->u.cli;
client_obd_list_lock(&cli->cl_loi_list_lock);
- cli->cl_avail_grant = 0;
- cli->cl_lost_grant = 0;
/* all pages go to failing rpcs due to the invalid import */
osc_check_rpcs(cli);
client_obd_list_unlock(&cli->cl_loi_list_lock);