On 26/09/2018 14:27, Andrew Dinn wrote:
: I'm not clear why we should only use one flag. The two flags I specified reflect two independent use cases, one where data stored in an NVM device is accessed read-only and another where it is accessed read-write. Are you suggesting that the read-only case is redundant? I'm not sure I agree. For example, a utility which might want to review the state of persistent data while a service is off-line would really want to pass flag READ_ONLY_PERSISTENT. Of course, it could employ READ_WRITE_PERSISTENT (or equivalently, SYNC) and just not write the data but, mutatis mutandis, that same argument would remove the case for flag READ_ONLY.
I'm wrong on this point. The map takes a single MapMode, not a set of modes as I was assuming, so you are right that it needs two new modes, not one. I do think we should re-visit the name though as the native flag is MAP_SYNC. -Alan