Whamcloud - gitweb
EX-7601 ofd: rename map_remote_to_local
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 27 Oct 2023 19:01:06 +0000 (15:01 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 27 Nov 2023 18:39:41 +0000 (18:39 +0000)
osd_map_remote_to_local implies some complex role, but in
fact what this does is initialize the fields of the
local niobuf structs to represent the requested range.

This *may* be the same as a remote niobuf, but it also
isn't in some cases.  Name it osd_init_lnbs instead.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I0d3b5f24e42ee8dc962437daea7cf9347ccb9059
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/52861
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
lustre/osd-ldiskfs/osd_io.c

index f2bbaa4..0da8eb7 100644 (file)
@@ -661,8 +661,8 @@ out:
        RETURN(rc);
 }
 
-static int osd_map_remote_to_local(loff_t offset, ssize_t len, int *nrpages,
-                                  struct niobuf_local *lnb, int maxlnb)
+static int osd_init_lnbs(loff_t offset, ssize_t len, int *nrpages,
+                        struct niobuf_local *lnb, int maxlnb)
 {
        int rc = 0;
        ENTRY;
@@ -866,7 +866,7 @@ static int osd_bufs_get(const struct lu_env *env, struct dt_object *dt,
        if (unlikely(obj->oo_destroyed))
                RETURN(-ENOENT);
 
-       rc = osd_map_remote_to_local(pos, len, &npages, lnb, maxlnb);
+       rc = osd_init_lnbs(pos, len, &npages, lnb, maxlnb);
        if (rc)
                RETURN(rc);