[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Cannot determine fs type from svn_fs_t

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-06-14 00:56:08 CEST

On Wed, 13 Jun 2007, Blair Zajac wrote:

> I'm writing some code to rename FSFS transactions if the filesystem is
> FSFS and I was surprised to see that there's no API call given a
> svn_fs_t to do this, I have to use svn_fs_type() which takes a path to
> the filesystem. I'd rather not do more IO if I already have an svn_fs_t.

Would this be a moot point if FSFS had unique transaction names?

> Is there any reason not to save the filesystem type in svn_fs_t and
> add a call to get it? Would this break binary compatibility? Is
> there a good reason not to do this? Where would be the best place
> to make this change?

'struct svn_fs_t' in subversion/libsvn_fs/fs-loader.h is an opaque
data structure which should really only be allocated by svn_fs_new()
(publicly deprecated, but used internally), svn_fs_open(), or
svn_fs_create().

Adding a new 'type' field to the structure's definition to cache the
FS type will speed up any repeated calls to the svn_fs_type() API;
sounds fine to me. The majority of the memory used by this would
likely be memory sticking around uncleared in a pool anyhow.

+1

  • application/pgp-signature attachment: stored
Received on Thu Jun 14 00:56:18 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.