*/
int cl_page_prep(const struct lu_env *env, struct cl_io *io,
struct cl_page *pg, enum cl_req_type crt);
-void cl_page_completion(const struct lu_env *env, struct cl_page *pg,
- enum cl_req_type crt, int ioret);
+void cl_dio_pages_completion(const struct lu_env *env, struct cl_dio_pages *pg,
+ int count, int ioret);
+void cl_page_completion(const struct lu_env *env,
+ struct cl_page *pg, enum cl_req_type crt, int ioret);
int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg,
enum cl_req_type crt);
-void cl_page_clip(const struct lu_env *env, struct cl_page *pg,
- int from, int to);
+void cl_page_clip(const struct lu_env *env, struct cl_page *pg, int from,
+ int to);
int cl_page_flush(const struct lu_env *env, struct cl_io *io,
struct cl_page *pg);
struct page **cdp_pages;
struct cl_page **cdp_cl_pages;
+ struct cl_sync_io *cdp_sync_io;
struct cl_2queue cdp_queue;
/* the file offset of the first page. */
loff_t cdp_file_offset;
sync_nr = atomic_sub_return(count - 1, &anchor->csi_sync_nr);
else
sync_nr = atomic_read(&anchor->csi_sync_nr);
+
+ CDEBUG(D_VFSTRACE,
+ "Noting completion of %d items, %d items remaining.\n",
+ count, sync_nr - 1);
/*
* Synchronous IO done without releasing page lock (e.g., as a part of
* ->{prepare,commit}_write(). Completion is used to signal the end of
}
EXPORT_SYMBOL(cl_page_prep);
+/* this is the equivalent of cl_page_completion for a dio pages struct, but is
+ * much simpler - in fact, it only needs to note the completion in the sync io
+ */
+void cl_dio_pages_completion(const struct lu_env *env,
+ struct cl_dio_pages *cdp, int count, int ioret)
+{
+ struct cl_sub_dio *sdio = container_of(cdp, struct cl_sub_dio,
+ csd_dio_pages);
+ ENTRY;
+
+ __cl_sync_io_note(env, &sdio->csd_sync, count, ioret);
+
+ EXIT;
+}
+EXPORT_SYMBOL(cl_dio_pages_completion);
+
/**
* Notify layers about transfer completion.
*