Whamcloud - gitweb
b=3874
authoralex <alex>
Sat, 24 Jul 2004 12:10:35 +0000 (12:10 +0000)
committeralex <alex>
Sat, 24 Jul 2004 12:10:35 +0000 (12:10 +0000)
- this BKL collides with jbd a lot. remove it.

lustre/include/linux/obd.h
lustre/mds/mds_lov.c

index 876f75d..e501004 100644 (file)
@@ -328,6 +328,7 @@ struct mds_obd {
         int                              mds_lov_objids_valid;
         int                              mds_lov_nextid_set;
         struct file                     *mds_lov_objid_filp;
+        spinlock_t                      mds_lov_lock;
         unsigned long                   *mds_client_bitmap;
         struct semaphore                 mds_orphan_recovery_sem;
         /*add mds num here for real mds and cache mds create
index 81b22b3..031ec32 100644 (file)
@@ -61,11 +61,11 @@ void mds_lov_update_objids(struct obd_device *obd, obd_id *ids)
         int i;
         ENTRY;
 
-        lock_kernel();
+        spin_lock(&mds->mds_lov_lock);
         for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
                 if (ids[i] > (mds->mds_lov_objids)[i])
                         (mds->mds_lov_objids)[i] = ids[i];
-        unlock_kernel();
+        spin_unlock(&mds->mds_lov_lock);
         EXIT;
 }
 
@@ -207,6 +207,7 @@ int mds_lov_connect(struct obd_device *obd, char * lov_name)
         if (mds->mds_osc_obd)
                 RETURN(0);
 
+        spin_lock_init(&mds->mds_lov_lock);
         mds->mds_osc_obd = class_name2obd(lov_name);
         if (!mds->mds_osc_obd) {
                 CERROR("MDS cannot locate LOV %s\n",