Whamcloud - gitweb
LU-7297 osd-zfs: initialize oh_lock 19/16919/3
authorOlaf Faaland <faaland1@llnl.gov>
Thu, 22 Oct 2015 20:31:05 +0000 (13:31 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 4 Dec 2015 17:58:52 +0000 (17:58 +0000)
The ZFS osd was not initializing od_brw_stats.hist[].oh_lock.
This rectifies that.

Change-Id: I3f637b73c77908c2297bfab97e33eca63b0d5986
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/16919
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
lustre/osd-zfs/osd_lproc.c

index 86957ff..c48638a 100644 (file)
@@ -156,9 +156,12 @@ LPROC_SEQ_FOPS(osd_brw_stats);
 
 static int osd_stats_init(struct osd_device *osd)
 {
-       int result;
+       int result, i;
        ENTRY;
 
+       for (i = 0; i < BRW_LAST; i++)
+               spin_lock_init(&osd->od_brw_stats.hist[i].oh_lock);
+
        osd->od_stats = lprocfs_alloc_stats(LPROC_OSD_LAST, 0);
        if (osd->od_stats != NULL) {
                result = lprocfs_register_stats(osd->od_proc_entry, "stats",