- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: sys$qiow(efn$c_enf,...,iosb,...) - must iosb b...
Operating System - OpenVMS
1753814
Members
7840
Online
108805
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2007 06:21 PM
тАО09-25-2007 06:21 PM
Re: sys$qiow(efn$c_enf,...,iosb,...) - must iosb be specified?
>(besides, if it was not the case then the
>QIOW ought to return error. Which it does
>not).
How do you know if there was no error if you did not specify an iosb???? Just checking the $qio return status is by no means a complete check.
>In other words - if you don't specify an
>iosb then the qiow (notice the w) may
>complete prematurely?
>I wouldn't think so. Rephrase?
That's what may happen if another part of the software uses the same event flag.
>You mention $synch. Does the fact that $qiow
> = $qio + $synch include the condition code
>returned? Or should/must the condition code
>in the iosb be checked in addition to the
>condition code returned by $qiow (again
>please notice the w). I couldn't find the
>answer in the doc.
As said before, check both the $qio return status AND the iosb status. that's the ONLY way to be certain in all cases. If you want to write software that behaves predictable do it this way.
Jur.
>QIOW ought to return error. Which it does
>not).
How do you know if there was no error if you did not specify an iosb???? Just checking the $qio return status is by no means a complete check.
>In other words - if you don't specify an
>iosb then the qiow (notice the w) may
>complete prematurely?
>I wouldn't think so. Rephrase?
That's what may happen if another part of the software uses the same event flag.
>You mention $synch. Does the fact that $qiow
> = $qio + $synch include the condition code
>returned? Or should/must the condition code
>in the iosb be checked in addition to the
>condition code returned by $qiow (again
>please notice the w). I couldn't find the
>answer in the doc.
As said before, check both the $qio return status AND the iosb status. that's the ONLY way to be certain in all cases. If you want to write software that behaves predictable do it this way.
Jur.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-25-2007 07:22 PM
тАО09-25-2007 07:22 PM
Re: sys$qiow(efn$c_enf,...,iosb,...) - must iosb be specified?
>>>You mention $synch. Does the fact that $qiow = $qio + $synch include the condition code returned?<<<
No, $qiow does not copy the value from the iosb into the value retuned as the $qio status. I suppose that would have been possible, but it would have made the behavior of $QIOW different than $QIO. But if you are put off by that, then you probably wouldn't be using $QIO in the first place, instead using something at a higher level.
Note that these are two types of errors.
The status returned by the $QUI is telling you whether VMS has accepted your request as valid. I.e. you have access to the buffer you specified, you have specified correct io function modifiers, etc.
The status returned in the IOSB is set after the IO is complete (or has failed). It reports things like insufficient buffer for the amount of data that was returned, or some error status from a device.
These are analogous to compile time errors vs. run time errors in a program.
>>>Or should/must the condition code in the iosb be checked in addition to the condition code returned by $qiow (again please notice the w). I couldn't find the answer in the doc.<<<
Yes, as Jur stated, you MUST check the condition code if you want to be able to handle errors that occur after the I/O request packet has been queued to the driver, regardless of whether it was a $qio or $qiow.
Jon
No, $qiow does not copy the value from the iosb into the value retuned as the $qio status. I suppose that would have been possible, but it would have made the behavior of $QIOW different than $QIO. But if you are put off by that, then you probably wouldn't be using $QIO in the first place, instead using something at a higher level.
Note that these are two types of errors.
The status returned by the $QUI is telling you whether VMS has accepted your request as valid. I.e. you have access to the buffer you specified, you have specified correct io function modifiers, etc.
The status returned in the IOSB is set after the IO is complete (or has failed). It reports things like insufficient buffer for the amount of data that was returned, or some error status from a device.
These are analogous to compile time errors vs. run time errors in a program.
>>>Or should/must the condition code in the iosb be checked in addition to the condition code returned by $qiow (again please notice the w). I couldn't find the answer in the doc.<<<
Yes, as Jur stated, you MUST check the condition code if you want to be able to handle errors that occur after the I/O request packet has been queued to the driver, regardless of whether it was a $qio or $qiow.
Jon
it depends
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-26-2007 11:23 AM
тАО09-26-2007 11:23 AM
Re: sys$qiow(efn$c_enf,...,iosb,...) - must iosb be specified?
The IOSB might be documented to be "optional", but if you want your code to work, you will always specify an IOSB, stored in a place that will be in scope when the operation completes (not an issue with $QIOW, but worth reminding yourself of everytime - the IOSB is written asynchronously, possibly AFTER the service has returned). That's true of all system services that have an IOSB or analogous structure.
One way of thinking about it is, the definition of completion of the operation is when the IOSB is written. Without an IOSB you can't be certain the operation has completed at all, let alone know if it's completed successfully. As Jur has stressed, you should always check the IOSB to confirm success.
There are all kinds of circumstances under which you can get a spurious completions of asynch operations (and therefore also the synch operations). EFN$C_ENF eliminates overloaded event flags from causing issues, BUT also prevents the use of the event flag being used to signal completion. You're therefore left with ONLY the IOSB to tell you when the operation has completed.
So, the answer to your question "Must the iosb always be specified in (the wait form of) calls like the above when using EFN$C_ENF?" is YES.
If you've specified an event flag, you might get away without an IOSB most of the time, but I'm fairly sure when using ENF, it just plain won't work without an IOSB.
Regardless, as Hoff has said, ALWAYS, ALWAYS, ALWAYS use an IOSB.
One way of thinking about it is, the definition of completion of the operation is when the IOSB is written. Without an IOSB you can't be certain the operation has completed at all, let alone know if it's completed successfully. As Jur has stressed, you should always check the IOSB to confirm success.
There are all kinds of circumstances under which you can get a spurious completions of asynch operations (and therefore also the synch operations). EFN$C_ENF eliminates overloaded event flags from causing issues, BUT also prevents the use of the event flag being used to signal completion. You're therefore left with ONLY the IOSB to tell you when the operation has completed.
So, the answer to your question "Must the iosb always be specified in (the wait form of) calls like the above when using EFN$C_ENF?" is YES.
If you've specified an event flag, you might get away without an IOSB most of the time, but I'm fairly sure when using ENF, it just plain won't work without an IOSB.
Regardless, as Hoff has said, ALWAYS, ALWAYS, ALWAYS use an IOSB.
A crucible of informative mistakes
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP