Whamcloud - gitweb
make noise when capa not found.
authorlsy <lsy>
Wed, 21 Sep 2005 09:39:53 +0000 (09:39 +0000)
committerlsy <lsy>
Wed, 21 Sep 2005 09:39:53 +0000 (09:39 +0000)
lustre/include/linux/lustre_sec.h
lustre/llite/llite_capa.c
lustre/obdclass/capa.c

index 97396a4..1a994ec 100644 (file)
@@ -600,6 +600,7 @@ extern spinlock_t capa_lock;
 extern struct hlist_head *capa_hash;
 extern struct list_head capa_list[];
 extern struct timer_list ll_capa_timer;
+extern atomic_t ll_capa_stat;
 
 /* obdclass/capa.c */
 int capa_op(int flags);
index 19f50e4..5962d84 100644 (file)
@@ -339,6 +339,14 @@ struct obd_capa *ll_get_capa(struct inode *inode, uid_t uid, int op)
 
                 RETURN(ocapa);
         }
+
+        if (atomic_read(&ll_capa_stat)) {
+                CDEBUG(D_ERROR, "find capa for (uid %u, op %d, mdsid "LPU64","
+                       " ino %u igen %u) failed.\n",
+                       (unsigned)uid, op, id_group(&lli->lli_id),
+                       (unsigned)id_ino(&lli->lli_id), id_gen(&lli->lli_id));
+                atomic_set(&ll_capa_stat, 0);
+        }
         
         RETURN(NULL);
 }
index 5646ec1..5cdfe28 100644 (file)
@@ -61,6 +61,7 @@ static char *capa_type_name[] = { "client", "mds", "filter" };
  * in the future it will be moved to ll_sb_info to support multi-
  * mount point */
 struct timer_list ll_capa_timer;
+atomic_t ll_capa_stat = ATOMIC_INIT(0);
 
 EXPORT_SYMBOL(capa_lock);
 EXPORT_SYMBOL(capa_hash);
@@ -92,8 +93,6 @@ find_capa(struct hlist_head *head, uid_t uid, int capa_op, __u64 mdsid,
         struct obd_capa *ocapa;
         uid_t ouid;
 
-        CDEBUG(D_INODE, "find capa for (uid %u, op %d, mdsid "LPU64", ino %lu"
-               " igen %u, type %d\n", (unsigned) uid, capa_op, mdsid, ino, igen, type);
         hlist_for_each_entry(ocapa, pos, head, c_hash) {
                 if (ocapa->c_capa.lc_ino != ino)
                         continue;
@@ -120,6 +119,13 @@ find_capa(struct hlist_head *head, uid_t uid, int capa_op, __u64 mdsid,
                 return ocapa;
         }
 
+        if (atomic_read(&ll_capa_stat)) {
+                CDEBUG(D_ERROR, "find capa for (uid %u, op %d, mdsid "LPU64","
+                       " ino %lu igen %u, type %d) failed.\n",
+                       (unsigned) uid, capa_op, mdsid, ino, igen, type);
+                atomic_set(&ll_capa_stat, 0);
+        }
+
         return NULL;
 }
 
@@ -386,6 +392,9 @@ struct obd_capa *capa_renew(struct lustre_capa *capa, int type)
         if (!ocapa)
                 ocapa = get_new_capa_locked(head, type, capa);
 
+        if (type == CLIENT_CAPA)
+                atomic_set(&ll_capa_stat, 1);
+
         return ocapa;
 }