Coda File System

Re: the unexplored (?) 64-bit RVM

From: Jan Harkes <>
Date: Fri, 19 Aug 2016 15:25:30 -0400
On Fri, Aug 19, 2016 at 04:51:01PM +0200, wrote:
> I have looked at the source of librvm and at the first glance
> it is consistent about usage of long or unsigned long values
> in rvm addressing.
> Apparently there was at least one inconsistency in int vs long
> in rdsinit (using an int value as a counter to detect the
> end of the zero initialization run), but it was trivial to fix.

PRs are welcome, or even pointing out where. If I had to guess, I think
it is 'int remaining_space;' in rds_init.c:rds_init_heap().

> This could imply that librvm is more or less 64-bits-clean
> but my smoke tests showed that either/both rdsutils and coda server
> build for x86_64 (LP64 ABI) break when presented with RVM >= 2GB.
> This may be of course a consequence of rdsutils being broken,
> generating incorrect RVM even in some cases when they pretend to succeed.

It was written to work on 64-bit systems and even to allow it to manage
64-bits of space on a 32-bit system, but in that case you'd have to
page segments in and out of the available address space. Not sure how
much of this was tested.

I know we ran on ILP64 (DEC Alpha) in the past as well as sparc64 linux
at some point. But I am not sure how well tested RVM is on LP64. My
servers are all still running 32-bit binaries because there are
incompatibilities between 32-bit and 64-bit Coda servers in areas like
resolution so upgrading to 64-bit cannot be done incrementally.

> This clearly indicates that the code was never used on LP64 platforms
> with RVM > 2GB. Nevertheless just to be sure I would like to ask
> on the list, whether RVM was tested or used on ILP64 platforms (Alpha?)
> with sizes exceeding 2G?
> On the other hand, may be there was never an intention to support RVM
> bigger than 2^32 and a rewrite or replacement is needed to do such
> a thing? Hope the authors can tell.

Not sure where the original authors are, but it could be that it was
designed to handle only 32-bit (31-bit, if signed?) sized segments
in a 64-bit address space. A Coda server only uses a single segment,
which therefore would be limited to either 2 or 4GB. But this is just a
guess without looking at the code.

RVM actually consists of 3 parts, there is the transaction log which can
track and recover modifications to files, then there is a segment mapper
which can map all or parts of these files into the process address space.
Finally there is the rds allocator which acts like a recoverable heap,
most likely your issue is isolated to just that last part.

Received on 2016-08-19 15:25:43