The following reply was made to PR kern/145385; it has been noted by GNATS.

From: [email protected] (dfilter service)
To: [email protected]
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 <[email protected]>
                a slightly different version
   Tested by:   Pavel Sukhoy <[email protected]>,
                Markus Wild <[email protected]>,
                Juergen Lock <[email protected]>,
                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:
  
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "[email protected]"
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to