From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,e4a6df92ccc1b8a7 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2003-06-29 09:41:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news100.image.dk!newsfeed2.fi.sn.net!fi.sn.net!newsfeed1.fi.sn.net!news.suomi.net!Astalo.kon.iki.fi!news From: Kalle Olavi Niemitalo Newsgroups: comp.os.linux.alpha Subject: Re: Testers needed: is smartmontools is 64-bit clean? Date: Sun, 29 Jun 2003 19:17:13 +0300 Organization: Oulun Puhelin Oyj - Baana Message-ID: <87y8zkrh86.fsf@Astalo.kon.iki.fi> References: NNTP-Posting-Host: addr-213-216-218-75.suomi.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: plaza.suomi.net 1056904579 25094 213.216.218.75 (29 Jun 2003 16:36:19 GMT) X-Complaints-To: abuse@mail.suomi.net NNTP-Posting-Date: Sun, 29 Jun 2003 16:36:19 +0000 (UTC) Keywords: RZ29B,SMART X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 In-Reply-To: (Bruce Allen's message of "29 Jun 2003 08:08:29 -0700") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:KZZbKTjJqkDGsTz/sNtILwFEs3g= Xref: archiver1.google.com comp.os.linux.alpha:7879 ballen@uwm.edu (Bruce Allen) writes: > Before generating a new release, I would also like to verify > that the code is 64-bit clean. In a few places, the code was trying to print (64-bit) size_t values with "%d". The following patches cast these to (32-bit) int, which ought to be large enough. --- atacmds.c.~1.107.~ Mon Jun 23 07:55:56 2003 +++ atacmds.c Sun Jun 29 18:58:42 2003 @@ -726,14 +726,14 @@ int ataVersionInfo (const char** descrip if (sizeof(minor_str) != sizeof(char *)*(1+MINOR_MAX)){ pout("Internal error in ataVersionInfo(). minor_str[] size %d\n" "is not consistent with value of MINOR_MAX+1 = %d\n", - sizeof(minor_str)/sizeof(char *), MINOR_MAX+1); + (int) (sizeof(minor_str)/sizeof(char *)), MINOR_MAX+1); fflush(NULL); abort(); } if (sizeof(actual_ver) != sizeof(int)*(1+MINOR_MAX)){ pout("Internal error in ataVersionInfo(). actual_ver[] size %d\n" "is not consistent with value of MINOR_MAX = %d\n", - sizeof(actual_ver)/sizeof(int), MINOR_MAX+1); + (int) (sizeof(actual_ver)/sizeof(int)), MINOR_MAX+1); fflush(NULL); abort(); } --- scsicmds.c.~1.49.~ Fri Jun 20 16:24:04 2003 +++ scsicmds.c Sun Jun 29 18:58:40 2003 @@ -196,7 +196,7 @@ static int linux_do_scsi_cmnd_io(int dev (DXFER_TO_DEVICE == iop->dxfer_dir) && (iop->dxferp)) { int trunc = (iop->dxfer_len > 256) ? 1 : 0; - pout("]\n Outgoing data, len=%d%s:\n", iop->dxfer_len, + pout("]\n Outgoing data, len=%d%s:\n", (int) iop->dxfer_len, (trunc ? " [only first 256 bytes shown]" : "")); dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1); } @@ -242,7 +242,7 @@ static int linux_do_scsi_cmnd_io(int dev if (con->reportscsiioctl > 1) { int trunc = (iop->dxfer_len > 256) ? 1 : 0; - pout(" Incoming data, len=%d%s:\n", iop->dxfer_len, + pout(" Incoming data, len=%d%s:\n", (int) iop->dxfer_len, (trunc ? " [only first 256 bytes shown]" : "")); dStrHex(iop->dxferp, (trunc ? 256 : iop->dxfer_len) , 1); } @@ -259,7 +259,7 @@ static int linux_do_scsi_cmnd_io(int dev memcpy(iop->sensep, wrk.buff, len); iop->resp_sense_len = len; if (con->reportscsiioctl > 1) { - pout(" >>> Sense buffer, len=%d:\n", len); + pout(" >>> Sense buffer, len=%d:\n", (int) len); dStrHex(wrk.buff, len , 1); } } > Then send or post the output of smartctl -a for any ATA or SCSI > devices that you have. This is from an Alphastation 500/266 with two SCSI disks. First, the old noisy one: | smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen | Home page is http://smartmontools.sourceforge.net/ | | Device: DEC RZ29B (C) DEC Version: 0014 | Serial number: 01185069 | Device type: disk | Local Time is: Sun Jun 29 19:09:04 2003 EEST | Device does not support SMART | | Error counter log: | Errors Corrected Total Total Correction Gigabytes Total | delay: [rereads/ errors algorithm processed uncorrected | minor | major rewrites] corrected invocations [10^9 bytes] errors | read: 0 0 0 0 0 0.000 0 | write: 0 0 0 0 0 0.000 0 | Device does not support Self Test logging I normally keep the disk spun down. In this mode, the output changes to: | smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen | Home page is http://smartmontools.sourceforge.net/ | | Device: DEC RZ29B (C) DEC Version: 0014 | Serial number: 01185069 | Device type: disk | Local Time is: Sun Jun 29 19:10:50 2003 EEST | device is NOT READY (media absent, spun down, etc) | SMART Health Status: OK | | Error counter log: | Errors Corrected Total Total Correction Gigabytes Total | delay: [rereads/ errors algorithm processed uncorrected | minor | major rewrites] corrected invocations [10^9 bytes] errors | read: 0 0 0 0 0 0.000 0 | write: 0 0 0 0 0 0.000 0 | Device does not support Self Test logging "SMART Health Status: OK"? That doesn't look right. Then, the newer disk: | smartctl version 5.1-15 Copyright (C) 2002-3 Bruce Allen | Home page is http://smartmontools.sourceforge.net/ | | Device: QUANTUM ATLAS10K3_18_WLS Version: 020W | Serial number: 342210449270 | Device type: disk | Local Time is: Sun Jun 29 19:13:01 2003 EEST | Device supports SMART and is Enabled | Temperature Warning Enabled | SMART Health Status: OK | Current Drive Temperature: 39 C | Manufactured in week 14 of year 2002 | Current start stop count: 73 times | Recommended start stop count: 4294967295 times | | Error counter log: | Errors Corrected Total Total Correction Gigabytes Total | delay: [rereads/ errors algorithm processed uncorrected | minor | major rewrites] corrected invocations [10^9 bytes] errors | read: 1426 0 0 0 0 0.227 0 | write: 0 0 0 0 0 0.168 0 | | Non-medium error count: 2 | No self-tests have been logged | Long (extended) Self Test duration: 672 seconds [11.2 minutes] > Also, please try running self-tests with the smartctl -t > option, and send or post additional smartctl -a output when > those tests have completed. Will do.