Whamcloud - gitweb
b=22755 check for OBD_CONNECT_GRANT_SHRINK in osc_should_shrink_grant
authorAlexander.Zarochentsev <Alexander.Zarochentsev@sun.com>
Tue, 15 Jun 2010 19:00:15 +0000 (23:00 +0400)
committerRobert Read <robert.read@oracle.com>
Tue, 15 Jun 2010 20:46:49 +0000 (13:46 -0700)
a=johann
i=oleg.drokin
i=di.wang

lustre/osc/osc_request.c

index 157031b..b81d8d3 100644 (file)
@@ -1020,6 +1020,11 @@ static int osc_should_shrink_grant(struct client_obd *client)
 {
         cfs_time_t time = cfs_time_current();
         cfs_time_t next_shrink = client->cl_next_shrink_grant;
+
+        if ((client->cl_import->imp_connect_data.ocd_connect_flags &
+             OBD_CONNECT_GRANT_SHRINK) == 0)
+                return 0;
+
         if (cfs_time_aftereq(time, next_shrink - 5 * CFS_TICK)) {
                 if (client->cl_import->imp_state == LUSTRE_IMP_FULL &&
                     client->cl_avail_grant > GRANT_SHRINK_LIMIT)