>It's not POSIX byte-range >read- or write-locking per fcntl, but it's not clear to me how often >that's actually useful.
they aren't. i wrote a paper about it many years ago, when helping to implement a database system. in short, you can't rely on them for either scale or properties, so in any serious application you'll do it yourself anyway.