Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340279 > unrolled thread

[PATCH 00/56] More Lustre cleanups.

Started bygreen@linuxhacker.ru
First post2016-02-23 05:20 +0100
Last post2016-02-23 05:20 +0100
Articles 8 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/56] More Lustre cleanups. green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 06/56] staging/lustre: Get rid of quota_cmd_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 19/56] staging/lustre: Get rid of ldlm_error_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 18/56] staging/lustre: Get rid of lustre_quota_version typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 07/56] staging/lustre: Get rid of mds_cmd_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 14/56] staging/lustre: Get rid of sec_cmd_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 04/56] stagig/lustre: Get rid of cksum_type_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100
    [PATCH 12/56] staging/lustre: Get rid of obd_cmd_t typedef green@linuxhacker.ru - 2016-02-23 05:20 +0100

#1340279 — [PATCH 00/56] More Lustre cleanups.

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 00/56] More Lustre cleanups.
Message-ID<r5csp-8gx-3@gated-at.bofh.it>
From: Oleg Drokin <green@linuxhacker.ru>

This is another round of Lustre cleanups mostly aimed at
fixing checkpatch warnings, but also removing
unneeded code and fixign other things I am noticing along the way.

Oleg Drokin (56):
  staging/lustre/fld: Remove useless typedefs
  staging/lustre: Get rid of client_obd_lock_t typedef
  staging/lustre: Get rid of loc_flags_t typedef
  stagig/lustre: Get rid of cksum_type_t typedef
  staging/lustre: Get rid of ost_cmd_t typedef
  staging/lustre: Get rid of quota_cmd_t typedef
  staging/lustre: Get rid of mds_cmd_t typedef
  staging/lustre: Get rid of mds_reint_t, mdt_reint_t typedefs
  staging/lustre: Get rid of ldlm_cmd_t typedef
  staging/lustre: Remove ldlm typedefs
  staging/lustre: Get rid of mgs_cmd_t typedef
  staging/lustre: Get rid of obd_cmd_t typedef
  staging/lustre: Get rid of llog_op_type typedef
  staging/lustre: Get rid of sec_cmd_t typedef
  staging/lustre/ldlm: Remove unused lr_most_restr from struct
    ldlm_resource
  staging/lustre: Get rid of object update code
  staging/lustre: Get rid of lustre_fid typedef
  staging/lustre: Get rid of lustre_quota_version typedef
  staging/lustre: Get rid of ldlm_error_t typedef
  staging/lustre: Remove ldlm_appetite_t typedef
  staging/lustre: Get rid of ldlm_ns_type_t typedef
  staging/lustre: Get rid of ldlm_cancel_flags_t typedef
  staging/lustre/llite: Get rid of se_stat_t typedef
  staging/lustre: Remove lustre_build_version.h
  staging/lustre: Get rid of C99 comments in lustre_idl.h
  staging/lustre: Remove server-side changelog defines
  staging/lustre: Remove FSF mailing address from GPL notices
  staging/lustre: Remove server-only values from enum lu_dirent_attrs
  staging/lustre: Remove *_CONNECT_SUPPORTED defines
  staging/lustre: Remove duplicated quota defines
  staging/lustre: Remove unused struct quota_body
  staging/lustre: Remove lquota_glb_rec, lquota_slv_rec and
    lquota_acct_rec
  staging/lustre: S_DIRSYNC is always defined in kernel
  staging/lustre: FMODE_READ and FMODE_WRITE are always defined in the
    kernel
  staging/lustre: Remvoe index file transfer structures
  staging/lustre: Remove server data from struct obd_export
  staging/lustre: Remove last_rcvd-file related data
  staging/lustre: Remove dead code in ldlm_lock_destroy_internal
  staging/lustre: MAY_NOT_BLOCK is always defined, don't check for it.
  staging/lustre: Remove unused lli_open_count from struct ll_inode_info
  staging/lustre: Reformat comments and structures in lustre_idl.h
  staging/lustre/include: Adjust comment style
  staging/lustre/fld: Adjust comments to better conform to coding style
  staging/lustre/fid: Adjust comments to better conform to coding style
  staging/lustre/lclient: Adjust comments to better conform to coding
    style
  staging/lustre/ldlm: Adjust comments to better conform to coding style
  staging/lustre/llite: Adjust comments to better conform to coding
    style
  staging/lustre/lmv: Adjust comments to better conform to coding style
  staging/lustre/lov: Adjust comments to better conform to coding style
  staging/lustre/mdc: Adjust comments to better conform to coding style
  staging/lustre/mgc: Adjust comments to better conform to coding style
  staging/lustre/obdclass: Adjust comments to better conform to coding
    style
  staging/lustre/obdecho: Adjust comments to better conform to coding
    style
  staging/lustre/osc: Adjust comments to better conform to coding style
  staging/lustre/ptlrpc: Adjust comments to better conform to coding
    style
  staging/lustre: Fix indentation mistakes

 .../lustre/include/linux/libcfs/libcfs_cpu.h       |   5 -
 .../lustre/include/linux/libcfs/linux/linux-cpu.h  |   5 -
 drivers/staging/lustre/lnet/lnet/lib-ptl.c         |   5 -
 drivers/staging/lustre/lustre/fid/fid_request.c    |   6 +-
 drivers/staging/lustre/lustre/fld/fld_cache.c      |   9 +-
 drivers/staging/lustre/lustre/fld/fld_internal.h   |  33 +-
 drivers/staging/lustre/lustre/fld/fld_request.c    |   9 +-
 drivers/staging/lustre/lustre/include/cl_object.h  |  69 +-
 drivers/staging/lustre/lustre/include/lclient.h    |   3 +-
 drivers/staging/lustre/lustre/include/linux/obd.h  |  12 +-
 .../staging/lustre/lustre/include/lprocfs_status.h |  31 +-
 drivers/staging/lustre/lustre/include/lu_object.h  |  12 +-
 .../lustre/lustre/include/lustre/ll_fiemap.h       |  63 +-
 .../lustre/include/lustre/lustre_build_version.h   |   2 -
 .../lustre/lustre/include/lustre/lustre_idl.h      | 731 ++++++---------------
 .../lustre/lustre/include/lustre/lustre_user.h     |  82 ++-
 drivers/staging/lustre/lustre/include/lustre_cfg.h |   9 +-
 .../staging/lustre/lustre/include/lustre_disk.h    | 252 +------
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 111 ++--
 .../lustre/lustre/include/lustre_dlm_flags.h       |  51 +-
 .../staging/lustre/lustre/include/lustre_export.h  |  73 +-
 drivers/staging/lustre/lustre/include/lustre_fid.h |  18 +-
 drivers/staging/lustre/lustre/include/lustre_fld.h |  33 +-
 .../staging/lustre/lustre/include/lustre_handles.h |   3 +-
 .../staging/lustre/lustre/include/lustre_import.h  |   3 +-
 drivers/staging/lustre/lustre/include/lustre_lib.h |   3 +-
 drivers/staging/lustre/lustre/include/lustre_log.h |   3 +-
 drivers/staging/lustre/lustre/include/lustre_mdc.h |   6 +-
 drivers/staging/lustre/lustre/include/lustre_net.h |  41 +-
 .../lustre/lustre/include/lustre_req_layout.h      |   9 -
 drivers/staging/lustre/lustre/include/obd.h        |  76 ++-
 drivers/staging/lustre/lustre/include/obd_cksum.h  |  21 +-
 drivers/staging/lustre/lustre/include/obd_class.h  |  66 +-
 .../staging/lustre/lustre/include/obd_support.h    |  18 +-
 drivers/staging/lustre/lustre/lclient/glimpse.c    |   3 +-
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c |  24 +-
 .../staging/lustre/lustre/lclient/lcommon_misc.c   |   6 +-
 drivers/staging/lustre/lustre/ldlm/interval_tree.c |   6 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_extent.c   |  14 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c    |  51 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_internal.h |  15 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c      |  35 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c     | 110 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c    |  46 +-
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  | 159 +++--
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  46 +-
 drivers/staging/lustre/lustre/llite/dcache.c       |  18 +-
 drivers/staging/lustre/lustre/llite/dir.c          |  31 +-
 drivers/staging/lustre/lustre/llite/file.c         | 182 +++--
 drivers/staging/lustre/lustre/llite/llite_close.c  |  18 +-
 .../staging/lustre/lustre/llite/llite_internal.h   | 123 ++--
 drivers/staging/lustre/lustre/llite/llite_lib.c    |  89 ++-
 drivers/staging/lustre/lustre/llite/llite_mmap.c   |  22 +-
 drivers/staging/lustre/lustre/llite/llite_nfs.c    |   6 +-
 drivers/staging/lustre/lustre/llite/lproc_llite.c  |   3 +-
 drivers/staging/lustre/lustre/llite/namei.c        |  41 +-
 drivers/staging/lustre/lustre/llite/rw.c           |  74 ++-
 drivers/staging/lustre/lustre/llite/rw26.c         |  23 +-
 drivers/staging/lustre/lustre/llite/statahead.c    |  46 +-
 drivers/staging/lustre/lustre/llite/super25.c      |   6 +-
 drivers/staging/lustre/lustre/llite/symlink.c      |   3 +-
 drivers/staging/lustre/lustre/llite/vvp_io.c       |  42 +-
 drivers/staging/lustre/lustre/llite/vvp_object.c   |   3 +-
 drivers/staging/lustre/lustre/llite/vvp_page.c     |   9 +-
 drivers/staging/lustre/lustre/llite/xattr.c        |  15 +-
 drivers/staging/lustre/lustre/llite/xattr_cache.c  |   8 +-
 drivers/staging/lustre/lustre/lmv/lmv_fld.c        |   3 +-
 drivers/staging/lustre/lustre/lmv/lmv_intent.c     |   9 +-
 drivers/staging/lustre/lustre/lmv/lmv_obd.c        |  56 +-
 drivers/staging/lustre/lustre/lov/lov_ea.c         |   3 +-
 drivers/staging/lustre/lustre/lov/lov_internal.h   |   6 +-
 drivers/staging/lustre/lustre/lov/lov_lock.c       |  32 +-
 drivers/staging/lustre/lustre/lov/lov_obd.c        |  86 ++-
 drivers/staging/lustre/lustre/lov/lov_object.c     |  24 +-
 drivers/staging/lustre/lustre/lov/lov_offset.c     |  12 +-
 drivers/staging/lustre/lustre/lov/lov_pack.c       |  12 +-
 drivers/staging/lustre/lustre/lov/lov_pool.c       |  14 +-
 drivers/staging/lustre/lustre/lov/lov_request.c    |  18 +-
 drivers/staging/lustre/lustre/lov/lovsub_lock.c    |   6 +-
 drivers/staging/lustre/lustre/mdc/mdc_internal.h   |  14 +-
 drivers/staging/lustre/lustre/mdc/mdc_lib.c        |   3 +-
 drivers/staging/lustre/lustre/mdc/mdc_locks.c      | 103 +--
 drivers/staging/lustre/lustre/mdc/mdc_reint.c      |  14 +-
 drivers/staging/lustre/lustre/mdc/mdc_request.c    |  27 +-
 drivers/staging/lustre/lustre/mgc/mgc_request.c    |  71 +-
 drivers/staging/lustre/lustre/obdclass/cl_io.c     |  58 +-
 drivers/staging/lustre/lustre/obdclass/cl_lock.c   |  24 +-
 drivers/staging/lustre/lustre/obdclass/class_obd.c |  16 +-
 drivers/staging/lustre/lustre/obdclass/genops.c    |  42 +-
 .../lustre/lustre/obdclass/linux/linux-module.c    |   4 +-
 drivers/staging/lustre/lustre/obdclass/llog.c      |   6 +-
 drivers/staging/lustre/lustre/obdclass/llog_obd.c  |   3 +-
 drivers/staging/lustre/lustre/obdclass/llog_swab.c |   3 +-
 .../lustre/lustre/obdclass/lprocfs_counters.c      |   6 +-
 .../lustre/lustre/obdclass/lprocfs_status.c        |   2 +-
 drivers/staging/lustre/lustre/obdclass/lu_object.c |   3 +-
 .../lustre/lustre/obdclass/lustre_handles.c        |   3 +-
 .../staging/lustre/lustre/obdclass/lustre_peer.c   |   3 +-
 .../staging/lustre/lustre/obdclass/obd_config.c    |  44 +-
 drivers/staging/lustre/lustre/obdclass/obd_mount.c |  67 +-
 drivers/staging/lustre/lustre/obdclass/obdo.c      |   6 +-
 .../staging/lustre/lustre/obdecho/echo_client.c    |   9 +-
 .../staging/lustre/lustre/obdecho/echo_internal.h  |   5 -
 drivers/staging/lustre/lustre/osc/lproc_osc.c      |   4 +-
 drivers/staging/lustre/lustre/osc/osc_cache.c      | 168 +++--
 .../staging/lustre/lustre/osc/osc_cl_internal.h    |  37 +-
 drivers/staging/lustre/lustre/osc/osc_internal.h   |   8 +-
 drivers/staging/lustre/lustre/osc/osc_io.c         |   6 +-
 drivers/staging/lustre/lustre/osc/osc_lock.c       |  45 +-
 drivers/staging/lustre/lustre/osc/osc_page.c       |  42 +-
 drivers/staging/lustre/lustre/osc/osc_quota.c      |  21 +-
 drivers/staging/lustre/lustre/osc/osc_request.c    | 171 +++--
 drivers/staging/lustre/lustre/ptlrpc/connection.c  |   3 +-
 drivers/staging/lustre/lustre/ptlrpc/events.c      |  51 +-
 drivers/staging/lustre/lustre/ptlrpc/import.c      | 114 ++--
 drivers/staging/lustre/lustre/ptlrpc/layout.c      |  82 ---
 drivers/staging/lustre/lustre/ptlrpc/llog_client.c |   8 +-
 .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c    |  10 +-
 drivers/staging/lustre/lustre/ptlrpc/niobuf.c      |  42 +-
 drivers/staging/lustre/lustre/ptlrpc/nrs.c         |   6 +-
 .../staging/lustre/lustre/ptlrpc/pack_generic.c    |  75 +--
 drivers/staging/lustre/lustre/ptlrpc/pinger.c      |  11 +-
 .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h |   2 -
 drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c     |   9 +-
 drivers/staging/lustre/lustre/ptlrpc/recover.c     |  18 +-
 drivers/staging/lustre/lustre/ptlrpc/sec.c         |  27 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_gc.c      |   6 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_null.c    |   3 +-
 drivers/staging/lustre/lustre/ptlrpc/sec_plain.c   |   6 +-
 drivers/staging/lustre/lustre/ptlrpc/service.c     | 117 ++--
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c    | 272 --------
 131 files changed, 2608 insertions(+), 2723 deletions(-)
 delete mode 100644 drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h

