From: James Simmons <jsimmons@infradead.org>
To: Andreas Dilger <adilger@whamcloud.com>,
Oleg Drokin <green@whamcloud.com>, NeilBrown <neilb@suse.de>
Cc: Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH 16/24] lustre: clio: remove cpl_obj
Date: Sun, 18 Sep 2022 01:22:06 -0400 [thread overview]
Message-ID: <1663478534-19917-17-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1663478534-19917-1-git-send-email-jsimmons@infradead.org>
From: "John L. Hammond" <jhammond@whamcloud.com>
Remove cpl_obj from struct cl_page_slice. This member is only used in
the osc layer and struct osc_page already contains a pointer to the
osc_object.
WC-bug-id: https://jira.whamcloud.com/browse/LU-10994
Lustre-commit: 10da530a2411f28988ab5 ("LU-10994 clio: remove cpl_obj")
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47402
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
fs/lustre/include/cl_object.h | 5 -----
fs/lustre/include/lustre_osc.h | 5 +++++
fs/lustre/obdclass/cl_page.c | 1 -
fs/lustre/osc/osc_cache.c | 7 +++----
fs/lustre/osc/osc_page.c | 8 ++++----
5 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/fs/lustre/include/cl_object.h b/fs/lustre/include/cl_object.h
index c5adbda..41ce0b0 100644
--- a/fs/lustre/include/cl_object.h
+++ b/fs/lustre/include/cl_object.h
@@ -795,11 +795,6 @@ struct cl_page {
*/
struct cl_page_slice {
struct cl_page *cpl_page;
- /**
- * Object slice corresponding to this page slice. Immutable after
- * creation.
- */
- struct cl_object *cpl_obj;
const struct cl_page_operations *cpl_ops;
};
diff --git a/fs/lustre/include/lustre_osc.h b/fs/lustre/include/lustre_osc.h
index 7551390..16d6a8e 100644
--- a/fs/lustre/include/lustre_osc.h
+++ b/fs/lustre/include/lustre_osc.h
@@ -858,6 +858,11 @@ static inline pgoff_t osc_index(struct osc_page *opg)
return opg->ops_oap.oap_obj_off >> PAGE_SHIFT;
}
+static inline struct osc_object *osc_page_object(struct osc_page *ops)
+{
+ return ops->ops_oap.oap_obj;
+}
+
static inline struct cl_page *oap2cl_page(struct osc_async_page *oap)
{
return oap2osc(oap)->ops_cl.cpl_page;
diff --git a/fs/lustre/obdclass/cl_page.c b/fs/lustre/obdclass/cl_page.c
index 7829b90d..7011235 100644
--- a/fs/lustre/obdclass/cl_page.c
+++ b/fs/lustre/obdclass/cl_page.c
@@ -1078,7 +1078,6 @@ void cl_page_slice_add(struct cl_page *cl_page, struct cl_page_slice *slice,
LASSERT(cl_page->cp_layer_count < CP_MAX_LAYER);
LASSERT(offset < (1 << sizeof(cl_page->cp_layer_offset[0]) * 8));
cl_page->cp_layer_offset[cl_page->cp_layer_count++] = offset;
- slice->cpl_obj = obj;
slice->cpl_ops = ops;
slice->cpl_page = cl_page;
}
diff --git a/fs/lustre/osc/osc_cache.c b/fs/lustre/osc/osc_cache.c
index 072cfac..e7b8372 100644
--- a/fs/lustre/osc/osc_cache.c
+++ b/fs/lustre/osc/osc_cache.c
@@ -1328,14 +1328,13 @@ static int osc_refresh_count(const struct lu_env *env,
{
struct osc_page *opg = oap2osc_page(oap);
pgoff_t index = osc_index(oap2osc(oap));
- struct cl_object *obj;
+ struct cl_object *obj = osc2cl(osc_page_object(opg));
struct cl_attr *attr = &osc_env_info(env)->oti_attr;
int result;
loff_t kms;
/* readpage queues with _COUNT_STABLE, shouldn't get here. */
LASSERT(!(cmd & OBD_BRW_READ));
- obj = opg->ops_cl.cpl_obj;
cl_object_attr_lock(obj);
result = cl_object_attr_get(env, obj, attr);
@@ -1378,7 +1377,7 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
/* statistic */
if (rc == 0 && srvlock) {
- struct lu_device *ld = opg->ops_cl.cpl_obj->co_lu.lo_dev;
+ struct lu_device *ld = osc_page_object(opg)->oo_cl.co_lu.lo_dev;
struct osc_stats *stats = &lu2osc_dev(ld)->od_stats;
size_t bytes = oap->oap_count;
@@ -2588,7 +2587,7 @@ int osc_flush_async_page(const struct lu_env *env, struct cl_io *io,
struct osc_page *ops)
{
struct osc_extent *ext = NULL;
- struct osc_object *obj = cl2osc(ops->ops_cl.cpl_obj);
+ struct osc_object *obj = osc_page_object(ops);
struct cl_page *cp = ops->ops_cl.cpl_page;
pgoff_t index = osc_index(ops);
struct osc_async_page *oap = &ops->ops_oap;
diff --git a/fs/lustre/osc/osc_page.c b/fs/lustre/osc/osc_page.c
index fd87698..7470dee 100644
--- a/fs/lustre/osc/osc_page.c
+++ b/fs/lustre/osc/osc_page.c
@@ -86,7 +86,7 @@ static void osc_page_transfer_put(const struct lu_env *env,
static void osc_page_transfer_add(const struct lu_env *env,
struct osc_page *opg, enum cl_req_type crt)
{
- struct osc_object *obj = cl2osc(opg->ops_cl.cpl_obj);
+ struct osc_object *obj = osc_page_object(opg);
osc_lru_use(osc_cli(obj), opg);
}
@@ -129,7 +129,7 @@ static int osc_page_print(const struct lu_env *env,
{
struct osc_page *opg = cl2osc_page(slice);
struct osc_async_page *oap = &opg->ops_oap;
- struct osc_object *obj = cl2osc(slice->cpl_obj);
+ struct osc_object *obj = osc_page_object(opg);
struct client_obd *cli = &osc_export(obj)->exp_obd->u.cli;
return (*printer)(env, cookie, LUSTRE_OSC_NAME
@@ -171,7 +171,7 @@ static void osc_page_delete(const struct lu_env *env,
const struct cl_page_slice *slice)
{
struct osc_page *opg = cl2osc_page(slice);
- struct osc_object *obj = cl2osc(opg->ops_cl.cpl_obj);
+ struct osc_object *obj = osc_page_object(opg);
int rc;
CDEBUG(D_TRACE, "%p\n", opg);
@@ -235,7 +235,7 @@ static void osc_page_touch(const struct lu_env *env,
const struct cl_page_slice *slice, size_t to)
{
struct osc_page *opg = cl2osc_page(slice);
- struct cl_object *obj = opg->ops_cl.cpl_obj;
+ struct cl_object *obj = osc2cl(osc_page_object(opg));
osc_page_touch_at(env, obj, osc_index(opg), to);
}
--
1.8.3.1
_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
next prev parent reply other threads:[~2022-09-18 5:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 5:21 [lustre-devel] [PATCH 00/24] lustre: update to 2.15.52 James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 01/24] lustre: dne: add crush2 hash type James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 02/24] lustre: ptlrpc: change rq_self to struct lnet_nid James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 03/24] lustre: ptlrpc: pass net num to ptlrpc_uuid_to_connection James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 04/24] lustre: ptlrpc: change rq_peer to struct lnet_nid James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 05/24] lustre: ptlrpc: change rq_source " James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 06/24] lustre: ptlrpc: change bd_sender in ptlrpc_bulk_frag_ops James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 07/24] lustre: ptlrpc: pass lnet_nid for self to ptl_send_buf() James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 08/24] lustre: llite: don't use a kms if it invalid James Simmons
2022-09-18 5:21 ` [lustre-devel] [PATCH 09/24] lustre: mdc: check/grab import before access James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 10/24] lustre: llog: handle -EBADR for catalog processing James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 11/24] lnet: Always use ping reply to set route lr_alive James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 12/24] lustre: clio: remove vvp_page_print() James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 13/24] lustre: clio: remove cpo_prep and cpo_make_ready James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 14/24] lustre: clio: remove struct vvp_page James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 15/24] lustre: clio: remove unused convenience functions James Simmons
2022-09-18 5:22 ` James Simmons [this message]
2022-09-18 5:22 ` [lustre-devel] [PATCH 17/24] lustre: osc: remove oap_cli James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 18/24] lustre: osc: Remove submit time James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 19/24] lnet: selftest: revert "LU-16011 lnet: use preallocate bulk for server" James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 20/24] lustre: flr: allow layout version update from client/MDS James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 21/24] lustre: ptlrpc: adds configurable ping interval James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 22/24] lnet: allow direct messages regardless of peer NI status James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 23/24] lnet: Honor peer timeout of zero James Simmons
2022-09-18 5:22 ` [lustre-devel] [PATCH 24/24] lustre: update version to 2.15.52 James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1663478534-19917-17-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=adilger@whamcloud.com \
--cc=green@whamcloud.com \
--cc=lustre-devel@lists.lustre.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).