From: SMTP%"mason@osr.com" 2-DEC-1997 16:32:23.77 To: "Alexander E. Sobol" , ntfsd@atria.com CC: Subj: Re: Kartoffelp|: Re: [ntfsd] FSCTL_IS_VOLUME_MOUNTED Return-Path: owner-ntfsd@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Tue, 2 Dec 1997 16:26:49 -0500 Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by mercury.mv.net (8.8.8/mem-971025) with SMTP id VAA24510 for ; Mon, 1 Dec 1997 21:35:14 -0500 (EST) Received: by gw.atria.com id Mon, 1 Dec 1997 19:13:08 -0500 Received: from relay4.smtp.psi.net by gw.atria.com id Mon, 1 Dec 1997 19:13:03 -0500 Received: from queball.osr.com by relay4.smtp.psi.net (8.8.3/SMI-5.4-PSI) id TAA25065; Mon, 1 Dec 1997 19:12:56 -0500 (EST) Received: from feanor.osr.com by queball.osr.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.0.1457.7) id YCADLHQC; Mon, 1 Dec 1997 19:12:05 -0000 Message-Id: <3.0.3.32.19971201191014.00b5edf0@mailserver.osr.com> X-Sender: mason@mailserver.osr.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.3 (32) Date: Mon, 01 Dec 1997 19:10:14 -0500 To: "Alexander E. Sobol" , ntfsd@atria.com From: Tony Mason Subject: Re: Kartoffelp|: Re: [ntfsd] FSCTL_IS_VOLUME_MOUNTED In-Reply-To: References: <3.0.3.32.19971128113839.03596264@queball.osr.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-ntfsd@atria.com Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- When a call is made to IoVerifyVolume, the I/O Manager generates an IRP with the IRP_MJ_FILE_SYSTEM_CONTROL and IRP_MN_VERIFY_VOLUME major and minor function codes. Specifically, this is a request for the FSD to ascertain if the given volume has actually changed. - From CDFS (CdCommonControl) in the IFS Kit (fsctrl, line 195): case IRP_MN_VERIFY_VOLUME: Status = CdVerifyVolume( IrpContext, Irp ); break; And CdVerifyVolume is at line 856 in the same file. This routine is a nice example of volume verification, including the numerous "details" as to what is happening in the code: - - It verifies the CD isn't being used in "raw" mode (if it is, the verify always fails) - - It verifies there is a CD loaded at all - - It looks at the TOC and compares it to the previous TOC (including the cases where there's no TOC) - - It looks at the volume labels If everything matches then the volume is OK and this returns STATUS_SUCCESS. If it DOESN'T match at any point it returns STATUS_WRONG_VOLUME. This is a nice, straight-forward example of media change detection, although there are a few sticky details. Regards, Tony -----BEGIN PGP SIGNATURE----- Version: PGP for Personal Privacy 5.0 Charset: noconv iQEVAwUBNINR5YmxeMUNM60pAQHpYAf/UWKNV936LuovyjH9l06tRMDmIWH3NKkH 5aY10oODGhNbGxHcour0+P+SNr046BMGsJ13zIyzMTDbW6OeU6ypbHiiKt/iNz3J i5n+UsA5bfEdwtkoZpTAwgKV/oE9keaFLjHuduLRteCnXZ91QKPkbCWndAj/CvNq hhiRX/Yv47D8X1JmoxLbb9ahvwU6lKGJwv1Fc0xZk6I/uir1vRG+PAG1CVhpumAq rv+bdAPTrGuy7vZAY7CpQUWOzYi3TZt/+kpn3HnTHYJIwJhy4VeD+1wtQkiR1jsd RcyxNBY+TuCoL50hssZ9Nrwp11OgIeB9hmzdrSFiU4ajR5SmhaEwog== =teyX -----END PGP SIGNATURE----- Tony Mason Consulting Partner OSR Open Systems Resources, Inc. mason@osr.com http://www.osr.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntfsd-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]