Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1535313
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 14/22] staging: lustre: obd: add callback for llog_cat_process_or_fork |
| Date | 2016-12-03 02:20 +0100 |
| Message-ID | <sK79D-2WV-1@gated-at.bofh.it> (permalink) |
| References | <sK6Qi-2BA-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Alexander Boyko <alexander.boyko@seagate.com>
Currently llog_process_or_fork() is hard coded to
always pass the function pointer llog_cat_process_cb().
Change llog_cat_process_or_fork() to pass in any
function pointer which will allow us more options
for llog_cat callback routines in the future.
Signed-off-by: Alexander Boyko <alexander.boyko@seagate.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7156
Seagate-bug-id: MRP-2383
Reviewed-on: http://review.whamcloud.com/16416
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lustre/obdclass/llog_cat.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
index ce8e2f6..de9d01d 100644
--- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c
+++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c
@@ -188,7 +188,8 @@ static int llog_cat_process_cb(const struct lu_env *env,
static int llog_cat_process_or_fork(const struct lu_env *env,
struct llog_handle *cat_llh,
- llog_cb_t cb, void *data, int startcat,
+ llog_cb_t cat_cb, llog_cb_t cb,
+ void *data, int startcat,
int startidx, bool fork)
{
struct llog_process_data d;
@@ -209,18 +210,15 @@ static int llog_cat_process_or_fork(const struct lu_env *env,
cd.lpcd_first_idx = llh->llh_cat_idx;
cd.lpcd_last_idx = 0;
- rc = llog_process_or_fork(env, cat_llh, llog_cat_process_cb,
- &d, &cd, fork);
+ rc = llog_process_or_fork(env, cat_llh, cat_cb, &d, &cd, fork);
if (rc != 0)
return rc;
cd.lpcd_first_idx = 0;
cd.lpcd_last_idx = cat_llh->lgh_last_idx;
- rc = llog_process_or_fork(env, cat_llh, llog_cat_process_cb,
- &d, &cd, fork);
+ rc = llog_process_or_fork(env, cat_llh, cat_cb, &d, &cd, fork);
} else {
- rc = llog_process_or_fork(env, cat_llh, llog_cat_process_cb,
- &d, NULL, fork);
+ rc = llog_process_or_fork(env, cat_llh, cat_cb, &d, NULL, fork);
}
return rc;
@@ -229,7 +227,7 @@ static int llog_cat_process_or_fork(const struct lu_env *env,
int llog_cat_process(const struct lu_env *env, struct llog_handle *cat_llh,
llog_cb_t cb, void *data, int startcat, int startidx)
{
- return llog_cat_process_or_fork(env, cat_llh, cb, data, startcat,
- startidx, false);
+ return llog_cat_process_or_fork(env, cat_llh, llog_cat_process_cb, cb,
+ data, startcat, startidx, false);
}
EXPORT_SYMBOL(llog_cat_process);
--
1.7.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/22] Next batch of missing work for upstream client James Simmons <jsimmons@infradead.org> - 2016-12-03 02:00 +0100
[PATCH 06/22] staging: lustre: llog: reset llog bitmap James Simmons <jsimmons@infradead.org> - 2016-12-03 02:00 +0100
[PATCH 13/22] staging: lustre: statahead: set sai_index_wait with lli_sa_lock held James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 19/22] staging: lustre: llite: ll_dir_ioctl cleanup of redundant comparisons James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 17/22] staging: lustre: clio: remove mtime check in vvp_io_fault_start() James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 12/22] staging: lustre: libcfs: report hnode value for cfs_hash_putref James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 15/22] staging: lustre: rpc: increase bulk size James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 18/22] staging: lustre: import: don't reconnect during connect interpret James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 16/22] staging: lustre: llite: Invoke file_update_time in page_mkwrite James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 09/22] staging: lustre: llite: Add client mount opt to ignore suppress_pings James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 22/22] staging: lustre: libcfs: remove lnet upcall code James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 21/22] staging: lustre: remove set but unused variables James Simmons <jsimmons@infradead.org> - 2016-12-03 02:10 +0100
[PATCH 14/22] staging: lustre: obd: add callback for llog_cat_process_or_fork James Simmons <jsimmons@infradead.org> - 2016-12-03 02:20 +0100
Re: [PATCH 14/22] staging: lustre: obd: add callback for llog_cat_process_or_fork Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-12-06 11:10 +0100
[PATCH 07/22] staging: lustre: obdclass: lu_site_purge() to handle purge-all James Simmons <jsimmons@infradead.org> - 2016-12-03 02:20 +0100
[PATCH 20/22] staging: lustre: osc: set lock data for readahead lock James Simmons <jsimmons@infradead.org> - 2016-12-03 02:30 +0100
Re: [PATCH 00/22] Next batch of missing work for upstream client Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-12-06 11:20 +0100
csiph-web