|Anonymous | Login||2023-12-05 19:45 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001135||[1003.1(2016/18)/Issue7+TC2] System Interfaces||Editorial||Clarification Requested||2017-04-06 11:04||2019-10-31 11:42|
|Reporter||Ralph Corderoy||View Status||public|
|Priority||normal||Resolution||Accepted As Marked|
|Final Accepted Text||Note: 0004126|
|Summary||0001135: Is "all data" when len is 0 a snapshot of file's length?|
"...starting at offset and continuing for len bytes. The specified range need not currently exist in the file. If len is zero, all data following offset is specified."
Does a len of zero mean from offset to the current extent of the file?
Or if the file later grows, is that covered too by this call's advice?
The "need not currently exist" is clear for offset=0 len=100 if the file is currently 42 bytes and later grows to 314, but the len=0 case is not so unambiguous.
Clarification in the wording.
I'd expect the behaviour of offset=0 len=100 to apply to those 100 bytes regardless of how many times the file is truncated and extended.
Similarly, len=0 should apply from offset to the end of the file, adjusting continuously with that end.
I agree with the Desired Action that this appears to be the intent, but is left more as implementation-defined by the "may use this information" part. An implementation can provide the interface but do no actual access optimizations based on the advice value, as worded, so any zero or positive len value can be ignored, effectively. So either way of interpreting zero conforming, technically.
Additionally, it is ambiguous about how an implementation should handle multiple calls where advice values conflict for a given range, e.g. a call with WILL_NEED on the range 0,100 followed by one with WONT_NEED on the range of 50,0. Is the first call adjusted to 0,50; or the second call's range adjusted to 100,0; should this be considered an error; etc.
As a related issue, the close() interface does not have an ADV marked section saying that advice data set by posix_fadvise() shall be released, leading to possible errors if a fildes handle is reopened as an incompatible file type and previous advice still in effect.
If len is zero, all data following offset is specified.to:
If len is zero, all data from offset to the largest possible value of the file offset for that file shall be specified.
|2017-04-06 11:04||Ralph Corderoy||New Issue|
|2017-04-06 11:04||Ralph Corderoy||Name||=> Ralph Corderoy|
|2017-04-06 11:04||Ralph Corderoy||URL||=> http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fadvise.html [^]|
|2017-04-06 11:04||Ralph Corderoy||Section||=> posix_fadvise|
|2017-04-06 11:07||Ralph Corderoy||Issue Monitored: Ralph Corderoy|
|2017-04-08 13:54||shware_systems||Note Added: 0003672|
|2018-09-13 16:20||geoffclare||Note Added: 0004126|
|2018-09-13 16:21||geoffclare||Project||Online Pubs => 1003.1(2016/18)/Issue7+TC2|
|2018-09-13 16:22||geoffclare||Page Number||=> 1440|
|2018-09-13 16:22||geoffclare||Line Number||=> 47838|
|2018-09-13 16:22||geoffclare||Interp Status||=> ---|
|2018-09-13 16:22||geoffclare||Final Accepted Text||=> Note: 0004126|
|2018-09-13 16:22||geoffclare||Status||New => Resolved|
|2018-09-13 16:22||geoffclare||Resolution||Open => Accepted As Marked|
|2018-09-13 16:22||geoffclare||Tag Attached: tc3-2008|
|2019-10-31 11:42||geoffclare||Status||Resolved => Applied|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|