linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 51/56] staging/lustre/mgc: Adjust comments to better conform to coding style
Date: Mon, 22 Feb 2016 21:54:29 -0500	[thread overview]
Message-ID: <1456196074-754064-52-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1456196074-754064-1-git-send-email-green@linuxhacker.ru>

From: Oleg Drokin <green@linuxhacker.ru>

This patch fixes "Block comments use a trailing */ on a separate line"
warnings from checkpatch

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/mgc/mgc_request.c | 71 ++++++++++++++++---------
 1 file changed, 46 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c
index 9764e57..6fc8225 100644
--- a/drivers/staging/lustre/lustre/mgc/mgc_request.c
+++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c
@@ -90,7 +90,8 @@ static int mgc_name2resid(char *name, int len, struct ldlm_res_id *res_id,
 int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id, int type)
 {
 	/* fsname is at most 8 chars long, maybe contain "-".
-	 * e.g. "lustre", "SUN-000" */
+	 * e.g. "lustre", "SUN-000"
+	 */
 	return mgc_name2resid(fsname, strlen(fsname), res_id, type);
 }
 EXPORT_SYMBOL(mgc_fsname2resid);
@@ -102,7 +103,8 @@ static int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id, int type
 
 	/* logname consists of "fsname-nodetype".
 	 * e.g. "lustre-MDT0001", "SUN-000-client"
-	 * there is an exception: llog "params" */
+	 * there is an exception: llog "params"
+	 */
 	name_end = strrchr(logname, '-');
 	if (!name_end)
 		len = strlen(logname);
@@ -125,7 +127,8 @@ static int config_log_get(struct config_llog_data *cld)
 }
 
 /* Drop a reference to a config log.  When no longer referenced,
-   we can free the config log data */
+ * we can free the config log data
+ */
 static void config_log_put(struct config_llog_data *cld)
 {
 	CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
@@ -252,7 +255,8 @@ static struct config_llog_data *config_recover_log_add(struct obd_device *obd,
 	char logname[32];
 
 	/* we have to use different llog for clients and mdts for cmd
-	 * where only clients are notified if one of cmd server restarts */
+	 * where only clients are notified if one of cmd server restarts
+	 */
 	LASSERT(strlen(fsname) < sizeof(logname) / 2);
 	strcpy(logname, fsname);
 	LASSERT(lcfg.cfg_instance);
@@ -483,8 +487,9 @@ static void do_requeue(struct config_llog_data *cld)
 	LASSERT(atomic_read(&cld->cld_refcount) > 0);
 
 	/* Do not run mgc_process_log on a disconnected export or an
-	   export which is being disconnected. Take the client
-	   semaphore to make the check non-racy. */
+	 * export which is being disconnected. Take the client
+	 * semaphore to make the check non-racy.
+	 */
 	down_read(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem);
 	if (cld->cld_mgcexp->exp_obd->u.cli.cl_conn_count != 0) {
 		CDEBUG(D_MGC, "updating log %s\n", cld->cld_logname);
@@ -529,8 +534,9 @@ static int mgc_requeue_thread(void *data)
 		}
 
 		/* Always wait a few seconds to allow the server who
-		   caused the lock revocation to finish its setup, plus some
-		   random so everyone doesn't try to reconnect at once. */
+		 * caused the lock revocation to finish its setup, plus some
+		 * random so everyone doesn't try to reconnect at once.
+		 */
 		to = MGC_TIMEOUT_MIN_SECONDS * HZ;
 		to += rand * HZ / 100; /* rand is centi-seconds */
 		lwi = LWI_TIMEOUT(to, NULL, NULL);
@@ -559,7 +565,8 @@ static int mgc_requeue_thread(void *data)
 			LASSERT(atomic_read(&cld->cld_refcount) > 0);
 
 			/* Whether we enqueued again or not in mgc_process_log,
-			 * we're done with the ref from the old enqueue */
+			 * we're done with the ref from the old enqueue
+			 */
 			if (cld_prev)
 				config_log_put(cld_prev);
 			cld_prev = cld;
@@ -575,7 +582,8 @@ static int mgc_requeue_thread(void *data)
 			config_log_put(cld_prev);
 
 		/* break after scanning the list so that we can drop
-		 * refcount to losing lock clds */
+		 * refcount to losing lock clds
+		 */
 		if (unlikely(stopped)) {
 			spin_lock(&config_list_lock);
 			break;
@@ -598,7 +606,8 @@ static int mgc_requeue_thread(void *data)
 }
 
 /* Add a cld to the list to requeue.  Start the requeue thread if needed.
-   We are responsible for dropping the config log reference from here on out. */
+ * We are responsible for dropping the config log reference from here on out.
+ */
 static void mgc_requeue_add(struct config_llog_data *cld)
 {
 	CDEBUG(D_INFO, "log %s: requeue (r=%d sp=%d st=%x)\n",
@@ -635,7 +644,8 @@ static int mgc_llog_init(const struct lu_env *env, struct obd_device *obd)
 	int			 rc;
 
 	/* setup only remote ctxt, the local disk context is switched per each
-	 * filesystem during mgc_fs_setup() */
+	 * filesystem during mgc_fs_setup()
+	 */
 	rc = llog_setup(env, obd, &obd->obd_olg, LLOG_CONFIG_REPL_CTXT, obd,
 			&llog_client_ops);
 	if (rc)
@@ -697,7 +707,8 @@ static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
 static int mgc_cleanup(struct obd_device *obd)
 {
 	/* COMPAT_146 - old config logs may have added profiles we don't
-	   know about */
+	 * know about
+	 */
 	if (obd->obd_type->typ_refcnt <= 1)
 		/* Only for the last mgc */
 		class_del_profiles();
@@ -794,7 +805,8 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
 			break;
 		}
 		/* Make sure not to re-enqueue when the mgc is stopping
-		   (we get called from client_disconnect_export) */
+		 * (we get called from client_disconnect_export)
+		 */
 		if (!lock->l_conn_export ||
 		    !lock->l_conn_export->exp_obd->u.cli.cl_conn_count) {
 			CDEBUG(D_MGC, "log %.8s: disconnecting, won't requeue\n",
@@ -816,7 +828,8 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
 
 /* Not sure where this should go... */
 /* This is the timeout value for MGS_CONNECT request plus a ping interval, such
- * that we can have a chance to try the secondary MGS if any. */
+ * that we can have a chance to try the secondary MGS if any.
+ */
 #define  MGC_ENQUEUE_LIMIT (INITIAL_CONNECT_TIMEOUT + (AT_OFF ? 0 : at_min) \
 				+ PING_INTERVAL)
 #define  MGC_TARGET_REG_LIMIT 10
@@ -880,7 +893,8 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
 	       cld->cld_resid.name[0]);
 
 	/* We need a callback for every lockholder, so don't try to
-	   ldlm_lock_match (see rev 1.1.2.11.2.47) */
+	 * ldlm_lock_match (see rev 1.1.2.11.2.47)
+	 */
 	req = ptlrpc_request_alloc_pack(class_exp2cliimp(exp),
 					&RQF_LDLM_ENQUEUE, LUSTRE_DLM_VERSION,
 					LDLM_ENQUEUE);
@@ -895,7 +909,8 @@ static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
 	rc = ldlm_cli_enqueue(exp, &req, &einfo, &cld->cld_resid, NULL, flags,
 			      NULL, 0, LVB_T_NONE, lockh, 0);
 	/* A failed enqueue should still call the mgc_blocking_ast,
-	   where it will be requeued if needed ("grant failed"). */
+	 * where it will be requeued if needed ("grant failed").
+	 */
 	ptlrpc_req_finished(req);
 	return rc;
 }
@@ -1373,7 +1388,8 @@ again:
 	}
 
 	/* always update the index even though it might have errors with
-	 * handling the recover logs */
+	 * handling the recover logs
+	 */
 	cfg->cfg_last_idx = res->mcr_offset;
 	eof = res->mcr_offset == res->mcr_size;
 
@@ -1400,7 +1416,8 @@ again:
 	mne_swab = !!ptlrpc_rep_need_swab(req);
 #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 50, 0)
 	/* This import flag means the server did an extra swab of IR MNE
-	 * records (fixed in LU-1252), reverse it here if needed. LU-1644 */
+	 * records (fixed in LU-1252), reverse it here if needed. LU-1644
+	 */
 	if (unlikely(req->rq_import->imp_need_mne_swab))
 		mne_swab = !mne_swab;
 #else
@@ -1489,7 +1506,8 @@ static int mgc_process_cfg_log(struct obd_device *mgc,
 
 	/* logname and instance info should be the same, so use our
 	 * copy of the instance for the update.  The cfg_last_idx will
-	 * be updated here. */
+	 * be updated here.
+	 */
 	rc = class_config_parse_llog(env, ctxt, cld->cld_logname,
 				     &cld->cld_cfg);
 
@@ -1529,9 +1547,10 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
 	LASSERT(cld);
 
 	/* I don't want multiple processes running process_log at once --
-	   sounds like badness.  It actually might be fine, as long as
-	   we're not trying to update from the same log
-	   simultaneously (in which case we should use a per-log sem.) */
+	 * sounds like badness.  It actually might be fine, as long as
+	 * we're not trying to update from the same log
+	 * simultaneously (in which case we should use a per-log sem.)
+	 */
 	mutex_lock(&cld->cld_lock);
 	if (cld->cld_stopping) {
 		mutex_unlock(&cld->cld_lock);
@@ -1556,7 +1575,8 @@ int mgc_process_log(struct obd_device *mgc, struct config_llog_data *cld)
 		CDEBUG(D_MGC, "Can't get cfg lock: %d\n", rcl);
 
 		/* mark cld_lostlock so that it will requeue
-		 * after MGC becomes available. */
+		 * after MGC becomes available.
+		 */
 		cld->cld_lostlock = 1;
 		/* Get extra reference, it will be put in requeue thread */
 		config_log_get(cld);
@@ -1642,7 +1662,8 @@ static int mgc_process_config(struct obd_device *obd, u32 len, void *buf)
 
 		/* COMPAT_146 */
 		/* FIXME only set this for old logs!  Right now this forces
-		   us to always skip the "inside markers" check */
+		 * us to always skip the "inside markers" check
+		 */
 		cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146;
 
 		rc = mgc_process_log(obd, cld);
-- 
2.1.0

  parent reply	other threads:[~2016-02-23  4:03 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  2:53 [PATCH 00/56] More Lustre cleanups green
2016-02-23  2:53 ` [PATCH 01/56] staging/lustre/fld: Remove useless typedefs green
2016-02-23  2:53 ` [PATCH 02/56] staging/lustre: Get rid of client_obd_lock_t typedef green
2016-02-23  2:53 ` [PATCH 03/56] staging/lustre: Get rid of loc_flags_t typedef green
2016-02-23  2:53 ` [PATCH 04/56] stagig/lustre: Get rid of cksum_type_t typedef green
2016-02-23  2:53 ` [PATCH 05/56] staging/lustre: Get rid of ost_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 06/56] staging/lustre: Get rid of quota_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 07/56] staging/lustre: Get rid of mds_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 08/56] staging/lustre: Get rid of mds_reint_t, mdt_reint_t typedefs green
2016-02-23  2:53 ` [PATCH 09/56] staging/lustre: Get rid of ldlm_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 10/56] staging/lustre: Remove ldlm type/mode typedefs green
2016-02-23  4:42   ` kbuild test robot
2016-02-23  2:53 ` [PATCH 11/56] staging/lustre: Get rid of mgs_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 12/56] staging/lustre: Get rid of obd_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 13/56] staging/lustre: Get rid of llog_op_type typedef green
2016-02-23  2:53 ` [PATCH 14/56] staging/lustre: Get rid of sec_cmd_t typedef green
2016-02-23  2:53 ` [PATCH 15/56] staging/lustre/ldlm: Remove unused lr_most_restr from struct ldlm_resource green
2016-02-23  2:53 ` [PATCH 16/56] staging/lustre: Get rid of object update code green
2016-02-23  2:53 ` [PATCH 17/56] staging/lustre: Get rid of lustre_fid typedef green
2016-02-23  2:53 ` [PATCH 18/56] staging/lustre: Get rid of lustre_quota_version typedef green
2016-02-23  2:53 ` [PATCH 19/56] staging/lustre: Get rid of ldlm_error_t typedef green
2016-02-23  2:53 ` [PATCH 20/56] staging/lustre: Remove ldlm_appetite_t typedef green
2016-02-23  2:53 ` [PATCH 21/56] staging/lustre: Get rid of ldlm_ns_type_t typedef green
2016-02-23  2:54 ` [PATCH 22/56] staging/lustre: Get rid of ldlm_cancel_flags_t typedef green
2016-02-23  2:54 ` [PATCH 23/56] staging/lustre/llite: Get rid of se_stat_t typedef green
2016-02-23  2:54 ` [PATCH 24/56] staging/lustre: Remove lustre_build_version.h green
2016-02-23  2:54 ` [PATCH 25/56] staging/lustre: Get rid of C99 comments in lustre_idl.h green
2016-02-23  2:54 ` [PATCH 26/56] staging/lustre: Remove server-side changelog defines green
2016-02-23  2:54 ` [PATCH 27/56] staging/lustre: Remove FSF mailing address from GPL notices green
2016-02-23  2:54 ` [PATCH 28/56] staging/lustre: Remove server-only values from enum lu_dirent_attrs green
2016-02-23  2:54 ` [PATCH 29/56] staging/lustre: Remove *_CONNECT_SUPPORTED defines green
2016-02-23  2:54 ` [PATCH 30/56] staging/lustre: Remove duplicated quota defines green
2016-02-23  2:54 ` [PATCH 31/56] staging/lustre: Remove unused struct quota_body green
2016-02-23  2:54 ` [PATCH 32/56] staging/lustre: Remove lquota_glb_rec, lquota_slv_rec and lquota_acct_rec green
2016-02-23  2:54 ` [PATCH 33/56] staging/lustre: S_DIRSYNC is always defined in kernel green
2016-02-23  2:54 ` [PATCH 34/56] staging/lustre: FMODE_READ and FMODE_WRITE are always defined in the kernel green
2016-02-23  2:54 ` [PATCH 35/56] staging/lustre: Remove index file transfer structures green
2016-02-23  2:54 ` [PATCH 36/56] staging/lustre: Remove server data from struct obd_export green
2016-02-23  2:54 ` [PATCH 37/56] staging/lustre: Remove last_rcvd-file related data green
2016-02-23  2:54 ` [PATCH 38/56] staging/lustre: Remove dead code in ldlm_lock_destroy_internal green
2016-02-23  2:54 ` [PATCH 39/56] staging/lustre: MAY_NOT_BLOCK is always defined, don't check for it green
2016-02-23  2:54 ` [PATCH 40/56] staging/lustre: Remove unused lli_open_count from struct ll_inode_info green
2016-02-23  2:54 ` [PATCH 41/56] staging/lustre: Reformat comments and structures in lustre_idl.h green
2016-02-23  2:54 ` [PATCH 42/56] staging/lustre/include: Adjust comment style green
2016-02-23  2:54 ` [PATCH 43/56] staging/lustre/fld: Adjust comments to better conform to coding style green
2016-02-23  2:54 ` [PATCH 44/56] staging/lustre/fid: " green
2016-02-23  2:54 ` [PATCH 45/56] staging/lustre/lclient: " green
2016-02-23  2:54 ` [PATCH 46/56] staging/lustre/ldlm: " green
2016-02-23  2:54 ` [PATCH 47/56] staging/lustre/llite: " green
2016-02-23  2:54 ` [PATCH 48/56] staging/lustre/lmv: " green
2016-02-23  2:54 ` [PATCH 49/56] staging/lustre/lov: " green
2016-02-23  2:54 ` [PATCH 50/56] staging/lustre/mdc: " green
2016-02-23  2:54 ` green [this message]
2016-02-23  2:54 ` [PATCH 52/56] staging/lustre/obdclass: " green
2016-02-23  2:54 ` [PATCH 53/56] staging/lustre/obdecho: " green
2016-02-23  2:54 ` [PATCH 54/56] staging/lustre/osc: " green
2016-02-23  2:54 ` [PATCH 55/56] staging/lustre/ptlrpc: " green
2016-02-23  2:54 ` [PATCH 56/56] staging/lustre: Fix indentation mistakes green

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456196074-754064-52-git-send-email-green@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).