Whamcloud - gitweb
LU-3610 ptlrpc: Fix argument names of mgs_write_log_pool() 44/7044/2
authorLi Xi <lixi@ddn.com>
Sun, 21 Jul 2013 01:21:00 +0000 (18:21 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 11 Sep 2013 03:38:32 +0000 (03:38 +0000)
The argument 'fsname' and 'poolname' of mgs_write_log_pool()
is misplaced, which is confusing for code readers. This patch
fixes the problem.

What's more, 'lovname' is changed to 'tgtname', which might
be more preferable for more upcoming callers of the function.

Signed-off-by: Li Xi <lixi@ddn.com>
Change-Id: I08f11be7e2c99f623d22bec865f31476021c72bb
Reviewed-on: http://review.whamcloud.com/7044
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobbie Lind <bobbie.j.lind@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mgs/mgs_llog.c

index ebd4fbc..8e40891 100644 (file)
@@ -3819,9 +3819,9 @@ out:
 
 static int mgs_write_log_pool(const struct lu_env *env,
                              struct mgs_device *mgs, char *logname,
 
 static int mgs_write_log_pool(const struct lu_env *env,
                              struct mgs_device *mgs, char *logname,
-                              struct fs_db *fsdb, char *lovname,
+                             struct fs_db *fsdb, char *tgtname,
                               enum lcfg_command_type cmd,
                               enum lcfg_command_type cmd,
-                              char *poolname, char *fsname,
+                             char *fsname, char *poolname,
                               char *ostname, char *comment)
 {
         struct llog_handle *llh = NULL;
                               char *ostname, char *comment)
 {
         struct llog_handle *llh = NULL;
@@ -3830,13 +3830,14 @@ static int mgs_write_log_pool(const struct lu_env *env,
        rc = record_start_log(env, mgs, &llh, logname);
        if (rc)
                return rc;
        rc = record_start_log(env, mgs, &llh, logname);
        if (rc)
                return rc;
-       rc = record_marker(env, llh, fsdb, CM_START, lovname, comment);
+       rc = record_marker(env, llh, fsdb, CM_START, tgtname, comment);
        if (rc)
                goto out;
        if (rc)
                goto out;
-       rc = record_base(env, llh, lovname, 0, cmd, poolname, fsname, ostname, 0);
+       rc = record_base(env, llh, tgtname, 0, cmd,
+                        fsname, poolname, ostname, 0);
        if (rc)
                goto out;
        if (rc)
                goto out;
-       rc = record_marker(env, llh, fsdb, CM_END, lovname, comment);
+       rc = record_marker(env, llh, fsdb, CM_END, tgtname, comment);
 out:
        record_end_log(env, &llh);
         return rc;
 out:
        record_end_log(env, &llh);
         return rc;