-- 
2.1.0

[toc] | [next] | [standalone]


#1340280 — [PATCH 06/56] staging/lustre: Get rid of quota_cmd_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 06/56] staging/lustre: Get rid of quota_cmd_t typedef
Message-ID<r5cC7-8ka-35@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace it with enum quota_cmd

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 50e70fe..c0b05d4 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2006,11 +2006,11 @@ void lustre_swab_lquota_lvb(struct lquota_lvb *lvb);
 #define lvb_glb_ver  lvb_id_may_rel /* current version of the global index */
 
 /* op codes */
-typedef enum {
+enum quota_cmd {
 	QUOTA_DQACQ	= 601,
 	QUOTA_DQREL	= 602,
 	QUOTA_LAST_OPC
-} quota_cmd_t;
+};
 #define QUOTA_FIRST_OPC	QUOTA_DQACQ
 
 /*
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340281 — [PATCH 19/56] staging/lustre: Get rid of ldlm_error_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 19/56] staging/lustre: Get rid of ldlm_error_t typedef
Message-ID<r5cC7-8ka-37@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace it with enum ldlm_error

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre_dlm.h | 8 ++++----
 drivers/staging/lustre/lustre/ldlm/ldlm_flock.c    | 4 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 4 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c      | 4 ++--
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c     | 6 +++---
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 87806a6..924e68f 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -69,7 +69,7 @@ struct obd_device;
 /**
  * LDLM non-error return states
  */
