cp_owner is going away for transient pages, so we need to
remove its usage to find the top level IO. Here that means
passing the IO down through a few layers.
Signed-off-by: Patrick Farrell <patrick.farrell@oracle.com>
Change-Id: I7fac0e53a7831247b846261c1c734c9d6e43a7d2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52075
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
* executed on them.
*/
int (*cio_submit)(const struct lu_env *env,
* executed on them.
*/
int (*cio_submit)(const struct lu_env *env,
const struct cl_io_slice *slice,
enum cl_req_type crt, struct cl_2queue *queue);
/**
const struct cl_io_slice *slice,
enum cl_req_type crt, struct cl_2queue *queue);
/**
void osc_schedule_grant_work(void);
/* osc_io.c */
void osc_schedule_grant_work(void);
/* osc_io.c */
-int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,
- enum cl_req_type crt, struct cl_2queue *queue);
+int osc_io_submit(const struct lu_env *env, struct cl_io *io,
+ const struct cl_io_slice *ios, enum cl_req_type crt,
+ struct cl_2queue *queue);
int osc_io_commit_async(const struct lu_env *env,
const struct cl_io_slice *ios,
struct cl_page_list *qin, int from, int to,
int osc_io_commit_async(const struct lu_env *env,
const struct cl_io_slice *ios,
struct cl_page_list *qin, int from, int to,
* lov_device::ld_mutex mutex.
*/
static int lov_io_submit(const struct lu_env *env,
* lov_device::ld_mutex mutex.
*/
static int lov_io_submit(const struct lu_env *env,
const struct cl_io_slice *ios,
enum cl_req_type crt, struct cl_2queue *queue)
{
const struct cl_io_slice *ios,
enum cl_req_type crt, struct cl_2queue *queue)
{
}
static int lov_empty_io_submit(const struct lu_env *env,
}
static int lov_empty_io_submit(const struct lu_env *env,
const struct cl_io_slice *ios,
enum cl_req_type crt, struct cl_2queue *queue)
{
const struct cl_io_slice *ios,
enum cl_req_type crt, struct cl_2queue *queue)
{
list_for_each_entry(scan, &io->ci_layers, cis_linkage) {
if (scan->cis_iop->cio_submit == NULL)
continue;
list_for_each_entry(scan, &io->ci_layers, cis_linkage) {
if (scan->cis_iop->cio_submit == NULL)
continue;
- result = scan->cis_iop->cio_submit(env, scan, crt, queue);
+ result = scan->cis_iop->cio_submit(env, io, scan, crt, queue);
if (result != 0)
break;
}
if (result != 0)
break;
}
* or, if page is already submitted, changes osc flags through
* osc_set_async_flags().
*/
* or, if page is already submitted, changes osc flags through
* osc_set_async_flags().
*/
-int osc_io_submit(const struct lu_env *env, const struct cl_io_slice *ios,
- enum cl_req_type crt, struct cl_2queue *queue)
+int osc_io_submit(const struct lu_env *env, struct cl_io *io,
+ const struct cl_io_slice *ios, enum cl_req_type crt,
+ struct cl_2queue *queue)
{
struct cl_page *page;
struct cl_page *tmp;
{
struct cl_page *page;
struct cl_page *tmp;
+ struct cl_io *top_io = cl_io_top(io);
struct client_obd *cli = NULL;
struct osc_object *osc = NULL; /* to keep gcc happy */
struct osc_page *opg;
struct client_obd *cli = NULL;
struct osc_object *osc = NULL; /* to keep gcc happy */
struct osc_page *opg;
LIST_HEAD(list);
struct cl_page_list *qin = &queue->c2_qin;
LIST_HEAD(list);
struct cl_page_list *qin = &queue->c2_qin;
cl_page_list_for_each_safe(page, tmp, qin) {
struct osc_async_page *oap;
cl_page_list_for_each_safe(page, tmp, qin) {
struct osc_async_page *oap;
- /* Top level IO. */
- io = page->cp_owner;
- LASSERT(io != NULL);
+ LASSERT(top_io != NULL);
opg = osc_cl_page_osc(page, osc);
oap = &opg->ops_oap;
opg = osc_cl_page_osc(page, osc);
oap = &opg->ops_oap;
- result = cl_page_prep(env, io, page, crt);
+ result = cl_page_prep(env, top_io, page, crt);
if (result != 0) {
LASSERT(result < 0);
if (result != -EALREADY)
if (result != 0) {
LASSERT(result < 0);
if (result != -EALREADY)
- result = osc_queue_sync_pages(env, io, osc, &list,
+ result = osc_queue_sync_pages(env, top_io, osc, &list,
brw_flags);
if (result < 0)
break;
brw_flags);
if (result < 0)
break;
- result = osc_queue_sync_pages(env, io, osc, &list, brw_flags);
+ result = osc_queue_sync_pages(env, top_io, osc, &list,
+ brw_flags);
/* Update c/mtime for sync write. LU-7310 */
if (crt == CRT_WRITE && qout->pl_nr > 0 && result == 0) {
/* Update c/mtime for sync write. LU-7310 */
if (crt == CRT_WRITE && qout->pl_nr > 0 && result == 0) {