Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
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 2024-06-11 09:09
Reporter Ralph Corderoy View Status public  
Assigned To
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Ralph Corderoy
Organization
User Reference
Section posix_fadvise
Page Number 1440
Line Number 47838
Interp Status ---
Final Accepted Text Note: 0004126
Summary 0001135: Is "all data" when len is 0 a snapshot of file's length?
Description "...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.
Desired Action 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.
Tags tc3-2008
Attached Files

- Relationships

-  Notes
(0003672)
shware_systems (reporter)
2017-04-08 13:54

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.
(0004126)
geoffclare (manager)
2018-09-13 16:20

Change:
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.

- Issue History
Date Modified Username Field Change
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
2024-06-11 09:09 agadmin Status Applied => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker