Mercurial > nomad
changeset 550:86dce50738a0
objstore/posix: simplify getversion obj op
To keep things simple, the posix backend loads all versions of an object
while loading the object. Therefore, a request for any un-cached version
implies that the version doesn't exist.
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Tue, 06 Nov 2018 15:32:45 -0500 |
parents | b3b3e5ae201c |
children | 4b1b3fffdf7b |
files | src/objstore/posix/obj.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/objstore/posix/obj.c Tue Nov 06 15:33:12 2018 -0500 +++ b/src/objstore/posix/obj.c Tue Nov 06 15:32:45 2018 -0500 @@ -227,8 +227,11 @@ static int posix_getversion(struct objver *ver) { - /* for now, getversion is identical to getattr */ - return posix_getattr(ver, &ver->attrs); + /* + * We load all versions into the cache in initobj, therefore all + * other versions don't exist. + */ + return -ENOENT; } static int posix_getattr(struct objver *ver, struct nattr *attr)