On 30/09/18 16:31, Alan Bateman wrote: > 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. Sure, I'd be happy to change this.
Would READ_ONLY_SYNC and READ_WRITE_SYNC be suitable alternatives? Or do you have something else in mind? regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander