Whamcloud - gitweb
b=22755 check for OBD_CONNECT_GRANT_SHRINK in osc_should_shrink_grant()
authorJohann Lombardi <johann@sun.com>
Thu, 27 May 2010 16:14:30 +0000 (18:14 +0200)
committerJohann Lombardi <johann@sun.com>
Thu, 27 May 2010 16:14:30 +0000 (18:14 +0200)
i=wangdi
i=oleg

lustre/ChangeLog
lustre/osc/osc_request.c

index b5852fe..8beb092 100644 (file)
@@ -45,6 +45,11 @@ Bugzilla   : 21647
 Description: add support for async journal commit in echo client
 
 Severity   : normal
+Bugzilla   : 22755
+Description: The shrink grant feature is still active on the client although the
+            connect flag is not set.
+
+Severity   : normal
 Bugzilla   : 22610
 Description: a race condition could lead to SIGBUS being sent to an
             application using mmap-ped files from Lustre
index 2f5bf18..3676481 100644 (file)
@@ -960,6 +960,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)