-typedef enum {
+enum ldlm_error {
 	ELDLM_OK = 0,
 
 	ELDLM_LOCK_CHANGED = 300,
@@ -80,7 +80,7 @@ typedef enum {
 
 	ELDLM_NAMESPACE_EXISTS = 400,
 	ELDLM_BAD_NAMESPACE    = 401
-} ldlm_error_t;
+};
 
 /**
  * LDLM namespace type.
@@ -1019,7 +1019,7 @@ void _ldlm_lock_debug(struct ldlm_lock *lock,
 } while (0)
 
 typedef int (*ldlm_processing_policy)(struct ldlm_lock *lock, __u64 *flags,
-				      int first_enq, ldlm_error_t *err,
+				      int first_enq, enum ldlm_error *err,
 				      struct list_head *work_list);
 
 /**
@@ -1105,7 +1105,7 @@ static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
 	return 0;
 }
 
-int ldlm_error2errno(ldlm_error_t error);
+int ldlm_error2errno(enum ldlm_error error);
 
 #if LUSTRE_TRACKS_LOCK_EXP_REFS
 void ldlm_dump_export_locks(struct obd_export *exp);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index 699e81d..8bd6a18 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -133,7 +133,7 @@ ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
  *     would be collected and ASTs sent.
  */
 static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
-				   int first_enq, ldlm_error_t *err,
+				   int first_enq, enum ldlm_error *err,
 				   struct list_head *work_list)
 {
 	struct ldlm_resource *res = req->l_resource;
@@ -449,7 +449,7 @@ ldlm_flock_completion_ast(struct ldlm_lock *lock, __u64 flags, void *data)
 	struct obd_import	      *imp = NULL;
 	struct ldlm_flock_wait_data     fwd;
 	struct l_wait_info	      lwi;
-	ldlm_error_t		    err;
+	enum ldlm_error		    err;
 	int			     rc = 0;
 
 	CDEBUG(D_DLMTRACE, "flags: 0x%llx data: %p getlk: %p\n",
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
index 6d4f324..ed27822 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
@@ -136,8 +136,8 @@ ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *,
 		 enum ldlm_type type, enum ldlm_mode mode,
 		 const struct ldlm_callback_suite *cbs,
 		 void *data, __u32 lvb_len, enum lvb_type lvb_type);
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
-			       void *cookie, __u64 *flags);
+enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
+				  void *cookie, __u64 *flags);
 void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
 void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode);
 void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 68bf57b..c22370b 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -733,7 +733,7 @@ enum ldlm_mode lck_compat_array[] = {
  * Rather arbitrary mapping from LDLM error codes to errno values. This should
  * not escape to the user level.
  */
-int ldlm_error2errno(ldlm_error_t error)
+int ldlm_error2errno(enum ldlm_error error)
 {
 	int result;
 
@@ -761,7 +761,7 @@ int ldlm_error2errno(ldlm_error_t error)
 		break;
 	default:
 		if (((int)error) < 0)  /* cast to signed type */
-			result = error; /* as ldlm_error_t can be unsigned */
+			result = error; /* as enum ldlm_error can be unsigned */
 		else {
 			CERROR("Invalid DLM result code: %d\n", error);
 			result = -EPROTO;
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 073dcf8..07e83e5 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1512,9 +1512,9 @@ out:
  * Does not block. As a result of enqueue the lock would be put
  * into granted or waiting list.
  */
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
-			       struct ldlm_lock **lockp,
-			       void *cookie, __u64 *flags)
+enum ldlm_error ldlm_lock_enqueue(struct ldlm_namespace *ns,
+				  struct ldlm_lock **lockp,
+				  void *cookie, __u64 *flags)
 {
 	struct ldlm_lock *lock = *lockp;
 	struct ldlm_resource *res = lock->l_resource;
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340282 — [PATCH 18/56] staging/lustre: Get rid of lustre_quota_version typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 18/56] staging/lustre: Get rid of lustre_quota_version typedef
Message-ID<r5cC7-8ka-39@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Does not appear to be used anywhere.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index a4765c2..57d42a3 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -566,9 +566,9 @@ enum {
 /* hdr + MDT index */
 #define LUSTRE_VOLATILE_IDX	LUSTRE_VOLATILE_HDR":%.4X:"
 
-typedef enum lustre_quota_version {
+enum lustre_quota_version {
 	LUSTRE_QUOTA_V2 = 1
-} lustre_quota_version_t;
+};
 
 /* XXX: same as if_dqinfo struct in kernel */
 struct obd_dqinfo {
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340283 — [PATCH 07/56] staging/lustre: Get rid of mds_cmd_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 07/56] staging/lustre: Get rid of mds_cmd_t typedef
Message-ID<r5cC7-8ka-41@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace it with enum mds_cmd

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index c0b05d4..a72fed0 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2018,7 +2018,7 @@ enum quota_cmd {
  */
 
 /* opcodes */
-typedef enum {
+enum mds_cmd {
 	MDS_GETATTR		= 33,
 	MDS_GETATTR_NAME	= 34,
 	MDS_CLOSE		= 35,
@@ -2049,7 +2049,7 @@ typedef enum {
 	MDS_HSM_CT_UNREGISTER	= 60,
 	MDS_SWAP_LAYOUTS	= 61,
 	MDS_LAST_OPC
-} mds_cmd_t;
+};
 
 #define MDS_FIRST_OPC    MDS_GETATTR
 
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340284 — [PATCH 14/56] staging/lustre: Get rid of sec_cmd_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 14/56] staging/lustre: Get rid of sec_cmd_t typedef
Message-ID<r5cC7-8ka-43@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace with enum sec_cmd

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index bb82a87..d68748b 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -3436,13 +3436,13 @@ union lu_page {
 };
 
 /* security opcodes */
-typedef enum {
+enum sec_cmd {
 	SEC_CTX_INIT	    = 801,
 	SEC_CTX_INIT_CONT       = 802,
 	SEC_CTX_FINI	    = 803,
 	SEC_LAST_OPC,
 	SEC_FIRST_OPC	   = SEC_CTX_INIT
-} sec_cmd_t;
+};
 
 /*
  * capa related definitions
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340285 — [PATCH 04/56] stagig/lustre: Get rid of cksum_type_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 04/56] stagig/lustre: Get rid of cksum_type_t typedef
Message-ID<r5cC6-8ka-33@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace it with enum cksum_type

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h |  4 ++--
 drivers/staging/lustre/lustre/include/obd.h               |  2 +-
 drivers/staging/lustre/lustre/include/obd_cksum.h         | 12 ++++++------
 drivers/staging/lustre/lustre/osc/osc_request.c           | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 0e3bac6..0f37b61 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1408,11 +1408,11 @@ void lustre_swab_connect(struct obd_connect_data *ocd);
  * Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new
  * algorithm and also the OBD_FL_CKSUM* flags.
  */
-typedef enum {
+enum cksum_type {
 	OBD_CKSUM_CRC32  = 0x00000001,
 	OBD_CKSUM_ADLER  = 0x00000002,
 	OBD_CKSUM_CRC32C = 0x00000004,
-} cksum_type_t;
+};
 
 /*
  *   OST requests: OBDO & OBD request records
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
index d6e5a17..09f1a5b 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -339,7 +339,7 @@ struct client_obd {
 	/* supported checksum types that are worked out at connect time */
 	__u32		    cl_supp_cksum_types;
 	/* checksum algorithm to be used */
-	cksum_type_t	     cl_cksum_type;
+	enum cksum_type	     cl_cksum_type;
 
 	/* also protected by the poorly named _loi_list_lock lock above */
 	struct osc_async_rc      cl_ar;
diff --git a/drivers/staging/lustre/lustre/include/obd_cksum.h b/drivers/staging/lustre/lustre/include/obd_cksum.h
index 01db604..d61b4db 100644
--- a/drivers/staging/lustre/lustre/include/obd_cksum.h
+++ b/drivers/staging/lustre/lustre/include/obd_cksum.h
@@ -37,7 +37,7 @@
 #include "../../include/linux/libcfs/libcfs.h"
 #include "lustre/lustre_idl.h"
 
-static inline unsigned char cksum_obd2cfs(cksum_type_t cksum_type)
+static inline unsigned char cksum_obd2cfs(enum cksum_type cksum_type)
 {
 	switch (cksum_type) {
 	case OBD_CKSUM_CRC32:
@@ -64,7 +64,7 @@ static inline unsigned char cksum_obd2cfs(cksum_type_t cksum_type)
  * because that is supported by all clients since 1.8
  *
  * In case multiple algorithms are supported the best one is used. */
-static inline u32 cksum_type_pack(cksum_type_t cksum_type)
+static inline u32 cksum_type_pack(enum cksum_type cksum_type)
 {
 	unsigned int    performance = 0, tmp;
 	u32		flag = OBD_FL_CKSUM_ADLER;
@@ -98,7 +98,7 @@ static inline u32 cksum_type_pack(cksum_type_t cksum_type)
 	return flag;
 }
 
-static inline cksum_type_t cksum_type_unpack(u32 o_flags)
+static inline enum cksum_type cksum_type_unpack(u32 o_flags)
 {
 	switch (o_flags & OBD_FL_CKSUM_ALL) {
 	case OBD_FL_CKSUM_CRC32C:
@@ -116,9 +116,9 @@ static inline cksum_type_t cksum_type_unpack(u32 o_flags)
  * 1.8 supported ADLER it is base and not depend on hw
  * Client uses all available local algos
  */
-static inline cksum_type_t cksum_types_supported_client(void)
+static inline enum cksum_type cksum_types_supported_client(void)
 {
-	cksum_type_t ret = OBD_CKSUM_ADLER;
+	enum cksum_type ret = OBD_CKSUM_ADLER;
 
 	CDEBUG(D_INFO, "Crypto hash speed: crc %d, crc32c %d, adler %d\n",
 	       cfs_crypto_hash_speed(cksum_obd2cfs(OBD_CKSUM_CRC32)),
@@ -140,7 +140,7 @@ static inline cksum_type_t cksum_types_supported_client(void)
  * checksum type due to its benchmarking at libcfs module load.
  * Caution is advised, however, since what is fastest on a single client may
  * not be the fastest or most efficient algorithm on the server.  */
-static inline cksum_type_t cksum_type_select(cksum_type_t cksum_types)
+static inline enum cksum_type cksum_type_select(enum cksum_type cksum_types)
 {
 	return cksum_type_unpack(cksum_type_pack(cksum_types));
 }
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 43b11c6..cb9587f 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -1151,7 +1151,7 @@ static inline int can_merge_pages(struct brw_page *p1, struct brw_page *p2)
 
 static u32 osc_checksum_bulk(int nob, u32 pg_count,
 			     struct brw_page **pga, int opc,
-			     cksum_type_t cksum_type)
+			     enum cksum_type cksum_type)
 {
 	__u32 cksum;
 	int i = 0;
@@ -1355,7 +1355,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 		    !sptlrpc_flavor_has_bulk(&req->rq_flvr)) {
 			/* store cl_cksum_type in a local variable since
 			 * it can be changed via lprocfs */
-			cksum_type_t cksum_type = cli->cl_cksum_type;
+			enum cksum_type cksum_type = cli->cl_cksum_type;
 
 			if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0) {
 				oa->o_flags &= OBD_FL_LOCAL_MASK;
@@ -1414,11 +1414,11 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,
 static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer,
 				__u32 client_cksum, __u32 server_cksum, int nob,
 				u32 page_count, struct brw_page **pga,
-				cksum_type_t client_cksum_type)
+				enum cksum_type client_cksum_type)
 {
 	__u32 new_cksum;
 	char *msg;
-	cksum_type_t cksum_type;
+	enum cksum_type cksum_type;
 
 	if (server_cksum == client_cksum) {
 		CDEBUG(D_PAGE, "checksum %x confirmed\n", client_cksum);
@@ -1549,7 +1549,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
 		__u32 server_cksum = body->oa.o_cksum;
 		char *via = "";
 		char *router = "";
-		cksum_type_t cksum_type;
+		enum cksum_type cksum_type;
 
 		cksum_type = cksum_type_unpack(body->oa.o_valid&OBD_MD_FLFLAGS ?
 					       body->oa.o_flags : 0);
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1340286 — [PATCH 12/56] staging/lustre: Get rid of obd_cmd_t typedef

Fromgreen@linuxhacker.ru
Date2016-02-23 05:20 +0100
Subject[PATCH 12/56] staging/lustre: Get rid of obd_cmd_t typedef
Message-ID<r5cC6-8ka-13@gated-at.bofh.it>
In reply to#1340279
From: Oleg Drokin <green@linuxhacker.ru>

Replace with enum obd_cmd

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 19a99c5..27ee853 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2918,13 +2918,13 @@ void lustre_swab_cfg_marker(struct cfg_marker *marker, int swab, int size);
  * Opcodes for multiple servers.
  */
 
-typedef enum {
+enum obd_cmd {
 	OBD_PING = 400,
 	OBD_LOG_CANCEL,
 	OBD_QC_CALLBACK,
 	OBD_IDX_READ,
 	OBD_LAST_OPC
-} obd_cmd_t;
+};
 #define OBD_FIRST_OPC OBD_PING
 
 /* catalog of log objects */
-- 
2.1.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web