kern/145385: commit references a PR
dfilter service
dfilter at FreeBSD.ORG
Thu Apr 15 08:30:03 UTC 2010
The following reply was made to PR kern/145385; it has been noted by GNATS.
From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: kern/145385: commit references a PR
Date: Thu, 15 Apr 2010 08:29:23 +0000 (UTC)
Author: avg
Date: Thu Apr 15 08:29:14 2010
New Revision: 206648
URL: http://svn.freebsd.org/changeset/base/206648
Log:
scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set d_sectorsize and
d_mediasize
CD_FLAG_VALID_TOC is not required for setting those media properties.
PR: kern/145385
Submitted by: Juergen Lock <nox at jelal.kn-bremen.de>
a slightly different version
Tested by: Pavel Sukhoy <sukhoy at ripn.net>,
Markus Wild <m.wild at cybernet.ch>,
Juergen Lock <nox at jelal.kn-bremen.de>,
uqs
MFC after: 1 week
Modified:
head/sys/cam/scsi/scsi_cd.c
Modified: head/sys/cam/scsi/scsi_cd.c
==============================================================================
--- head/sys/cam/scsi/scsi_cd.c Thu Apr 15 08:20:57 2010 (r206647)
+++ head/sys/cam/scsi/scsi_cd.c Thu Apr 15 08:29:14 2010 (r206648)
@@ -2773,8 +2773,12 @@ cdcheckmedia(struct cam_periph *periph)
softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC);
cdprevent(periph, PR_ALLOW);
return (error);
- } else
+ } else {
softc->flags |= CD_FLAG_VALID_MEDIA;
+ softc->disk->d_sectorsize = softc->params.blksize;
+ softc->disk->d_mediasize =
+ (off_t)softc->params.blksize * softc->params.disksize;
+ }
/*
* Now we check the table of contents. This (currently) is only
@@ -2863,9 +2867,6 @@ cdcheckmedia(struct cam_periph *periph)
}
softc->flags |= CD_FLAG_VALID_TOC;
- softc->disk->d_sectorsize = softc->params.blksize;
- softc->disk->d_mediasize =
- (off_t)softc->params.blksize * softc->params.disksize;
bailout:
_______________________________________________
svn-src-all at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
More information about the freebsd-bugs
mailing list