Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1234703 > unrolled thread
| Started by | green@linuxhacker.ru |
|---|---|
| First post | 2015-09-29 06:00 +0200 |
| Last post | 2015-09-29 06:00 +0200 |
| Articles | 4 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 00/29] Removal of unused Lustre code green@linuxhacker.ru - 2015-09-29 06:00 +0200
[PATCH 11/29] staging/lustre/ldlm: Remove unused round_timeout function green@linuxhacker.ru - 2015-09-29 06:00 +0200
[PATCH 02/29] staging/lustre: Remove unused lustre_acl_xattr_merge2posix() green@linuxhacker.ru - 2015-09-29 06:00 +0200
[PATCH 05/29] staging/lustre: Remove unused reply state batches code green@linuxhacker.ru - 2015-09-29 06:00 +0200
| From | green@linuxhacker.ru |
|---|---|
| Date | 2015-09-29 06:00 +0200 |
| Subject | [PATCH 00/29] Removal of unused Lustre code |
| Message-ID | <qdU5r-373-3@gated-at.bofh.it> |
From: Oleg Drokin <green@linuxhacker.ru> This set removes a bunch of lustre code that is no lonver relevant, is server specific or is otherwise unused. Please consider. More to come later. Arnd Bergmann (1): staging/lustre: remove lots of dead code Oleg Drokin (28): staging/lustre: Remove unused target_print_req() staging/lustre: Remove unused lustre_acl_xattr_merge2posix() staging/lustre/ptlrpc: Remove server-specific health checks staging/lustre: Remove unused req_capsule_server_grow staging/lustre: Remove unused reply state batches code staging/lustre: Remove high-priority request callbacks staging/lustre: Remove unused statfs_pack() staging/lustre: Remove unused ptlrpcd_add_rqset() staging/lustre: Remove unused functions and definitions from cl_object staging/lustre: Remove unused lu_object functions. staging/lustre/ldlm: Remove unused round_timeout function staging/lustre/obdclass: Remove unused functions from genops.c staging/lustre: Remove unused function class_handle_hash_back() staging/lustre: Remove unused function server_name2svname() staging/lustre/obdclass: Drop unused code from obdo.c staging/lustre/ptlrpc: Drop unused client code staging/lustre/ptlrpc: secure wrapping code cleanup staging/lustre: Drop unused obdo_from_la() and la_from_obdo() staging/lustre/fid: Remove server fid function declarations staging/lustre/fid: seq_client_init/fini don't need to be exported staging/lustre/fid: Remove unused seq_client_get_seq function staging/lustre/fid: Get rid of lcs_srv in lu_client_seq staging/lustre/fid: Remove unused struct lu_server_seq staging/lustre/obdclass: Remove unused nid_hash staging/lustre: Remove server-only recovery-related bits staging/lustre: Remove ccc_attr/conf_set() staging/lustre: Remove unused ccc_io_fini() staging/lustre: Remove ccc_transient_page_* methods drivers/staging/lustre/lustre/fid/fid_request.c | 132 ++------ drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 - drivers/staging/lustre/lustre/include/cl_object.h | 26 -- drivers/staging/lustre/lustre/include/lclient.h | 24 -- .../staging/lustre/lustre/include/lprocfs_status.h | 4 - drivers/staging/lustre/lustre/include/lu_object.h | 27 -- .../lustre/lustre/include/lustre/lustre_idl.h | 8 - .../lustre/lustre/include/lustre/lustre_user.h | 2 - .../staging/lustre/lustre/include/lustre_debug.h | 1 - .../staging/lustre/lustre/include/lustre_disk.h | 2 - .../staging/lustre/lustre/include/lustre_eacl.h | 4 - .../staging/lustre/lustre/include/lustre_export.h | 19 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 91 ------ .../staging/lustre/lustre/include/lustre_handles.h | 1 - .../staging/lustre/lustre/include/lustre_import.h | 1 - drivers/staging/lustre/lustre/include/lustre_lib.h | 1 - drivers/staging/lustre/lustre/include/lustre_net.h | 42 +-- .../staging/lustre/lustre/include/lustre_param.h | 6 - .../lustre/lustre/include/lustre_req_layout.h | 7 - drivers/staging/lustre/lustre/include/lustre_sec.h | 20 -- drivers/staging/lustre/lustre/include/obd.h | 29 -- drivers/staging/lustre/lustre/include/obd_class.h | 28 -- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 70 ---- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 5 - drivers/staging/lustre/lustre/obdclass/acl.c | 119 ------- drivers/staging/lustre/lustre/obdclass/cl_io.c | 65 ---- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 26 -- drivers/staging/lustre/lustre/obdclass/cl_object.c | 41 --- drivers/staging/lustre/lustre/obdclass/debug.c | 10 - drivers/staging/lustre/lustre/obdclass/genops.c | 249 +------------- .../lustre/lustre/obdclass/linux/linux-obdo.c | 137 -------- .../lustre/lustre/obdclass/linux/linux-sysctl.c | 4 - drivers/staging/lustre/lustre/obdclass/lu_object.c | 241 -------------- .../lustre/lustre/obdclass/lustre_handles.c | 13 - .../staging/lustre/lustre/obdclass/obd_config.c | 358 --------------------- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 27 -- drivers/staging/lustre/lustre/obdclass/obdo.c | 170 ---------- .../staging/lustre/lustre/obdclass/statfs_pack.c | 14 - drivers/staging/lustre/lustre/ptlrpc/client.c | 95 ------ drivers/staging/lustre/lustre/ptlrpc/import.c | 11 - drivers/staging/lustre/lustre/ptlrpc/layout.c | 126 -------- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 30 -- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 123 ------- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 197 ------------ drivers/staging/lustre/lustre/ptlrpc/pinger.c | 18 -- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 8 - drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 42 --- drivers/staging/lustre/lustre/ptlrpc/sec.c | 116 ------- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 329 ------------------- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 48 --- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 15 - drivers/staging/lustre/lustre/ptlrpc/service.c | 320 ++---------------- 53 files changed, 62 insertions(+), 3445 deletions(-) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2015-09-29 06:00 +0200 |
| Subject | [PATCH 11/29] staging/lustre/ldlm: Remove unused round_timeout function |
| Message-ID | <qdUf9-3in-19@gated-at.bofh.it> |
| In reply to | #1234703 |
From: Oleg Drokin <green@linuxhacker.ru>
It's not referenced anywhere anymore.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index ac79db9..a78c4a4 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -71,11 +71,6 @@ struct ldlm_cb_async_args {
static struct ldlm_state *ldlm_state;
-inline unsigned long round_timeout(unsigned long timeout)
-{
- return cfs_time_seconds((int)cfs_duration_sec(cfs_time_sub(timeout, 0)) + 1);
-}
-
#define ELT_STOPPED 0
#define ELT_READY 1
#define ELT_TERMINATE 2
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2015-09-29 06:00 +0200 |
| Subject | [PATCH 02/29] staging/lustre: Remove unused lustre_acl_xattr_merge2posix() |
| Message-ID | <qdUf8-3in-17@gated-at.bofh.it> |
| In reply to | #1234703 |
From: Oleg Drokin <green@linuxhacker.ru>
Apparently this is only used only on the metadata server.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
.../staging/lustre/lustre/include/lustre_eacl.h | 4 -
drivers/staging/lustre/lustre/obdclass/acl.c | 119 ---------------------
2 files changed, 123 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre_eacl.h b/drivers/staging/lustre/lustre/include/lustre_eacl.h
index 0f8f76c..499f9c8 100644
--- a/drivers/staging/lustre/lustre/include/lustre_eacl.h
+++ b/drivers/staging/lustre/lustre/include/lustre_eacl.h
@@ -80,10 +80,6 @@ extern void
lustre_posix_acl_xattr_free(posix_acl_xattr_header *header, int size);
extern void
lustre_ext_acl_xattr_free(ext_acl_xattr_header *header);
-extern int
-lustre_acl_xattr_merge2posix(posix_acl_xattr_header *posix_header, int size,
- ext_acl_xattr_header *ext_header,
- posix_acl_xattr_header **out);
extern ext_acl_xattr_header *
lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size,
ext_acl_xattr_header *ext_header);
diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c
index 933456c..1dace14 100644
--- a/drivers/staging/lustre/lustre/obdclass/acl.c
+++ b/drivers/staging/lustre/lustre/obdclass/acl.c
@@ -287,125 +287,6 @@ again:
}
/*
- * Merge the posix ACL and the extended ACL into new posix ACL.
- */
-int lustre_acl_xattr_merge2posix(posix_acl_xattr_header *posix_header, int size,
- ext_acl_xattr_header *ext_header,
- posix_acl_xattr_header **out)
-{
- int posix_count, posix_size, i, j;
- int ext_count = le32_to_cpu(ext_header->a_count), pos = 0, rc = 0;
- posix_acl_xattr_entry pe = {ACL_MASK, 0, ACL_UNDEFINED_ID};
- posix_acl_xattr_header *new;
- ext_acl_xattr_entry *ee, ae;
-
- lustre_posix_acl_cpu_to_le(&pe, &pe);
- ee = lustre_ext_acl_xattr_search(ext_header, &pe, &pos);
- if (ee == NULL || le32_to_cpu(ee->e_stat) == ES_DEL) {
- /* there are only base ACL entries at most. */
- posix_count = 3;
- posix_size = CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr);
- new = kzalloc(posix_size, GFP_NOFS);
- if (unlikely(new == NULL))
- return -ENOMEM;
-
- new->a_version = cpu_to_le32(CFS_ACL_XATTR_VERSION);
- for (i = 0, j = 0; i < ext_count; i++) {
- lustre_ext_acl_le_to_cpu(&ae,
- &ext_header->a_entries[i]);
- switch (ae.e_tag) {
- case ACL_USER_OBJ:
- case ACL_GROUP_OBJ:
- case ACL_OTHER:
- if (ae.e_id != ACL_UNDEFINED_ID) {
- rc = -EIO;
- goto _out;
- }
-
- if (ae.e_stat != ES_DEL) {
- new->a_entries[j].e_tag =
- ext_header->a_entries[i].e_tag;
- new->a_entries[j].e_perm =
- ext_header->a_entries[i].e_perm;
- new->a_entries[j++].e_id =
- ext_header->a_entries[i].e_id;
- }
- break;
- case ACL_MASK:
- case ACL_USER:
- case ACL_GROUP:
- if (ae.e_stat == ES_DEL)
- break;
- default:
- rc = -EIO;
- goto _out;
- }
- }
- } else {
- /* maybe there are valid ACL_USER or ACL_GROUP entries in the
- * original server-side ACL, they are regarded as ES_UNC stat.*/
- int ori_posix_count;
-
- if (unlikely(size < 0))
- return -EINVAL;
- else if (!size)
- ori_posix_count = 0;
- else
- ori_posix_count =
- CFS_ACL_XATTR_COUNT(size, posix_acl_xattr);
- posix_count = ori_posix_count + ext_count;
- posix_size =
- CFS_ACL_XATTR_SIZE(posix_count, posix_acl_xattr);
- new = kzalloc(posix_size, GFP_NOFS);
- if (unlikely(new == NULL))
- return -ENOMEM;
-
- new->a_version = cpu_to_le32(CFS_ACL_XATTR_VERSION);
- /* 1. process the unchanged ACL entries
- * in the original server-side ACL. */
- pos = 0;
- for (i = 0, j = 0; i < ori_posix_count; i++) {
- ee = lustre_ext_acl_xattr_search(ext_header,
- &posix_header->a_entries[i], &pos);
- if (ee == NULL)
- memcpy(&new->a_entries[j++],
- &posix_header->a_entries[i],
- sizeof(posix_acl_xattr_entry));
- }
-
- /* 2. process the non-deleted entries
- * from client-side extended ACL. */
- for (i = 0; i < ext_count; i++) {
- if (le16_to_cpu(ext_header->a_entries[i].e_stat) !=
- ES_DEL) {
- new->a_entries[j].e_tag =
- ext_header->a_entries[i].e_tag;
- new->a_entries[j].e_perm =
- ext_header->a_entries[i].e_perm;
- new->a_entries[j++].e_id =
- ext_header->a_entries[i].e_id;
- }
- }
- }
-
- /* free unused space. */
- rc = lustre_posix_acl_xattr_reduce_space(&new, posix_count, j);
- if (rc >= 0) {
- posix_size = rc;
- *out = new;
- rc = 0;
- }
-
-_out:
- if (rc) {
- kfree(new);
- posix_size = rc;
- }
- return posix_size;
-}
-EXPORT_SYMBOL(lustre_acl_xattr_merge2posix);
-
-/*
* Merge the posix ACL and the extended ACL into new extended ACL.
*/
ext_acl_xattr_header *
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | green@linuxhacker.ru |
|---|---|
| Date | 2015-09-29 06:00 +0200 |
| Subject | [PATCH 05/29] staging/lustre: Remove unused reply state batches code |
| Message-ID | <qdUf9-3in-21@gated-at.bofh.it> |
| In reply to | #1234703 |
From: Oleg Drokin <green@linuxhacker.ru>
rs_batch is used on the server only.
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/include/lustre_net.h | 6 +-
drivers/staging/lustre/lustre/ptlrpc/service.c | 145 ---------------------
2 files changed, 1 insertion(+), 150 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
index a928631..e7faf0e 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -429,8 +429,7 @@ struct ptlrpc_reply_state {
unsigned long rs_on_net:1; /* reply_out_callback pending? */
unsigned long rs_prealloc:1; /* rs from prealloc list */
unsigned long rs_committed:1;/* the transaction was committed
- and the rs was dispatched
- by ptlrpc_commit_replies */
+ * and the rs was dispatched */
/** Size of the state */
int rs_size;
/** opcode */
@@ -2525,9 +2524,6 @@ struct ptlrpc_service_conf {
*
* @{
*/
-void ptlrpc_save_lock(struct ptlrpc_request *req,
- struct lustre_handle *lock, int mode, int no_ack);
-void ptlrpc_commit_replies(struct obd_export *exp);
void ptlrpc_dispatch_difficult_reply(struct ptlrpc_reply_state *rs);
void ptlrpc_schedule_difficult_reply(struct ptlrpc_reply_state *rs);
int ptlrpc_hpreq_handler(struct ptlrpc_request *req);
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index cdc7e62..506fc36 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -179,33 +179,6 @@ ptlrpc_grow_req_bufs(struct ptlrpc_service_part *svcpt, int post)
return rc;
}
-/**
- * Part of Rep-Ack logic.
- * Puts a lock and its mode into reply state associated to request reply.
- */
-void
-ptlrpc_save_lock(struct ptlrpc_request *req,
- struct lustre_handle *lock, int mode, int no_ack)
-{
- struct ptlrpc_reply_state *rs = req->rq_reply_state;
- int idx;
-
- LASSERT(rs != NULL);
- LASSERT(rs->rs_nlocks < RS_MAX_LOCKS);
-
- if (req->rq_export->exp_disconnected) {
- ldlm_lock_decref(lock, mode);
- } else {
- idx = rs->rs_nlocks++;
- rs->rs_locks[idx] = *lock;
- rs->rs_modes[idx] = mode;
- rs->rs_difficult = 1;
- rs->rs_no_ack = !!no_ack;
- }
-}
-EXPORT_SYMBOL(ptlrpc_save_lock);
-
-
struct ptlrpc_hr_partition;
struct ptlrpc_hr_thread {
@@ -246,32 +219,10 @@ struct ptlrpc_hr_service {
struct ptlrpc_hr_partition **hr_partitions;
};
-struct rs_batch {
- struct list_head rsb_replies;
- unsigned int rsb_n_replies;
- struct ptlrpc_service_part *rsb_svcpt;
-};
-
/** reply handling service. */
static struct ptlrpc_hr_service ptlrpc_hr;
/**
- * maximum number of replies scheduled in one batch
- */
-#define MAX_SCHEDULED 256
-
-/**
- * Initialize a reply batch.
- *
- * \param b batch
- */
-static void rs_batch_init(struct rs_batch *b)
-{
- memset(b, 0, sizeof(*b));
- INIT_LIST_HEAD(&b->rsb_replies);
-}
-
-/**
* Choose an hr thread to dispatch requests to.
*/
static struct ptlrpc_hr_thread *
@@ -297,76 +248,6 @@ ptlrpc_hr_select(struct ptlrpc_service_part *svcpt)
}
/**
- * Dispatch all replies accumulated in the batch to one from
- * dedicated reply handling threads.
- *
- * \param b batch
- */
-static void rs_batch_dispatch(struct rs_batch *b)
-{
- if (b->rsb_n_replies != 0) {
- struct ptlrpc_hr_thread *hrt;
-
- hrt = ptlrpc_hr_select(b->rsb_svcpt);
-
- spin_lock(&hrt->hrt_lock);
- list_splice_init(&b->rsb_replies, &hrt->hrt_queue);
- spin_unlock(&hrt->hrt_lock);
-
- wake_up(&hrt->hrt_waitq);
- b->rsb_n_replies = 0;
- }
-}
-
-/**
- * Add a reply to a batch.
- * Add one reply object to a batch, schedule batched replies if overload.
- *
- * \param b batch
- * \param rs reply
- */
-static void rs_batch_add(struct rs_batch *b, struct ptlrpc_reply_state *rs)
-{
- struct ptlrpc_service_part *svcpt = rs->rs_svcpt;
-
- if (svcpt != b->rsb_svcpt || b->rsb_n_replies >= MAX_SCHEDULED) {
- if (b->rsb_svcpt != NULL) {
- rs_batch_dispatch(b);
- spin_unlock(&b->rsb_svcpt->scp_rep_lock);
- }
- spin_lock(&svcpt->scp_rep_lock);
- b->rsb_svcpt = svcpt;
- }
- spin_lock(&rs->rs_lock);
- rs->rs_scheduled_ever = 1;
- if (rs->rs_scheduled == 0) {
- list_move(&rs->rs_list, &b->rsb_replies);
- rs->rs_scheduled = 1;
- b->rsb_n_replies++;
- }
- rs->rs_committed = 1;
- spin_unlock(&rs->rs_lock);
-}
-
-/**
- * Reply batch finalization.
- * Dispatch remaining replies from the batch
- * and release remaining spinlock.
- *
- * \param b batch
- */
-static void rs_batch_fini(struct rs_batch *b)
-{
- if (b->rsb_svcpt != NULL) {
- rs_batch_dispatch(b);
- spin_unlock(&b->rsb_svcpt->scp_rep_lock);
- }
-}
-
-#define DECLARE_RS_BATCH(b) struct rs_batch b
-
-
-/**
* Put reply state into a queue for processing because we received
* ACK from the client
*/
@@ -403,32 +284,6 @@ ptlrpc_schedule_difficult_reply(struct ptlrpc_reply_state *rs)
}
EXPORT_SYMBOL(ptlrpc_schedule_difficult_reply);
-void ptlrpc_commit_replies(struct obd_export *exp)
-{
- struct ptlrpc_reply_state *rs, *nxt;
- DECLARE_RS_BATCH(batch);
-
- rs_batch_init(&batch);
- /* Find any replies that have been committed and get their service
- * to attend to complete them. */
-
- /* CAVEAT EMPTOR: spinlock ordering!!! */
- spin_lock(&exp->exp_uncommitted_replies_lock);
- list_for_each_entry_safe(rs, nxt, &exp->exp_uncommitted_replies,
- rs_obd_list) {
- LASSERT(rs->rs_difficult);
- /* VBR: per-export last_committed */
- LASSERT(rs->rs_export);
- if (rs->rs_transno <= exp->exp_last_committed) {
- list_del_init(&rs->rs_obd_list);
- rs_batch_add(&batch, rs);
- }
- }
- spin_unlock(&exp->exp_uncommitted_replies_lock);
- rs_batch_fini(&batch);
-}
-EXPORT_SYMBOL(ptlrpc_commit_replies);
-
static int
ptlrpc_server_post_idle_rqbds(struct ptlrpc_service_part *svcpt)
{
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web