changeset 544:5710a019ee3d

objstore: use consistent naming for obj/objver get functions They used to be static, so the name didn't matter as much. That isn't true anymore, therefore we should use a name that parallels the volume and vdev internal API. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sun, 11 Nov 2018 10:48:01 -0500
parents 32a60cd03dee
children 5be50a03916a
files src/objstore/obj.c src/objstore/obj_ops.c src/objstore/objstore_impl.h
diffstat 3 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/objstore/obj.c	Sun Nov 11 10:26:25 2018 -0500
+++ b/src/objstore/obj.c	Sun Nov 11 10:48:01 2018 -0500
@@ -214,7 +214,7 @@
  *
  * Return with the object locked and referenced.
  */
-struct obj *getobj(struct objstore *vol, const struct noid *oid)
+struct obj *obj_by_oid(struct objstore *vol, const struct noid *oid)
 {
 	struct obj *obj;
 	int ret;
@@ -295,8 +295,8 @@
  *
  * Return the found version, with the object referenced and locked.
  */
-struct objver *getver(struct objstore *vol, const struct noid *oid,
-		      const struct nvclock *clock)
+struct objver *objver_by_clock(struct objstore *vol, const struct noid *oid,
+			       const struct nvclock *clock)
 {
 	struct objver *ver;
 	struct obj *obj;
@@ -304,7 +304,7 @@
 	/*
 	 * First, find the object based on the oid.
 	 */
-	obj = getobj(vol, oid);
+	obj = obj_by_oid(vol, oid);
 	if (IS_ERR(obj))
 		return ERR_CAST(obj);
 
--- a/src/objstore/obj_ops.c	Sun Nov 11 10:26:25 2018 -0500
+++ b/src/objstore/obj_ops.c	Sun Nov 11 10:48:01 2018 -0500
@@ -35,7 +35,7 @@
 	if (!vol || !oid || !clock)
 		return ERR_PTR(-EINVAL);
 
-	objver = getver(vol, oid, clock);
+	objver = objver_by_clock(vol, oid, clock);
 	if (IS_ERR(objver))
 		return ERR_CAST(objver);
 
@@ -315,7 +315,7 @@
 	if (ret)
 		return ERR_PTR(ret);
 
-	return getobj(dirver->obj->vol, &child_oid);
+	return obj_by_oid(dirver->obj->vol, &child_oid);
 }
 
 int objstore_unlink(struct objstore_open_obj_info *diropen, const char *name)
--- a/src/objstore/objstore_impl.h	Sun Nov 11 10:26:25 2018 -0500
+++ b/src/objstore/objstore_impl.h	Sun Nov 11 10:48:01 2018 -0500
@@ -59,9 +59,10 @@
 extern struct objver *objver_alloc(void);
 extern void objver_free(struct objver *ver);
 
-extern struct obj *getobj(struct objstore *vol, const struct noid *oid);
-extern struct objver *getver(struct objstore *vol, const struct noid *oid,
-			     const struct nvclock *clock);
+extern struct obj *obj_by_oid(struct objstore *vol, const struct noid *oid);
+extern struct objver *objver_by_clock(struct objstore *vol,
+				      const struct noid *oid,
+				      const struct nvclock *clock);
 
 REFCNT_INLINE_FXNS(struct obj, obj, refcnt, obj_free, NULL);