Whamcloud - gitweb
Fix wrong assertion added to ldlm_cli_enqueue() by patch from bug 7311. Also
authornikita <nikita>
Sun, 9 Oct 2005 20:32:40 +0000 (20:32 +0000)
committernikita <nikita>
Sun, 9 Oct 2005 20:32:40 +0000 (20:32 +0000)
fix few outdated references in comments.

b=7311
r=adilger

lustre/ldlm/ldlm_request.c
lustre/liblustre/file.c
lustre/liblustre/super.c

index 4d8f98e..49038e2 100644 (file)
@@ -422,11 +422,11 @@ int ldlm_cli_enqueue(struct obd_export *exp,
 
         /*
          * Liblustre client doesn't get extent locks, except for O_APPEND case
-         * where [0, OBD_OBJECT_EOF] lock is taken.
+         * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where
+         * [i_size, OBD_OBJECT_EOF] lock is taken.
          */
         LASSERT(ergo(LIBLUSTRE_CLIENT, type != LDLM_EXTENT ||
-                     (policy->l_extent.start == 0 &&
-                      policy->l_extent.end   == OBD_OBJECT_EOF)));
+                     policy->l_extent.end == OBD_OBJECT_EOF));
 
         reply = lustre_swab_repbuf(req, 0, sizeof(*reply),
                                    lustre_swab_ldlm_reply);
index 9b387ff..04d0894 100644 (file)
@@ -415,8 +415,8 @@ _SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off)
         RETURN(off);
 }
 
-/* this isn't where truncate starts.   roughly:
- * sys_truncate->ll_setattr_raw->vmtruncate->ll_truncate
+/* this isn't where truncate starts.  roughly:
+ * llu_iop_{open,setattr}->llu_setattr_raw->llu_vmtruncate->llu_truncate
  * we grab the lock back in setattr_raw to avoid races. */
 static void llu_truncate(struct inode *inode)
 {
index f32d98e..f32aa36 100644 (file)
@@ -718,7 +718,8 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                         }
                 }
 
-                /* Won't invoke vmtruncate, as we already cleared ATTR_SIZE */
+                /* Won't invoke llu_vmtruncate(), as we already cleared
+                 * ATTR_SIZE */
                 inode_setattr(inode, attr);
         }