Remove unused lustre files
cover Remove unused lustre files
This batch of patches removes some lustre files that are not being built and are overall unneeded in the client only code.
These include EA from disk swabbing code, various network request policies for server-site traffic prioritization, server-side llog code, lustre binary heap implementation.
Please consider for inclusion.
Oleg Drokin (4):
staging/lustre/obdclass: remove unused file md_attrs.c staging/lustre/obdclass: remove unused file llog_lvfs.c staging/lustre/obdclass: remove unused file linkea.c staging/lustre: remove unused request policies.
.../lustre/lustre/include/lustre/lustre_idl.h | 6 - .../staging/lustre/lustre/include/lustre_linkea.h | 57 -- drivers/staging/lustre/lustre/include/lustre_log.h | 3 - drivers/staging/lustre/lustre/include/lustre_net.h | 276 ------- drivers/staging/lustre/lustre/include/md_object.h | 4 - drivers/staging/lustre/lustre/libcfs/heap.c | 475 ------------ drivers/staging/lustre/lustre/obdclass/linkea.c | 194 ----- drivers/staging/lustre/lustre/obdclass/llog_lvfs.c | 847 --------------------- drivers/staging/lustre/lustre/obdclass/md_attrs.c | 199 ----- drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c | 40 - 10 files changed, 2101 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/lustre_linkea.h delete mode 100644 drivers/staging/lustre/lustre/libcfs/heap.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/linkea.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_lvfs.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/md_attrs.c delete mode 100644 drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c
Signature · 1 line
1.9.3
PATCH 1/4 staging/lustre/obdclass: remove unused file md_attrs.c
It's only used by server side luster for on-disk structure swabbing.
And also remove forward declarations for its functions from md_object.h and lustre_idl.h
--- .../lustre/lustre/include/lustre/lustre_idl.h | 6 - drivers/staging/lustre/lustre/include/md_object.h | 4 - drivers/staging/lustre/lustre/obdclass/md_attrs.c | 199 --------------------- 3 files changed, 209 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/obdclass/md_attrs.c
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +0 -6
@@ -321,9 +321,6 @@ enum lma_incompat { };#define LMA_INCOMPAT_SUPP (LMAI_AGENT | LMAI_REMOTE_PARENT) -extern void lustre_lma_swab (struct lustre_mdt_attrs *lma); -extern void lustre_lma_init (struct lustre_mdt_attrs *lma, -const struct lu_fid *fid,__u32 incompat);/** * SOM on-disk attributes stored in a separate xattr. */
@@ -344,8 +341,6 @@ struct som_attrs {/** mds mount id the size is valid for */ __u64 som_mountid; }; -extern void lustre_som_swab (struct som_attrs *attrs); -#define SOM_INCOMPAT_SUPP 0x0/**
@@ -362,7 +357,6 @@ struct hsm_attrs {/** version associated with the last archiving, if any */ __u64 hsm_arch_ver; }; -extern void lustre_hsm_swab (struct hsm_attrs *attrs);/** * fid constants
drivers/staging/lustre/lustre/include/md_object.h +0 -4
@@ -854,10 +854,6 @@ struct lu_local_obj_desc {struct list_head llod_linkage; }; -int lustre_buf2som (void *buf,int rc,struct md_som_data *msd); -int lustre_buf2hsm (void *buf,int rc,struct md_hsm *mh); -void lustre_hsm2buf (void *buf,struct md_hsm *mh); -struct lu_ucred {__u32 uc_valid;__u32 uc_o_uid;
drivers/staging/lustre/lustre/obdclass/md_attrs.c deleted +0 -199
199 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH 2/4 staging/lustre/obdclass: remove unused file llog_lvfs.c
In reply to Oleg DrokinThis contains server-side llog operations.
Also remove declaration of public structure from lustre_log.h
--- drivers/staging/lustre/lustre/include/lustre_log.h | 3 - drivers/staging/lustre/lustre/obdclass/llog_lvfs.c | 847 --------------------- 2 files changed, 850 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_lvfs.c
drivers/staging/lustre/lustre/include/lustre_log.h +0 -3
@@ -315,9 +315,6 @@ struct llog_handle {atomic_t lgh_refcount; }; -/* llog_lvfs.c */ -extern struct llog_operations llog_lvfs_ops; -/* llog_osd.c */ extern struct llog_operations llog_osd_ops; int llog_osd_get_cat_list(const struct lu_env *env, struct dt_device *d,
drivers/staging/lustre/lustre/obdclass/llog_lvfs.c deleted +0 -847
847 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH 3/4 staging/lustre/obdclass: remove unused file linkea.c
In reply to Oleg DrokinAlso unused header file lustre_linkea.h
--- .../staging/lustre/lustre/include/lustre_linkea.h | 57 ------ drivers/staging/lustre/lustre/obdclass/linkea.c | 194 --------------------- 2 files changed, 251 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/lustre_linkea.h delete mode 100644 drivers/staging/lustre/lustre/obdclass/linkea.c
drivers/staging/lustre/lustre/include/lustre_linkea.h deleted +0 -57
@@ -1,57 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, but -* WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -* 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 -*/ -/* -* Copyright (c) 2013, Intel Corporation. -* Use is subject to license terms. -* -* Author: di wang <[email protected]> -*/ - -struct linkea_data { -/** -* Buffer to keep link EA body. -*/ -struct lu_buf *ld_buf; -/** -* The matched header, entry and its length in the EA -*/ -struct link_ea_header *ld_leh; -struct link_ea_entry *ld_lee; -int ld_reclen; -}; - -int linkea_data_new (struct linkea_data *ldata,struct lu_buf *buf); -int linkea_init (struct linkea_data *ldata); -void linkea_entry_unpack (const struct link_ea_entry *lee,int *reclen, -struct lu_name *lname,struct lu_fid *pfid); -int linkea_add_buf (struct linkea_data *ldata,const struct lu_name *lname, -const struct lu_fid *pfid); -void linkea_del_buf (struct linkea_data *ldata,const struct lu_name *lname); -int linkea_links_find (struct linkea_data *ldata,const struct lu_name *lname, -const struct lu_fid *pfid); - -#define LINKEA_NEXT_ENTRY (ldata) \ - (struct link_ea_entry *)((char *)ldata.ld_lee + ldata.ld_reclen) - -#define LINKEA_FIRST_ENTRY (ldata) \ - (struct link_ea_entry *)(ldata.ld_leh + 1)
drivers/staging/lustre/lustre/obdclass/linkea.c deleted +0 -194
194 lines not on this page · raw message
Signature · 1 line
1.9.3
PATCH 4/4 staging/lustre: remove unused request policies.
In reply to Oleg DrokinClient policies do not make much sense to have in client-only code, so remove all references to everything but fifo.
This also removes lustre/libcfs/heap.c and its header, since it was only used by certain request policies (crr and orr).
--- drivers/staging/lustre/lustre/include/lustre_net.h | 276 ------------ drivers/staging/lustre/lustre/libcfs/heap.c | 475 --------------------- drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c | 40 -- 3 files changed, 791 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/libcfs/heap.c delete mode 100644 drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c
drivers/staging/lustre/lustre/include/lustre_net.h +0 -276
@@ -1183,276 +1183,6 @@ struct nrs_fifo_req {/** @} fifo */ /** -* \name CRR-N -* -* CRR-N, Client Round Robin over NIDs -* @{ -*/ - -/** -* private data structure for CRR-N NRS -*/ -struct nrs_crrn_net { -struct ptlrpc_nrs_resource cn_res; -cfs_binheap_t *cn_binheap; -struct cfs_hash *cn_cli_hash; -/** -* Used when a new scheduling round commences, in order to synchronize -* all clients with the new round number. -*/ -__u64 cn_round; -/** -* Determines the relevant ordering amongst request batches within a -* scheduling round. -*/ -__u64 cn_sequence; -/** -* Round Robin quantum; the maximum number of RPCs that each request -* batch for each client can have in a scheduling round. -*/ -__u16 cn_quantum; -}; - -/** -* Object representing a client in CRR-N, as identified by its NID -*/ -struct nrs_crrn_client { -struct ptlrpc_nrs_resource cc_res; -struct hlist_node cc_hnode; -lnet_nid_t cc_nid; -/** -* The round number against which this client is currently scheduling -* requests. -*/ -__u64 cc_round; -/** -* The sequence number used for requests scheduled by this client during -* the current round number. -*/ -__u64 cc_sequence; -atomic_t cc_ref; -/** -* Round Robin quantum; the maximum number of RPCs the client is allowed -* to schedule in a single batch of each round. -*/ -__u16 cc_quantum; -/** -* # of pending requests for this client, on all existing rounds -*/ -__u16 cc_active; -}; - -/** -* CRR-N NRS request definition -*/ -struct nrs_crrn_req { -/** -* Round number for this request; shared with all other requests in the -* same batch. -*/ -__u64 cr_round; -/** -* Sequence number for this request; shared with all other requests in -* the same batch. -*/ -__u64 cr_sequence; -}; - -/** -* CRR-N policy operations. -*/ -enum nrs_ctl_crr { -/** -* Read the RR quantum size of a CRR-N policy. -*/ -NRS_CTL_CRRN_RD_QUANTUM =PTLRPC_NRS_CTL_1ST_POL_SPEC , -/** -* Write the RR quantum size of a CRR-N policy. -*/ -NRS_CTL_CRRN_WR_QUANTUM , -}; - -/** @} CRR-N */ - -/** -* \name ORR/TRR -* -* ORR/TRR (Object-based Round Robin/Target-based Round Robin) NRS policies -* @{ -*/ - -/** -* Lower and upper byte offsets of a brw RPC -*/ -struct nrs_orr_req_range { -__u64 or_start; -__u64 or_end; -}; - -/** -* RPC types supported by the ORR/TRR policies -*/ -enum nrs_orr_supp { -NOS_OST_READ = (1 <<0 ), -NOS_OST_WRITE = (1 <<1 ), -NOS_OST_RW = (NOS_OST_READ |NOS_OST_WRITE ), -/** -* Default value for policies. -*/ -NOS_DFLT =NOS_OST_READ -}; - -/** -* As unique keys for grouping RPCs together, we use the object's OST FID for -* the ORR policy, and the OST index for the TRR policy. -* -* XXX: We waste some space for TRR policy instances by using a union, but it -* allows to consolidate some of the code between ORR and TRR, and these -* policies will probably eventually merge into one anyway. -*/ -struct nrs_orr_key { -union { -/** object FID for ORR */ -struct lu_fid ok_fid; -/** OST index for TRR */ -__u32 ok_idx; - }; -}; - -/** -* The largest base string for unique hash/slab object names is -* "nrs_orr_reg_", so 13 characters. We add 3 to this to be used for the CPT -* id number, so this _should_ be more than enough for the maximum number of -* CPTs on any system. If it does happen that this statement is incorrect, -* nrs_orr_genobjname() will inevitably yield a non-unique name and cause -* kmem_cache_create() to complain (on Linux), so the erroneous situation -* will hopefully not go unnoticed. -*/ -#define NRS_ORR_OBJ_NAME_MAX (sizeof("nrs_orr_reg_") + 3) - -/** -* private data structure for ORR and TRR NRS -*/ -struct nrs_orr_data { -struct ptlrpc_nrs_resource od_res; -cfs_binheap_t *od_binheap; -struct cfs_hash *od_obj_hash; -struct kmem_cache *od_cache; -/** -* Used when a new scheduling round commences, in order to synchronize -* all object or OST batches with the new round number. -*/ -__u64 od_round; -/** -* Determines the relevant ordering amongst request batches within a -* scheduling round. -*/ -__u64 od_sequence; -/** -* RPC types that are currently supported. -*/ -enum nrs_orr_supp od_supp; -/** -* Round Robin quantum; the maximum number of RPCs that each request -* batch for each object or OST can have in a scheduling round. -*/ -__u16 od_quantum; -/** -* Whether to use physical disk offsets or logical file offsets. -*/ -bool od_physical; -/** -* XXX: We need to provide a persistently allocated string to hold -* unique object names for this policy, since in currently supported -* versions of Linux by Lustre, kmem_cache_create() just sets a pointer -* to the name string provided. kstrdup() is used in the version of -* kmeme_cache_create() in current Linux mainline, so we may be able to -* remove this in the future. -*/ -char od_objname[NRS_ORR_OBJ_NAME_MAX ]; -}; - -/** -* Represents a backend-fs object or OST in the ORR and TRR policies -* respectively -*/ -struct nrs_orr_object { -struct ptlrpc_nrs_resource oo_res; -struct hlist_node oo_hnode; -/** -* The round number against which requests are being scheduled for this -* object or OST -*/ -__u64 oo_round; -/** -* The sequence number used for requests scheduled for this object or -* OST during the current round number. -*/ -__u64 oo_sequence; -/** -* The key of the object or OST for which this structure instance is -* scheduling RPCs -*/ -struct nrs_orr_key oo_key; -atomic_t oo_ref; -/** -* Round Robin quantum; the maximum number of RPCs that are allowed to -* be scheduled for the object or OST in a single batch of each round. -*/ -__u16 oo_quantum; -/** -* # of pending requests for this object or OST, on all existing rounds -*/ -__u16 oo_active; -}; - -/** -* ORR/TRR NRS request definition -*/ -struct nrs_orr_req { -/** -* The offset range this request covers -*/ -struct nrs_orr_req_range or_range; -/** -* Round number for this request; shared with all other requests in the -* same batch. -*/ -__u64 or_round; -/** -* Sequence number for this request; shared with all other requests in -* the same batch. -*/ -__u64 or_sequence; -/** -* For debugging purposes. -*/ -struct nrs_orr_key or_key; -/** -* An ORR policy instance has filled in request information while -* enqueueing the request on the service partition's regular NRS head. -*/ -unsigned int or_orr_set:1 ; -/** -* A TRR policy instance has filled in request information while -* enqueueing the request on the service partition's regular NRS head. -*/ -unsigned int or_trr_set:1 ; -/** -* Request offset ranges have been filled in with logical offset -* values. -*/ -unsigned int or_logical_set:1 ; -/** -* Request offset ranges have been filled in with physical offset -* values. -*/ -unsigned int or_physical_set:1 ; -}; - -/** @} ORR/TRR */ - -/** * NRS request * * Instances of this object exist embedded within ptlrpc_request; the main
@@ -1487,12 +1217,6 @@ struct ptlrpc_nrs_request {* Fields for the FIFO policy */ struct nrs_fifo_req fifo; -/** -* CRR-N request definition -*/ -struct nrs_crrn_req crr; -/** ORR and TRR share the same request definition */ -struct nrs_orr_req orr; } nr_u;/** * Externally-registering policies may want to use this to allocate
drivers/staging/lustre/lustre/libcfs/heap.c deleted +0 -475
475 lines not on this page · raw message
drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c deleted +0 -40
@@ -1,40 +0,0 @@ -/* -* GPL HEADER START -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 only, -* as published by the Free Software Foundation. - -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License version 2 for more details. A copy is -* included in the COPYING file that accompanied this code. - -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -* GPL HEADER END -*/ -/* -* Copyright (c) 2011 Intel Corporation -* -* Copyright 2012 Xyratex Technology Limited -*/ -/* -* lustre/ptlrpc/nrs_crr.c -* -* Network Request Scheduler (NRS) CRR-N policy -* -* Request ordering in a batched Round-Robin manner over client NIDs -* -* Author: Liang Zhen <[email protected]> -* Author: Nikitas Angelinas <[email protected]> -*/ -/** -* \addtogoup nrs -* @{ -*/
Signature · 1 line
1.9.3