Whamcloud - gitweb
b=14379
authorgreen <green>
Sun, 16 Dec 2007 04:18:25 +0000 (04:18 +0000)
committergreen <green>
Sun, 16 Dec 2007 04:18:25 +0000 (04:18 +0000)
r=adilger,vitaly

Properly find out duplicate locks when comparing newly receiwed server locks.
mds_open cannot use accmode because it is affected by owneroverride flag

lustre/ChangeLog
lustre/ldlm/ldlm_lock.c
lustre/mds/mds_open.c

index 96b7a52..2da7bae 100644 (file)
@@ -156,6 +156,15 @@ Details    : Directly associate cached pages to lock that protect those pages,
              this allows us to quickly find what pages to write and remove
             once lock callback is received.
 
+Severity   : normal
+Bugzilla   : 14379
+Description: Too many locks accumulating on client during NFS usage
+Details    : mds_open improperly used accmode to find out access mode to a
+             file. Also mdc_intent_lock logic to find out if we already have
+            lock similar to just received was flawed since introduction of
+            skiplists - locks are now added to the front of the granted
+            queue.
+
 --------------------------------------------------------------------------------
 
 2007-12-07         Cluster File Systems, Inc. <info@clusterfs.com>
index a999626..977ff9a 100644 (file)
@@ -919,7 +919,7 @@ static struct ldlm_lock *search_queue(struct list_head *queue,
                 lock = list_entry(tmp, struct ldlm_lock, l_res_link);
 
                 if (lock == old_lock)
-                        break;
+                        continue;
 
                 /* llite sometimes wants to match locks that will be
                  * canceled when their users drop, but we allow it to match
index 7c50196..d038f11 100644 (file)
@@ -1151,9 +1151,9 @@ found_child:
 
         /* We cannot use acc_mode here, because it is zeroed in case of
            creating a file, so we get wrong lockmode */
-        if (accmode(dchild->d_inode, rec->ur_flags) & MAY_WRITE)
+        if (rec->ur_flags & FMODE_WRITE)
                 child_mode = LCK_CW;
-        else if (accmode(dchild->d_inode, rec->ur_flags) & MAY_EXEC)
+        else if (rec->ur_flags & MDS_FMODE_EXEC)
                 child_mode = LCK_PR;
         else
                 child_mode = LCK_CR;