Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1342767 > unrolled thread
| Started by | green@linuxhacker.ru |
|---|---|
| First post | 2016-02-25 04:30 +0100 |
| Last post | 2016-02-25 04:30 +0100 |
| Articles | 10 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v2 00/84] Lustre cleanups green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 27/84] staging/lustre: Remove FSF mailing address from GPL notices green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 24/84] staging/lustre: Remove lustre_build_version.h green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 06/84] staging/lustre: Get rid of ost_cmd_t typedef green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 07/84] staging/lustre: Get rid of quota_cmd_t typedef green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 29/84] staging/lustre: Remove *_CONNECT_SUPPORTED defines green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 10/84] staging/lustre: Get rid of ldlm_cmd_t typedef green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 18/84] staging/lustre: Get rid of lustre_quota_version typedef green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 25/84] staging/lustre: Get rid of C99 comments in lustre_idl.h green@linuxhacker.ru - 2016-02-25 04:30 +0100
[PATCH v2 11/84] staging/lustre: Remove ldlm type/mode typedefs green@linuxhacker.ru - 2016-02-25 04:30 +0100
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 00/84] Lustre cleanups |
| Message-ID | <r5Uts-5ZP-3@gated-at.bofh.it> |
From: Oleg Drokin <green@linuxhacker.ru>
Due to unfortunate reordering that broke the build in the middle,
I am resending the previous patchset with some extra added patches.
This contains various Lustre cleanups and coding style fixes,
also hunts out various ifdefs that we don't really need
and remove various unused code and other fixes I seem to
be noticing along the way while looking at all the checkpatch warnings.
Oleg Drokin (84):
staging/lustre/ldlm: Remove unused lr_most_restr from struct
ldlm_resource
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
staging/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 type/mode 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: 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: Remove 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
staging/lustre: Remove stray space before newline in messages
staging/lustre: Remove commented out obd functions
staging/lustre: Remove unused members of struct ll_sb_info
staging/lustre/llite: Fix style vs open parenthesis alignment
staging/lustre/include: Fix style of function declarations
staging/lustre/fld: Fix style vs open parenthesis alignment
staging/lustre: Remove unused liblustre_check_services prototype
staging/lustre: Remove unused lustre_build_lock_params()
staging/lustre: Convert ptlrpc_at_check_timed to void
staging/lustre: Remove misleading liblustre comments.
staging/lustre: Remove liblustre references from explanations
staging/lustre/lmv: Remove commented out MDS selection policies
staging/lustre: F_SETLKW64 F_SETLK64 F_GETLK64 are always defined
staging/lustre: MS_POSIXACL is always defined, don't check for it
staging/lustre: Remove RELEASEPAGE_ARG_TYPE compat macro
staging/lustre: NEED_QUOTA_DEFS is never defined, drop it.
staging/lustre/ptlrpc: Fix style vs open parenthesis alignment
staging/lustre/osc: Fix style vs open parenthesis alignment
staging/lustre/obdclass: Fix style vs open parenthesis alignment
staging/lustre/lov: Fix style vs open parenthesis alignment
staging/lustre/mdc: Fix style vs open parenthesis alignment
staging/lustre/mgc: Fix style vs open parenthesis alignment
staging/lustre/obdecho: Fix style vs open parenthesis alignment
staging/lustre/lmv: Fix style vs open parenthesis alignment
staging/lustre: Fix lines that start with spaces
staging/lustre: Rework MAX_DIO_SIZE macro
staging/lustre: Remove unneeded {} in lprocfs_stats_unlock()
staging/lustre/ptlrpc: Fix ENABLE_PINGER ifdef
.../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 | 23 +-
drivers/staging/lustre/lustre/fld/fld_internal.h | 33 +-
drivers/staging/lustre/lustre/fld/fld_request.c | 26 +-
drivers/staging/lustre/lustre/fld/lproc_fld.c | 3 +-
drivers/staging/lustre/lustre/include/cl_object.h | 483 +++++++-------
drivers/staging/lustre/lustre/include/lclient.h | 3 +-
drivers/staging/lustre/lustre/include/linux/obd.h | 12 +-
.../staging/lustre/lustre/include/lprocfs_status.h | 47 +-
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 | 741 ++++++---------------
.../lustre/lustre/include/lustre/lustre_user.h | 98 ++-
drivers/staging/lustre/lustre/include/lustre_cfg.h | 11 +-
.../staging/lustre/lustre/include/lustre_disk.h | 252 +------
drivers/staging/lustre/lustre/include/lustre_dlm.h | 115 ++--
.../lustre/lustre/include/lustre_dlm_flags.h | 51 +-
.../staging/lustre/lustre/include/lustre_export.h | 73 +-
drivers/staging/lustre/lustre/include/lustre_fid.h | 20 +-
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 +-
.../staging/lustre/lustre/include/lustre_lite.h | 50 +-
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 | 61 +-
.../lustre/lustre/include/lustre_req_layout.h | 13 +-
drivers/staging/lustre/lustre/include/lustre_sec.h | 128 ++--
drivers/staging/lustre/lustre/include/obd.h | 84 ++-
drivers/staging/lustre/lustre/include/obd_cksum.h | 21 +-
drivers/staging/lustre/lustre/include/obd_class.h | 131 ++--
.../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 | 21 +-
drivers/staging/lustre/lustre/llite/dir.c | 37 +-
drivers/staging/lustre/lustre/llite/file.c | 260 +++++---
drivers/staging/lustre/lustre/llite/llite_close.c | 23 +-
.../staging/lustre/lustre/llite/llite_internal.h | 136 ++--
drivers/staging/lustre/lustre/llite/llite_lib.c | 125 ++--
drivers/staging/lustre/lustre/llite/llite_mmap.c | 26 +-
drivers/staging/lustre/lustre/llite/llite_nfs.c | 24 +-
drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 8 +-
drivers/staging/lustre/lustre/llite/lloop.c | 2 +-
drivers/staging/lustre/lustre/llite/lproc_llite.c | 19 +-
drivers/staging/lustre/lustre/llite/namei.c | 49 +-
drivers/staging/lustre/lustre/llite/rw.c | 88 ++-
drivers/staging/lustre/lustre/llite/rw26.c | 65 +-
drivers/staging/lustre/lustre/llite/statahead.c | 64 +-
drivers/staging/lustre/lustre/llite/super25.c | 10 +-
drivers/staging/lustre/lustre/llite/symlink.c | 5 +-
drivers/staging/lustre/lustre/llite/vvp_internal.h | 13 +-
drivers/staging/lustre/lustre/llite/vvp_io.c | 56 +-
drivers/staging/lustre/lustre/llite/vvp_object.c | 3 +-
drivers/staging/lustre/lustre/llite/vvp_page.c | 21 +-
drivers/staging/lustre/lustre/llite/xattr.c | 23 +-
drivers/staging/lustre/lustre/llite/xattr_cache.c | 27 +-
drivers/staging/lustre/lustre/lmv/lmv_fld.c | 3 +-
drivers/staging/lustre/lustre/lmv/lmv_intent.c | 11 +-
drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 +-
drivers/staging/lustre/lustre/lmv/lmv_obd.c | 129 ++--
.../staging/lustre/lustre/lov/lov_cl_internal.h | 87 ++-
drivers/staging/lustre/lustre/lov/lov_ea.c | 5 +-
drivers/staging/lustre/lustre/lov/lov_internal.h | 12 +-
drivers/staging/lustre/lustre/lov/lov_io.c | 2 +-
drivers/staging/lustre/lustre/lov/lov_lock.c | 39 +-
drivers/staging/lustre/lustre/lov/lov_obd.c | 121 ++--
drivers/staging/lustre/lustre/lov/lov_object.c | 64 +-
drivers/staging/lustre/lustre/lov/lov_offset.c | 15 +-
drivers/staging/lustre/lustre/lov/lov_pack.c | 21 +-
drivers/staging/lustre/lustre/lov/lov_page.c | 3 +-
drivers/staging/lustre/lustre/lov/lov_pool.c | 20 +-
drivers/staging/lustre/lustre/lov/lov_request.c | 18 +-
drivers/staging/lustre/lustre/lov/lovsub_lock.c | 8 +-
drivers/staging/lustre/lustre/lov/lovsub_page.c | 2 +-
drivers/staging/lustre/lustre/lov/lproc_lov.c | 16 +-
drivers/staging/lustre/lustre/mdc/mdc_internal.h | 16 +-
drivers/staging/lustre/lustre/mdc/mdc_lib.c | 3 +-
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 129 ++--
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 16 +-
drivers/staging/lustre/lustre/mdc/mdc_request.c | 39 +-
drivers/staging/lustre/lustre/mgc/mgc_request.c | 99 +--
drivers/staging/lustre/lustre/obdclass/cl_io.c | 78 ++-
drivers/staging/lustre/lustre/obdclass/cl_lock.c | 47 +-
drivers/staging/lustre/lustre/obdclass/cl_object.c | 11 +-
drivers/staging/lustre/lustre/obdclass/cl_page.c | 10 +-
drivers/staging/lustre/lustre/obdclass/class_obd.c | 19 +-
drivers/staging/lustre/lustre/obdclass/genops.c | 68 +-
.../lustre/lustre/obdclass/linux/linux-module.c | 4 +-
.../lustre/lustre/obdclass/linux/linux-sysctl.c | 8 +-
drivers/staging/lustre/lustre/obdclass/llog.c | 6 +-
drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 +-
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 | 127 ++--
drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +-
.../lustre/lustre/obdclass/lustre_handles.c | 3 +-
.../staging/lustre/lustre/obdclass/lustre_peer.c | 5 +-
.../staging/lustre/lustre/obdclass/obd_config.c | 50 +-
drivers/staging/lustre/lustre/obdclass/obd_mount.c | 75 ++-
drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +-
.../staging/lustre/lustre/obdecho/echo_client.c | 31 +-
.../staging/lustre/lustre/obdecho/echo_internal.h | 5 -
drivers/staging/lustre/lustre/osc/lproc_osc.c | 24 +-
drivers/staging/lustre/lustre/osc/osc_cache.c | 186 ++++--
.../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 | 11 +-
drivers/staging/lustre/lustre/osc/osc_lock.c | 75 ++-
drivers/staging/lustre/lustre/osc/osc_page.c | 79 ++-
drivers/staging/lustre/lustre/osc/osc_quota.c | 21 +-
drivers/staging/lustre/lustre/osc/osc_request.c | 192 ++++--
drivers/staging/lustre/lustre/ptlrpc/client.c | 40 +-
drivers/staging/lustre/lustre/ptlrpc/connection.c | 3 +-
drivers/staging/lustre/lustre/ptlrpc/events.c | 51 +-
drivers/staging/lustre/lustre/ptlrpc/import.c | 163 ++---
drivers/staging/lustre/lustre/ptlrpc/layout.c | 117 +---
drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 8 +-
.../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 25 +-
drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 46 +-
drivers/staging/lustre/lustre/ptlrpc/nrs.c | 25 +-
drivers/staging/lustre/lustre/ptlrpc/nrs_fifo.c | 2 +-
.../staging/lustre/lustre/ptlrpc/pack_generic.c | 79 +--
drivers/staging/lustre/lustre/ptlrpc/pinger.c | 16 +-
.../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 -
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 18 +-
drivers/staging/lustre/lustre/ptlrpc/recover.c | 24 +-
drivers/staging/lustre/lustre/ptlrpc/sec.c | 33 +-
drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +-
drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 10 +-
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 | 200 +++---
drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 272 --------
150 files changed, 3534 insertions(+), 3967 deletions(-)
delete mode 100644 drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h
--
2.1.0
[toc] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 27/84] staging/lustre: Remove FSF mailing address from GPL notices |
| Message-ID | <r5UMP-6eo-23@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru> This patch removes remaining several places that still had that extra paragraph included in Lustre code. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> --- drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h | 5 ----- drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h | 5 ----- drivers/staging/lustre/lnet/lnet/lib-ptl.c | 5 ----- drivers/staging/lustre/lustre/obdecho/echo_internal.h | 5 ----- drivers/staging/lustre/lustre/osc/osc_quota.c | 5 ----- 5 files changed, 25 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 1530b04..9e62c59 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -13,11 +13,6 @@ * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index 520209f..c04979a 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -13,11 +13,6 @@ * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-ptl.c b/drivers/staging/lustre/lnet/lnet/lib-ptl.c index 5a9ab87..0281c6a 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-ptl.c +++ b/drivers/staging/lustre/lnet/lnet/lib-ptl.c @@ -13,11 +13,6 @@ * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdecho/echo_internal.h b/drivers/staging/lustre/lustre/obdecho/echo_internal.h index 69063fa..f5034a2 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_internal.h +++ b/drivers/staging/lustre/lustre/obdecho/echo_internal.h @@ -13,11 +13,6 @@ * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c b/drivers/staging/lustre/lustre/osc/osc_quota.c index d6731c5..508fcf2 100644 --- a/drivers/staging/lustre/lustre/osc/osc_quota.c +++ b/drivers/staging/lustre/lustre/osc/osc_quota.c @@ -13,11 +13,6 @@ * General Public License version 2 for more details (a copy is included * in the LICENSE file that accompanied this code). * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * * GPL HEADER END */ /* -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 24/84] staging/lustre: Remove lustre_build_version.h |
| Message-ID | <r5UMP-6eo-27@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru>
of the two macroses is contained the LUSTRE_RELEASE was unused and
BUILD_VERSION is too generically named and was replaced with
LUSTRE_VERSION_STRING with all the users (provided by lustre_ver.h)
With in-kernel client the build version should be combined with
kernel build information anyway.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
.../lustre/lustre/include/lustre/lustre_build_version.h | 2 --
drivers/staging/lustre/lustre/obdclass/class_obd.c | 11 +++++------
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 1 -
3 files changed, 5 insertions(+), 9 deletions(-)
delete mode 100644 drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h b/drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h
deleted file mode 100644
index 93a3d7d..0000000
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_build_version.h
+++ /dev/null
@@ -1,2 +0,0 @@
-#define BUILD_VERSION "v2_3_64_0-g6e62c21-CHANGED-3.9.0"
-#define LUSTRE_RELEASE 3.9.0_g6e62c21
diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c
index 4b7e21f..f805693 100644
--- a/drivers/staging/lustre/lustre/obdclass/class_obd.c
+++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c
@@ -42,7 +42,6 @@
#include "../../include/linux/lnet/lnetctl.h"
#include "../include/lustre_debug.h"
#include "../include/lprocfs_status.h"
-#include "../include/lustre/lustre_build_version.h"
#include <linux/list.h>
#include "../include/cl_object.h"
#include "llog_internal.h"
@@ -218,14 +217,14 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
goto out;
}
- if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
+ if (strlen(LUSTRE_VERSION_STRING) + 1 > data->ioc_inllen1) {
CERROR("ioctl buffer too small to hold version\n");
err = -EINVAL;
goto out;
}
- memcpy(data->ioc_bulk, BUILD_VERSION,
- strlen(BUILD_VERSION) + 1);
+ memcpy(data->ioc_bulk, LUSTRE_VERSION_STRING,
+ strlen(LUSTRE_VERSION_STRING) + 1);
err = obd_ioctl_popdata((void __user *)arg, data, len);
if (err)
@@ -481,7 +480,7 @@ static int __init init_obdclass(void)
int lustre_register_fs(void);
- LCONSOLE_INFO("Lustre: Build Version: "BUILD_VERSION"\n");
+ LCONSOLE_INFO("Lustre: Build Version: " LUSTRE_VERSION_STRING "\n");
spin_lock_init(&obd_types_lock);
obd_zombie_impexp_init();
@@ -579,7 +578,7 @@ static void cleanup_obdclass(void)
}
MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
-MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION);
+MODULE_DESCRIPTION("Lustre Class Driver Build Version: " LUSTRE_VERSION_STRING);
MODULE_LICENSE("GPL");
MODULE_VERSION(LUSTRE_VERSION_STRING);
diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
index 689f33a..f3c4a17 100644
--- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
+++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c
@@ -70,7 +70,6 @@
#include "../../include/obd_class.h"
#include "../../include/lprocfs_status.h"
#include "../../include/lustre_ver.h"
-#include "../../include/lustre/lustre_build_version.h"
/* buffer MUST be at least the size of obd_ioctl_hdr */
int obd_ioctl_getdata(char **buf, int *len, void __user *arg)
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 06/84] staging/lustre: Get rid of ost_cmd_t typedef |
| Message-ID | <r5UMP-6eo-25@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru>
Replace it with enum ost_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 0f37b61..50e70fe 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1419,7 +1419,7 @@ enum cksum_type {
*/
/* opcodes */
-typedef enum {
+enum ost_cmd {
OST_REPLY = 0, /* reply ? */
OST_GETATTR = 1,
OST_SETATTR = 2,
@@ -1440,7 +1440,7 @@ typedef enum {
OST_QUOTACTL = 19,
OST_QUOTA_ADJUST_QUNIT = 20, /* not used since 2.4 */
OST_LAST_OPC
-} ost_cmd_t;
+};
#define OST_FIRST_OPC OST_REPLY
enum obdo_flags {
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 07/84] staging/lustre: Get rid of quota_cmd_t typedef |
| Message-ID | <r5UMP-6eo-31@gated-at.bofh.it> |
| In reply to | #1342767 |
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]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 29/84] staging/lustre: Remove *_CONNECT_SUPPORTED defines |
| Message-ID | <r5UMP-6eo-29@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru> These defines are only used on the servers to determine what connect flags corresponding servers support: MDT_CONNECT_SUPPORTED OST_CONNECT_SUPPORTED MGS_CONNECT_SUPPORTED ECHO_CONNECT_SUPPORTED Signed-off-by: Oleg Drokin <green@linuxhacker.ru> --- .../lustre/lustre/include/lustre/lustre_idl.h | 50 ++-------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index eeb0542..26f1c43 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -1248,61 +1248,19 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); * submit a small patch against EVERY branch that ONLY adds the new flag, * updates obd_connect_names[] for lprocfs_rd_connect_flags(), adds the * flag to check_obd_connect_data(), and updates wiretests accordingly, so it - * can be approved and landed easily to reserve the flag for future use. */ + * can be approved and landed easily to reserve the flag for future use. + */ /* The MNE_SWAB flag is overloading the MDS_MDS bit only for the MGS * connection. It is a temporary bug fix for Imperative Recovery interop * between 2.2 and 2.3 x86/ppc nodes, and can be removed when interop for - * 2.2 clients/servers is no longer needed. LU-1252/LU-1644. */ + * 2.2 clients/servers is no longer needed. LU-1252/LU-1644. + */ #define OBD_CONNECT_MNE_SWAB OBD_CONNECT_MDS_MDS #define OCD_HAS_FLAG(ocd, flg) \ (!!((ocd)->ocd_connect_flags & OBD_CONNECT_##flg)) -#define LRU_RESIZE_CONNECT_FLAG OBD_CONNECT_LRU_RESIZE - -#define MDT_CONNECT_SUPPORTED (OBD_CONNECT_RDONLY | OBD_CONNECT_VERSION | \ - OBD_CONNECT_ACL | OBD_CONNECT_XATTR | \ - OBD_CONNECT_IBITS | \ - OBD_CONNECT_NODEVOH | OBD_CONNECT_ATTRFID | \ - OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \ - OBD_CONNECT_RMT_CLIENT | \ - OBD_CONNECT_RMT_CLIENT_FORCE | \ - OBD_CONNECT_BRW_SIZE | OBD_CONNECT_MDS_CAPA | \ - OBD_CONNECT_OSS_CAPA | OBD_CONNECT_MDS_MDS | \ - OBD_CONNECT_FID | LRU_RESIZE_CONNECT_FLAG | \ - OBD_CONNECT_VBR | OBD_CONNECT_LOV_V3 | \ - OBD_CONNECT_SOM | OBD_CONNECT_FULL20 | \ - OBD_CONNECT_64BITHASH | OBD_CONNECT_JOBSTATS | \ - OBD_CONNECT_EINPROGRESS | \ - OBD_CONNECT_LIGHTWEIGHT | OBD_CONNECT_UMASK | \ - OBD_CONNECT_LVB_TYPE | OBD_CONNECT_LAYOUTLOCK |\ - OBD_CONNECT_PINGLESS | OBD_CONNECT_MAX_EASIZE |\ - OBD_CONNECT_FLOCK_DEAD | \ - OBD_CONNECT_DISP_STRIPE) - -#define OST_CONNECT_SUPPORTED (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \ - OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \ - OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \ - OBD_CONNECT_BRW_SIZE | OBD_CONNECT_OSS_CAPA | \ - OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \ - LRU_RESIZE_CONNECT_FLAG | OBD_CONNECT_CKSUM | \ - OBD_CONNECT_RMT_CLIENT | \ - OBD_CONNECT_RMT_CLIENT_FORCE | OBD_CONNECT_VBR | \ - OBD_CONNECT_MDS | OBD_CONNECT_SKIP_ORPHAN | \ - OBD_CONNECT_GRANT_SHRINK | OBD_CONNECT_FULL20 | \ - OBD_CONNECT_64BITHASH | OBD_CONNECT_MAXBYTES | \ - OBD_CONNECT_MAX_EASIZE | \ - OBD_CONNECT_EINPROGRESS | \ - OBD_CONNECT_JOBSTATS | \ - OBD_CONNECT_LIGHTWEIGHT | OBD_CONNECT_LVB_TYPE|\ - OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_FID | \ - OBD_CONNECT_PINGLESS) -#define ECHO_CONNECT_SUPPORTED (0) -#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_AT | \ - OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV | \ - OBD_CONNECT_MNE_SWAB | OBD_CONNECT_PINGLESS) - /* Features required for this version of the client to work with server */ #define CLIENT_CONNECT_MDT_REQD (OBD_CONNECT_IBITS | OBD_CONNECT_FID | \ OBD_CONNECT_FULL20) -- 2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 10/84] staging/lustre: Get rid of ldlm_cmd_t typedef |
| Message-ID | <r5UMP-6eo-33@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru>
Replace it with enum ldlm_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 bd8b622..938f91b 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2659,7 +2659,7 @@ void lustre_swab_lov_desc(struct lov_desc *ld);
* LDLM requests:
*/
/* opcodes -- MUST be distinct from OST/MDS opcodes */
-typedef enum {
+enum ldlm_cmd {
LDLM_ENQUEUE = 101,
LDLM_CONVERT = 102,
LDLM_CANCEL = 103,
@@ -2668,7 +2668,7 @@ typedef enum {
LDLM_GL_CALLBACK = 106,
LDLM_SET_INFO = 107,
LDLM_LAST_OPC
-} ldlm_cmd_t;
+};
#define LDLM_FIRST_OPC LDLM_ENQUEUE
#define RES_NAME_SIZE 4
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 18/84] staging/lustre: Get rid of lustre_quota_version typedef |
| Message-ID | <r5UMP-6eo-37@gated-at.bofh.it> |
| In reply to | #1342767 |
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]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 25/84] staging/lustre: Get rid of C99 comments in lustre_idl.h |
| Message-ID | <r5UMP-6eo-35@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru>
lustre_idl.h contains various protocol data. In order to avoid
reusal of values that might have meant something else in the past,
the old no longer used values are commented out, convert the
comments into regular comments from C99 where appropriate.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 4188402..90ff181 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -113,25 +113,25 @@
#define CONNMGR_REQUEST_PORTAL 1
#define CONNMGR_REPLY_PORTAL 2
-//#define OSC_REQUEST_PORTAL 3
+/*#define OSC_REQUEST_PORTAL 3 */
#define OSC_REPLY_PORTAL 4
-//#define OSC_BULK_PORTAL 5
+/*#define OSC_BULK_PORTAL 5 */
#define OST_IO_PORTAL 6
#define OST_CREATE_PORTAL 7
#define OST_BULK_PORTAL 8
-//#define MDC_REQUEST_PORTAL 9
+/*#define MDC_REQUEST_PORTAL 9 */
#define MDC_REPLY_PORTAL 10
-//#define MDC_BULK_PORTAL 11
+/*#define MDC_BULK_PORTAL 11 */
#define MDS_REQUEST_PORTAL 12
-//#define MDS_REPLY_PORTAL 13
+/*#define MDS_REPLY_PORTAL 13 */
#define MDS_BULK_PORTAL 14
#define LDLM_CB_REQUEST_PORTAL 15
#define LDLM_CB_REPLY_PORTAL 16
#define LDLM_CANCEL_REQUEST_PORTAL 17
#define LDLM_CANCEL_REPLY_PORTAL 18
-//#define PTLBD_REQUEST_PORTAL 19
-//#define PTLBD_REPLY_PORTAL 20
-//#define PTLBD_BULK_PORTAL 21
+/*#define PTLBD_REQUEST_PORTAL 19 */
+/*#define PTLBD_REPLY_PORTAL 20 */
+/*#define PTLBD_BULK_PORTAL 21 */
#define MDS_SETATTR_PORTAL 22
#define MDS_READPAGE_PORTAL 23
#define OUT_PORTAL 24
@@ -1187,7 +1187,7 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
#define MSG_CONNECT_RECOVERING 0x00000001
#define MSG_CONNECT_RECONNECT 0x00000002
#define MSG_CONNECT_REPLAYABLE 0x00000004
-//#define MSG_CONNECT_PEER 0x8
+/*#define MSG_CONNECT_PEER 0x8 */
#define MSG_CONNECT_LIBCLIENT 0x00000010
#define MSG_CONNECT_INITIAL 0x00000020
#define MSG_CONNECT_ASYNC 0x00000040
@@ -2066,7 +2066,7 @@ enum mdt_reint_cmd {
REINT_OPEN = 6,
REINT_SETXATTR = 7,
REINT_RMENTRY = 8,
-// REINT_WRITE = 9,
+/* REINT_WRITE = 9, */
REINT_MAX
};
--
2.1.0
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-02-25 04:30 +0100 |
| Subject | [PATCH v2 11/84] staging/lustre: Remove ldlm type/mode typedefs |
| Message-ID | <r5UMQ-6eo-39@gated-at.bofh.it> |
| In reply to | #1342767 |
From: Oleg Drokin <green@linuxhacker.ru>
Replace ldlm_mode_t with enum ldlm_mode,
ldlm_type_t with enum ldlm_type
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 14 ++++----
drivers/staging/lustre/lustre/include/lustre_dlm.h | 39 ++++++++++++----------
drivers/staging/lustre/lustre/include/lustre_net.h | 2 +-
drivers/staging/lustre/lustre/include/obd.h | 10 +++---
drivers/staging/lustre/lustre/include/obd_class.h | 14 ++++----
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 2 +-
drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 +--
drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +-
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 2 +-
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 28 ++++++++--------
drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 7 ++--
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 3 +-
drivers/staging/lustre/lustre/llite/dir.c | 2 +-
drivers/staging/lustre/lustre/llite/file.c | 19 ++++++-----
.../staging/lustre/lustre/llite/llite_internal.h | 8 ++---
drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +-
drivers/staging/lustre/lustre/llite/xattr_cache.c | 2 +-
drivers/staging/lustre/lustre/lmv/lmv_obd.c | 17 ++++++----
drivers/staging/lustre/lustre/mdc/mdc_internal.h | 12 +++----
drivers/staging/lustre/lustre/mdc/mdc_locks.c | 14 ++++----
drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +-
.../staging/lustre/lustre/osc/osc_cl_internal.h | 4 +--
drivers/staging/lustre/lustre/osc/osc_request.c | 8 ++---
23 files changed, 114 insertions(+), 103 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 938f91b..d3fb6f9 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -2687,7 +2687,7 @@ static inline int ldlm_res_eq(const struct ldlm_res_id *res0,
}
/* lock types */
-typedef enum {
+enum ldlm_mode {
LCK_MINMODE = 0,
LCK_EX = 1,
LCK_PW = 2,
@@ -2698,17 +2698,17 @@ typedef enum {
LCK_GROUP = 64,
LCK_COS = 128,
LCK_MAXMODE
-} ldlm_mode_t;
+};
#define LCK_MODE_NUM 8
-typedef enum {
+enum ldlm_type {
LDLM_PLAIN = 10,
LDLM_EXTENT = 11,
LDLM_FLOCK = 12,
LDLM_IBITS = 13,
LDLM_MAX_TYPE
-} ldlm_type_t;
+};
#define LDLM_MIN_TYPE LDLM_PLAIN
@@ -2768,15 +2768,15 @@ struct ldlm_intent {
void lustre_swab_ldlm_intent(struct ldlm_intent *i);
struct ldlm_resource_desc {
- ldlm_type_t lr_type;
+ enum ldlm_type lr_type;
__u32 lr_padding; /* also fix lustre_swab_ldlm_resource_desc */
struct ldlm_res_id lr_name;
};
struct ldlm_lock_desc {
struct ldlm_resource_desc l_resource;
- ldlm_mode_t l_req_mode;
- ldlm_mode_t l_granted_mode;
+ enum ldlm_mode l_req_mode;
+ enum ldlm_mode l_granted_mode;
ldlm_wire_policy_data_t l_policy_data;
};
diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h
index 4aeaac9..87806a6 100644
--- a/drivers/staging/lustre/lustre/include/lustre_dlm.h
+++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h
@@ -145,14 +145,15 @@ typedef enum {
#define LCK_COMPAT_COS (LCK_COS)
/** @} Lock Compatibility Matrix */
-extern ldlm_mode_t lck_compat_array[];
+extern enum ldlm_mode lck_compat_array[];
-static inline void lockmode_verify(ldlm_mode_t mode)
+static inline void lockmode_verify(enum ldlm_mode mode)
{
LASSERT(mode > LCK_MINMODE && mode < LCK_MAXMODE);
}
-static inline int lockmode_compat(ldlm_mode_t exist_mode, ldlm_mode_t new_mode)
+static inline int lockmode_compat(enum ldlm_mode exist_mode,
+ enum ldlm_mode new_mode)
{
return (lck_compat_array[exist_mode] & new_mode);
}
@@ -524,7 +525,7 @@ struct ldlm_interval {
struct ldlm_interval_tree {
/** Tree size. */
int lit_size;
- ldlm_mode_t lit_mode; /* lock mode */
+ enum ldlm_mode lit_mode; /* lock mode */
struct interval_node *lit_root; /* actual ldlm_interval */
};
@@ -556,7 +557,7 @@ typedef union {
struct ldlm_inodebits l_inodebits;
} ldlm_policy_data_t;
-void ldlm_convert_policy_to_local(struct obd_export *exp, ldlm_type_t type,
+void ldlm_convert_policy_to_local(struct obd_export *exp, enum ldlm_type type,
const ldlm_wire_policy_data_t *wpolicy,
ldlm_policy_data_t *lpolicy);
@@ -634,11 +635,11 @@ struct ldlm_lock {
* Requested mode.
* Protected by lr_lock.
*/
- ldlm_mode_t l_req_mode;
+ enum ldlm_mode l_req_mode;
/**
* Granted mode, also protected by lr_lock.
*/
- ldlm_mode_t l_granted_mode;
+ enum ldlm_mode l_granted_mode;
/** Lock completion handler pointer. Called when lock is granted. */
ldlm_completion_callback l_completion_ast;
/**
@@ -848,7 +849,7 @@ struct ldlm_resource {
/** @} */
/** Type of locks this resource can hold. Only one type per resource. */
- ldlm_type_t lr_type; /* LDLM_{PLAIN,EXTENT,FLOCK,IBITS} */
+ enum ldlm_type lr_type; /* LDLM_{PLAIN,EXTENT,FLOCK,IBITS} */
/** Resource name */
struct ldlm_res_id lr_name;
@@ -1161,12 +1162,13 @@ void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode);
void ldlm_lock_fail_match_locked(struct ldlm_lock *lock);
void ldlm_lock_allow_match(struct ldlm_lock *lock);
void ldlm_lock_allow_match_locked(struct ldlm_lock *lock);
-ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
- const struct ldlm_res_id *, ldlm_type_t type,
- ldlm_policy_data_t *, ldlm_mode_t mode,
- struct lustre_handle *, int unref);
-ldlm_mode_t ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
- __u64 *bits);
+enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
+ const struct ldlm_res_id *,
+ enum ldlm_type type, ldlm_policy_data_t *,
+ enum ldlm_mode mode, struct lustre_handle *,
+ int unref);
+enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
+ __u64 *bits);
void ldlm_lock_cancel(struct ldlm_lock *lock);
void ldlm_lock_dump_handle(int level, struct lustre_handle *);
void ldlm_unlink_lock_skiplist(struct ldlm_lock *req);
@@ -1186,7 +1188,7 @@ void ldlm_debugfs_cleanup(void);
struct ldlm_resource *ldlm_resource_get(struct ldlm_namespace *ns,
struct ldlm_resource *parent,
const struct ldlm_res_id *,
- ldlm_type_t type, int create);
+ enum ldlm_type type, int create);
int ldlm_resource_putref(struct ldlm_resource *res);
void ldlm_resource_add_lock(struct ldlm_resource *res,
struct list_head *head,
@@ -1237,7 +1239,8 @@ int ldlm_prep_elc_req(struct obd_export *exp,
struct list_head *cancels, int count);
int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
- ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode,
+ enum ldlm_type type, __u8 with_policy,
+ enum ldlm_mode mode,
__u64 *flags, void *lvb, __u32 lvb_len,
struct lustre_handle *lockh, int rc);
int ldlm_cli_update_pool(struct ptlrpc_request *req);
@@ -1248,13 +1251,13 @@ int ldlm_cli_cancel_unused(struct ldlm_namespace *, const struct ldlm_res_id *,
int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
const struct ldlm_res_id *res_id,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode,
+ enum ldlm_mode mode,
ldlm_cancel_flags_t flags,
void *opaque);
int ldlm_cancel_resource_local(struct ldlm_resource *res,
struct list_head *cancels,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode, __u64 lock_flags,
+ enum ldlm_mode mode, __u64 lock_flags,
ldlm_cancel_flags_t cancel_flags, void *opaque);
int ldlm_cli_cancel_list_local(struct list_head *cancels, int count,
ldlm_cancel_flags_t flags);
diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
index c4a0b00..2105a95 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -463,7 +463,7 @@ struct ptlrpc_reply_state {
/** Handles of locks awaiting client reply ACK */
struct lustre_handle rs_locks[RS_MAX_LOCKS];
/** Lock modes of locks in \a rs_locks */
- ldlm_mode_t rs_modes[RS_MAX_LOCKS];
+ enum ldlm_mode rs_modes[RS_MAX_LOCKS];
};
struct ptlrpc_thread;
diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h
index 09f1a5b..802d867 100644
--- a/drivers/staging/lustre/lustre/include/obd.h
+++ b/drivers/staging/lustre/lustre/include/obd.h
@@ -1160,13 +1160,13 @@ struct md_ops {
struct obd_client_handle *);
int (*set_lock_data)(struct obd_export *, __u64 *, void *, __u64 *);
- ldlm_mode_t (*lock_match)(struct obd_export *, __u64,
- const struct lu_fid *, ldlm_type_t,
- ldlm_policy_data_t *, ldlm_mode_t,
- struct lustre_handle *);
+ enum ldlm_mode (*lock_match)(struct obd_export *, __u64,
+ const struct lu_fid *, enum ldlm_type,
+ ldlm_policy_data_t *, enum ldlm_mode,
+ struct lustre_handle *);
int (*cancel_unused)(struct obd_export *, const struct lu_fid *,
- ldlm_policy_data_t *, ldlm_mode_t,
+ ldlm_policy_data_t *, enum ldlm_mode,
ldlm_cancel_flags_t flags, void *opaque);
int (*get_remote_perm)(struct obd_export *, const struct lu_fid *,
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
index a4d3600..c161a66 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -1656,7 +1656,7 @@ static inline int md_set_lock_data(struct obd_export *exp,
static inline int md_cancel_unused(struct obd_export *exp,
const struct lu_fid *fid,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode,
+ enum ldlm_mode mode,
ldlm_cancel_flags_t flags,
void *opaque)
{
@@ -1670,12 +1670,12 @@ static inline int md_cancel_unused(struct obd_export *exp,
return rc;
}
-static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
- const struct lu_fid *fid,
- ldlm_type_t type,
- ldlm_policy_data_t *policy,
- ldlm_mode_t mode,
- struct lustre_handle *lockh)
+static inline enum ldlm_mode md_lock_match(struct obd_export *exp, __u64 flags,
+ const struct lu_fid *fid,
+ enum ldlm_type type,
+ ldlm_policy_data_t *policy,
+ enum ldlm_mode mode,
+ struct lustre_handle *lockh)
{
EXP_CHECK_MD_OP(exp, lock_match);
EXP_MD_COUNTER_INCREMENT(exp, lock_match);
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
index aa92682..f07a077 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
@@ -144,7 +144,7 @@ struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l)
return list_empty(&n->li_group) ? n : NULL;
}
-static inline int lock_mode_to_index(ldlm_mode_t mode)
+static inline int lock_mode_to_index(enum ldlm_mode mode)
{
int index;
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
index 7c671e3..699e81d 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c
@@ -92,7 +92,7 @@ ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new)
}
static inline void
-ldlm_flock_destroy(struct ldlm_lock *lock, ldlm_mode_t mode, __u64 flags)
+ldlm_flock_destroy(struct ldlm_lock *lock, enum ldlm_mode mode, __u64 flags)
{
LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%llx)",
mode, flags);
@@ -143,7 +143,7 @@ static int ldlm_process_flock_lock(struct ldlm_lock *req, __u64 *flags,
struct ldlm_lock *lock = NULL;
struct ldlm_lock *new = req;
struct ldlm_lock *new2 = NULL;
- ldlm_mode_t mode = req->l_req_mode;
+ enum ldlm_mode mode = req->l_req_mode;
int added = (mode == LCK_NL);
int overlaps = 0;
int splitted = 0;
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
index 849cc98..6d4f324 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h
@@ -133,7 +133,7 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
enum req_location loc, void *data, int size);
struct ldlm_lock *
ldlm_lock_create(struct ldlm_namespace *ns, const struct ldlm_res_id *,
- ldlm_type_t type, ldlm_mode_t,
+ 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 **,
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 0e25c45..68bf57b 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -718,7 +718,7 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
}
EXPORT_SYMBOL(target_send_reply);
-ldlm_mode_t lck_compat_array[] = {
+enum ldlm_mode lck_compat_array[] = {
[LCK_EX] = LCK_COMPAT_EX,
[LCK_PW] = LCK_COMPAT_PW,
[LCK_PR] = LCK_COMPAT_PR,
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index 8f75139..073dcf8 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -91,7 +91,7 @@ static ldlm_policy_local_to_wire_t ldlm_policy_local_to_wire[] = {
/**
* Converts lock policy from local format to on the wire lock_desc format
*/
-static void ldlm_convert_policy_to_wire(ldlm_type_t type,
+static void ldlm_convert_policy_to_wire(enum ldlm_type type,
const ldlm_policy_data_t *lpolicy,
ldlm_wire_policy_data_t *wpolicy)
{
@@ -105,7 +105,7 @@ static void ldlm_convert_policy_to_wire(ldlm_type_t type,
/**
* Converts lock policy from on the wire lock_desc format to local format
*/
-void ldlm_convert_policy_to_local(struct obd_export *exp, ldlm_type_t type,
+void ldlm_convert_policy_to_local(struct obd_export *exp, enum ldlm_type type,
const ldlm_wire_policy_data_t *wpolicy,
ldlm_policy_data_t *lpolicy)
{
@@ -1046,7 +1046,7 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
* comment above ldlm_lock_match
*/
static struct ldlm_lock *search_queue(struct list_head *queue,
- ldlm_mode_t *mode,
+ enum ldlm_mode *mode,
ldlm_policy_data_t *policy,
struct ldlm_lock *old_lock,
__u64 flags, int unref)
@@ -1055,7 +1055,7 @@ static struct ldlm_lock *search_queue(struct list_head *queue,
struct list_head *tmp;
list_for_each(tmp, queue) {
- ldlm_mode_t match;
+ enum ldlm_mode match;
lock = list_entry(tmp, struct ldlm_lock, l_res_link);
@@ -1188,10 +1188,12 @@ EXPORT_SYMBOL(ldlm_lock_allow_match);
* keep caller code unchanged), the context failure will be discovered by
* caller sometime later.
*/
-ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
- const struct ldlm_res_id *res_id, ldlm_type_t type,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
- struct lustre_handle *lockh, int unref)
+enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
+ const struct ldlm_res_id *res_id,
+ enum ldlm_type type,
+ ldlm_policy_data_t *policy,
+ enum ldlm_mode mode,
+ struct lustre_handle *lockh, int unref)
{
struct ldlm_resource *res;
struct ldlm_lock *lock, *old_lock = NULL;
@@ -1313,11 +1315,11 @@ ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags,
}
EXPORT_SYMBOL(ldlm_lock_match);
-ldlm_mode_t ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
- __u64 *bits)
+enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh,
+ __u64 *bits)
{
struct ldlm_lock *lock;
- ldlm_mode_t mode = 0;
+ enum ldlm_mode mode = 0;
lock = ldlm_handle2lock(lockh);
if (lock) {
@@ -1449,8 +1451,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
*/
struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
const struct ldlm_res_id *res_id,
- ldlm_type_t type,
- ldlm_mode_t mode,
+ enum ldlm_type type,
+ enum ldlm_mode mode,
const struct ldlm_callback_suite *cbs,
void *data, __u32 lvb_len,
enum lvb_type lvb_type)
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index de276af..05aa8bb 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -331,7 +331,8 @@ static void failed_lock_cleanup(struct ldlm_namespace *ns,
* Called after receiving reply from server.
*/
int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
- ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode,
+ enum ldlm_type type, __u8 with_policy,
+ enum ldlm_mode mode,
__u64 *flags, void *lvb, __u32 lvb_len,
struct lustre_handle *lockh, int rc)
{
@@ -1465,7 +1466,7 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
int ldlm_cancel_resource_local(struct ldlm_resource *res,
struct list_head *cancels,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode, __u64 lock_flags,
+ enum ldlm_mode mode, __u64 lock_flags,
ldlm_cancel_flags_t cancel_flags, void *opaque)
{
struct ldlm_lock *lock;
@@ -1578,7 +1579,7 @@ EXPORT_SYMBOL(ldlm_cli_cancel_list);
int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
const struct ldlm_res_id *res_id,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode,
+ enum ldlm_mode mode,
ldlm_cancel_flags_t flags,
void *opaque)
{
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index fede185..f9d0383 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -1065,7 +1065,8 @@ static struct ldlm_resource *ldlm_resource_new(void)
*/
struct ldlm_resource *
ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent,
- const struct ldlm_res_id *name, ldlm_type_t type, int create)
+ const struct ldlm_res_id *name, enum ldlm_type type,
+ int create)
{
struct hlist_node *hnode;
struct ldlm_resource *res;
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index d7dc264..c2ee7fc 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -332,7 +332,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
struct lustre_handle lockh;
struct lu_dirpage *dp;
struct page *page;
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
int rc;
__u64 start = 0;
__u64 end = 0;
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index c4f3edc..bbe6ebf 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -2780,11 +2780,12 @@ ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock)
* \param l_req_mode [IN] searched lock mode
* \retval boolean, true iff all bits are found
*/
-int ll_have_md_lock(struct inode *inode, __u64 *bits, ldlm_mode_t l_req_mode)
+int ll_have_md_lock(struct inode *inode, __u64 *bits,
+ enum ldlm_mode l_req_mode)
{
struct lustre_handle lockh;
ldlm_policy_data_t policy;
- ldlm_mode_t mode = (l_req_mode == LCK_MINMODE) ?
+ enum ldlm_mode mode = (l_req_mode == LCK_MINMODE) ?
(LCK_CR|LCK_CW|LCK_PR|LCK_PW) : l_req_mode;
struct lu_fid *fid;
__u64 flags;
@@ -2820,13 +2821,13 @@ int ll_have_md_lock(struct inode *inode, __u64 *bits, ldlm_mode_t l_req_mode)
return *bits == 0;
}
-ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits,
- struct lustre_handle *lockh, __u64 flags,
- ldlm_mode_t mode)
+enum ldlm_mode ll_take_md_lock(struct inode *inode, __u64 bits,
+ struct lustre_handle *lockh, __u64 flags,
+ enum ldlm_mode mode)
{
ldlm_policy_data_t policy = { .l_inodebits = {bits} };
struct lu_fid *fid;
- ldlm_mode_t rc;
+ enum ldlm_mode rc;
fid = &ll_i2info(inode)->lli_fid;
CDEBUG(D_INFO, "trying to match res "DFID"\n", PFID(fid));
@@ -3356,8 +3357,8 @@ out:
* Apply the layout to the inode. Layout lock is held and will be released
* in this function.
*/
-static int ll_layout_lock_set(struct lustre_handle *lockh, ldlm_mode_t mode,
- struct inode *inode, __u32 *gen, bool reconf)
+static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
+ struct inode *inode, __u32 *gen, bool reconf)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
@@ -3479,7 +3480,7 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
struct md_op_data *op_data;
struct lookup_intent it;
struct lustre_handle lockh;
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
struct ldlm_enqueue_info einfo = {
.ei_type = LDLM_IBITS,
.ei_mode = LCK_CR,
diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h
index 7dbe86a..46144ff 100644
--- a/drivers/staging/lustre/lustre/llite/llite_internal.h
+++ b/drivers/staging/lustre/lustre/llite/llite_internal.h
@@ -705,10 +705,10 @@ extern struct file_operations ll_file_operations_flock;
extern struct file_operations ll_file_operations_noflock;
extern const struct inode_operations ll_file_inode_operations;
int ll_have_md_lock(struct inode *inode, __u64 *bits,
- ldlm_mode_t l_req_mode);
-ldlm_mode_t ll_take_md_lock(struct inode *inode, __u64 bits,
- struct lustre_handle *lockh, __u64 flags,
- ldlm_mode_t mode);
+ enum ldlm_mode l_req_mode);
+enum ldlm_mode ll_take_md_lock(struct inode *inode, __u64 bits,
+ struct lustre_handle *lockh, __u64 flags,
+ enum ldlm_mode mode);
int ll_file_open(struct inode *inode, struct file *file);
int ll_file_release(struct inode *inode, struct file *file);
int ll_glimpse_ioctl(struct ll_sb_info *sbi,
diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c
index 2440b07..67b4b80 100644
--- a/drivers/staging/lustre/lustre/llite/llite_lib.c
+++ b/drivers/staging/lustre/lustre/llite/llite_lib.c
@@ -1598,7 +1598,7 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md)
if (exp_connect_som(ll_i2mdexp(inode)) &&
S_ISREG(inode->i_mode)) {
struct lustre_handle lockh;
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
/* As it is possible a blocking ast has been processed
* by this time, we need to check there is an UPDATE
diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c
index ed6e073..fe8df91 100644
--- a/drivers/staging/lustre/lustre/llite/xattr_cache.c
+++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c
@@ -266,7 +266,7 @@ static int ll_xattr_find_get_lock(struct inode *inode,
struct lookup_intent *oit,
struct ptlrpc_request **req)
{
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
struct lustre_handle lockh = { 0 };
struct md_op_data *op_data;
struct ll_inode_info *lli = ll_i2info(inode);
diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
index 2df369a..a405bc7 100644
--- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c
+++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c
@@ -1846,7 +1846,8 @@ lmv_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
NULL)
static int lmv_early_cancel(struct obd_export *exp, struct md_op_data *op_data,
- int op_tgt, ldlm_mode_t mode, int bits, int flag)
+ int op_tgt, enum ldlm_mode mode, int bits,
+ int flag)
{
struct lu_fid *fid = md_op_data_fid(op_data, flag);
struct obd_device *obd = exp->exp_obd;
@@ -2489,7 +2490,7 @@ static int lmv_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
}
static int lmv_cancel_unused(struct obd_export *exp, const struct lu_fid *fid,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
+ ldlm_policy_data_t *policy, enum ldlm_mode mode,
ldlm_cancel_flags_t flags, void *opaque)
{
struct obd_device *obd = exp->exp_obd;
@@ -2523,14 +2524,16 @@ static int lmv_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
return rc;
}
-static ldlm_mode_t lmv_lock_match(struct obd_export *exp, __u64 flags,
- const struct lu_fid *fid, ldlm_type_t type,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
- struct lustre_handle *lockh)
+static enum ldlm_mode lmv_lock_match(struct obd_export *exp, __u64 flags,
+ const struct lu_fid *fid,
+ enum ldlm_type type,
+ ldlm_policy_data_t *policy,
+ enum ldlm_mode mode,
+ struct lustre_handle *lockh)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
- ldlm_mode_t rc;
+ enum ldlm_mode rc;
int i;
CDEBUG(D_INODE, "Lock match for "DFID"\n", PFID(fid));
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
index 3d2997a..095f3b5 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h
+++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h
@@ -90,7 +90,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
struct ptlrpc_request **req, __u64 extra_lock_flags);
int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,
- struct list_head *cancels, ldlm_mode_t mode,
+ struct list_head *cancels, enum ldlm_mode mode,
__u64 bits);
/* mdc/mdc_request.c */
int mdc_fid_alloc(struct obd_export *exp, struct lu_fid *fid,
@@ -119,7 +119,7 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data,
int mdc_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request);
int mdc_cancel_unused(struct obd_export *exp, const struct lu_fid *fid,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
+ ldlm_policy_data_t *policy, enum ldlm_mode mode,
ldlm_cancel_flags_t flags, void *opaque);
int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
@@ -129,10 +129,10 @@ int mdc_intent_getattr_async(struct obd_export *exp,
struct md_enqueue_info *minfo,
struct ldlm_enqueue_info *einfo);
-ldlm_mode_t mdc_lock_match(struct obd_export *exp, __u64 flags,
- const struct lu_fid *fid, ldlm_type_t type,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
- struct lustre_handle *lockh);
+enum ldlm_mode mdc_lock_match(struct obd_export *exp, __u64 flags,
+ const struct lu_fid *fid, enum ldlm_type type,
+ ldlm_policy_data_t *policy, enum ldlm_mode mode,
+ struct lustre_handle *lockh);
static inline int mdc_prep_elc_req(struct obd_export *exp,
struct ptlrpc_request *req, int opc,
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 09dd2b3..f785eb6 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
@@ -151,13 +151,13 @@ int mdc_set_lock_data(struct obd_export *exp, __u64 *lockh, void *data,
return 0;
}
-ldlm_mode_t mdc_lock_match(struct obd_export *exp, __u64 flags,
- const struct lu_fid *fid, ldlm_type_t type,
- ldlm_policy_data_t *policy, ldlm_mode_t mode,
- struct lustre_handle *lockh)
+enum ldlm_mode mdc_lock_match(struct obd_export *exp, __u64 flags,
+ const struct lu_fid *fid, enum ldlm_type type,
+ ldlm_policy_data_t *policy, enum ldlm_mode mode,
+ struct lustre_handle *lockh)
{
struct ldlm_res_id res_id;
- ldlm_mode_t rc;
+ enum ldlm_mode rc;
fid_build_reg_res_name(fid, &res_id);
/* LU-4405: Clear bits not supported by server */
@@ -170,7 +170,7 @@ ldlm_mode_t mdc_lock_match(struct obd_export *exp, __u64 flags,
int mdc_cancel_unused(struct obd_export *exp,
const struct lu_fid *fid,
ldlm_policy_data_t *policy,
- ldlm_mode_t mode,
+ enum ldlm_mode mode,
ldlm_cancel_flags_t flags,
void *opaque)
{
@@ -1036,7 +1036,7 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
struct ldlm_res_id res_id;
struct lustre_handle lockh;
ldlm_policy_data_t policy;
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
if (it->d.lustre.it_lock_handle) {
lockh.cookie = it->d.lustre.it_lock_handle;
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
index ddeb4b4..dd87914 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c
@@ -67,7 +67,7 @@ static int mdc_reint(struct ptlrpc_request *request,
* found by @fid. Found locks are added into @cancel list. Returns the amount of
* locks added to @cancels list. */
int mdc_resource_get_unused(struct obd_export *exp, const struct lu_fid *fid,
- struct list_head *cancels, ldlm_mode_t mode,
+ struct list_head *cancels, enum ldlm_mode mode,
__u64 bits)
{
struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
index 73d43ab..861642b 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
+++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h
@@ -522,7 +522,7 @@ static inline struct cl_object *osc2cl(const struct osc_object *obj)
return (struct cl_object *)&obj->oo_cl;
}
-static inline ldlm_mode_t osc_cl_lock2ldlm(enum cl_lock_mode mode)
+static inline enum ldlm_mode osc_cl_lock2ldlm(enum cl_lock_mode mode)
{
LASSERT(mode == CLM_READ || mode == CLM_WRITE || mode == CLM_GROUP);
if (mode == CLM_READ)
@@ -533,7 +533,7 @@ static inline ldlm_mode_t osc_cl_lock2ldlm(enum cl_lock_mode mode)
return LCK_GROUP;
}
-static inline enum cl_lock_mode osc_ldlm2cl_lock(ldlm_mode_t mode)
+static inline enum cl_lock_mode osc_ldlm2cl_lock(enum ldlm_mode mode)
{
LASSERT(mode == LCK_PR || mode == LCK_PW || mode == LCK_GROUP);
if (mode == LCK_PR)
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index cb9587f..c98e951 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -631,7 +631,7 @@ int osc_sync_base(struct obd_export *exp, struct obd_info *oinfo,
* locks added to @cancels list. */
static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
struct list_head *cancels,
- ldlm_mode_t mode, __u64 lock_flags)
+ enum ldlm_mode mode, __u64 lock_flags)
{
struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
struct ldlm_res_id res_id;
@@ -2195,7 +2195,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
struct ptlrpc_request *req = NULL;
int intent = *flags & LDLM_FL_HAS_INTENT;
__u64 match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
- ldlm_mode_t mode;
+ enum ldlm_mode mode;
int rc;
/* Filesystem lock extents are extended to page boundaries so that
@@ -2338,7 +2338,7 @@ int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
{
struct obd_device *obd = exp->exp_obd;
__u64 lflags = *flags;
- ldlm_mode_t rc;
+ enum ldlm_mode rc;
if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
return -EIO;
@@ -2733,7 +2733,7 @@ out:
struct ldlm_res_id res_id;
ldlm_policy_data_t policy;
struct lustre_handle lockh;
- ldlm_mode_t mode = 0;
+ enum ldlm_mode mode = 0;
struct ptlrpc_request *req;
struct ll_user_fiemap *reply;
char *tmp;
--
2.1.0
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web