Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/raidframe Missed cleaning up this "peek" routines th...



details:   https://anonhg.NetBSD.org/src/rev/f07a371af489
branches:  trunk
changeset: 984875:f07a371af489
user:      oster <oster%NetBSD.org@localhost>
date:      Tue Jul 27 03:09:26 2021 +0000

description:
Missed cleaning up this "peek" routines the other day.  Take care of it now.

diffstat:

 sys/dev/raidframe/rf_cvscan.c |  42 ++----------------------------------------
 sys/dev/raidframe/rf_cvscan.h |   3 +--
 2 files changed, 3 insertions(+), 42 deletions(-)

diffs (80 lines):

diff -r b3713abdd5d4 -r f07a371af489 sys/dev/raidframe/rf_cvscan.c
--- a/sys/dev/raidframe/rf_cvscan.c     Tue Jul 27 03:01:48 2021 +0000
+++ b/sys/dev/raidframe/rf_cvscan.c     Tue Jul 27 03:09:26 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_cvscan.c,v 1.17 2019/02/09 03:33:59 christos Exp $  */
+/*     $NetBSD: rf_cvscan.c,v 1.18 2021/07/27 03:09:26 oster Exp $     */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -35,7 +35,7 @@
  ******************************************************************************/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_cvscan.c,v 1.17 2019/02/09 03:33:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_cvscan.c,v 1.18 2021/07/27 03:09:26 oster Exp $");
 
 #include <dev/raidframe/raidframevar.h>
 #include "rf_alloclist.h"
@@ -272,44 +272,6 @@
        return (ret);
 }
 
-
-
-RF_DiskQueueData_t *
-rf_CvscanPeek(void *q_in)
-{
-       RF_CvscanHeader_t *hdr = (RF_CvscanHeader_t *) q_in;
-       long    range, i, sum_dist_left, sum_dist_right;
-       RF_DiskQueueData_t *tmp, *headElement;
-
-       DO_CHECK_STATE(hdr);
-
-       if (hdr->left_cnt == 0 && hdr->right_cnt == 0)
-               headElement = NULL;
-       else {
-               range = RF_MIN(hdr->range_for_avg, RF_MIN(hdr->left_cnt, hdr->right_cnt));
-               for (i = 0, tmp = hdr->left, sum_dist_left =
-                   ((hdr->direction == rf_cvscan_RIGHT) ? range * hdr->change_penalty : 0);
-                   tmp != NULL && i < range;
-                   tmp = tmp->next, i++) {
-                       sum_dist_left += hdr->cur_block - tmp->sectorOffset;
-               }
-               for (i = 0, tmp = hdr->right, sum_dist_right =
-                   ((hdr->direction == rf_cvscan_LEFT) ? range * hdr->change_penalty : 0);
-                   tmp != NULL && i < range;
-                   tmp = tmp->next, i++) {
-                       sum_dist_right += tmp->sectorOffset - hdr->cur_block;
-               }
-
-               if (hdr->right_cnt == 0 || sum_dist_left < sum_dist_right)
-                       headElement = hdr->left;
-               else
-                       headElement = hdr->right;
-       }
-       return (headElement);
-}
-
-
-
 /*
 ** CVSCAN( 1, 0 ) is Shortest Seek Time First (SSTF)
 **                             lowest average response time
diff -r b3713abdd5d4 -r f07a371af489 sys/dev/raidframe/rf_cvscan.h
--- a/sys/dev/raidframe/rf_cvscan.h     Tue Jul 27 03:01:48 2021 +0000
+++ b/sys/dev/raidframe/rf_cvscan.h     Tue Jul 27 03:09:26 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_cvscan.h,v 1.6 2005/12/11 12:23:37 christos Exp $   */
+/*     $NetBSD: rf_cvscan.h,v 1.7 2021/07/27 03:09:26 oster Exp $      */
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -75,7 +75,6 @@
     RF_AllocListElem_t * cl_list, RF_ShutdownList_t ** listp);
 void    rf_CvscanEnqueue(void *qptr, RF_DiskQueueData_t * req, int priority);
 RF_DiskQueueData_t *rf_CvscanDequeue(void *qptr);
-RF_DiskQueueData_t *rf_CvscanPeek(void *qptr);
 int
 rf_CvscanPromote(void *qptr, RF_StripeNum_t parityStripeID,
     RF_ReconUnitNum_t which_ru);



Home | Main Index | Thread Index | Old Index