From e8a2e124d12b1a594fda0101ac00f04d60e39e4d Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Thu, 27 May 2010 18:14:30 +0200 Subject: [PATCH] b=22755 check for OBD_CONNECT_GRANT_SHRINK in osc_should_shrink_grant() i=wangdi i=oleg --- lustre/ChangeLog | 5 +++++ lustre/osc/osc_request.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index b5852fe..8beb092 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 2f5bf18..3676481 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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) -- 1.8.3.1