From: alex Date: Sat, 24 Jul 2004 12:10:35 +0000 (+0000) Subject: b=3874 X-Git-Tag: 1.3.4~548 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6987e0666ba1e3f1e9490c3ca2478cd40d917749;p=fs%2Flustre-release.git b=3874 - this BKL collides with jbd a lot. remove it. --- diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 876f75d..e501004 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -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 diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c index 81b22b3..031ec32 100644 --- a/lustre/mds/mds_lov.c +++ b/lustre/mds/mds_lov.c @@ -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",