@@ -73,7 +73,7 @@ static void cachefiles_read_complete(struct kiocb *iocb, long ret)
static int cachefiles_read(struct netfs_cache_resources *cres,
loff_t start_pos,
struct iov_iter *iter,
- enum netfs_read_from_hole read_hole,
+ enum fscache_read_from_hole read_hole,
fscache_io_terminated_t term_func,
void *term_func_priv)
{
@@ -98,7 +98,7 @@ static int cachefiles_read(struct netfs_cache_resources *cres,
/* If the caller asked us to seek for data before doing the read, then
* we should do that now. If we find a gap, we fill it with zeros.
*/
- if (read_hole != NETFS_READ_HOLE_IGNORE) {
+ if (read_hole != FSCACHE_READ_HOLE_IGNORE) {
loff_t off = start_pos, off2;
off2 = cachefiles_inject_read_error();
@@ -116,7 +116,7 @@ static int cachefiles_read(struct netfs_cache_resources *cres,
* return success.
*/
ret = -ENODATA;
- if (read_hole == NETFS_READ_HOLE_FAIL)
+ if (read_hole == FSCACHE_READ_HOLE_FAIL)
goto presubmission_error;
iov_iter_zero(len, iter);
@@ -156,7 +156,7 @@ static int fscache_fallback_read_page(struct inode *inode, struct page *page)
if (ret < 0)
return ret;
- ret = fscache_read(&cres, page_offset(page), &iter, NETFS_READ_HOLE_FAIL,
+ ret = fscache_read(&cres, page_offset(page), &iter, FSCACHE_READ_HOLE_FAIL,
NULL, NULL);
fscache_end_operation(&cres);
return ret;
@@ -195,7 +195,7 @@ static int erofs_fscache_read_folios_async(struct fscache_cookie *cookie,
start + done, subreq->len);
ret = fscache_read(cres, subreq->start, &iter,
- NETFS_READ_HOLE_FAIL,
+ FSCACHE_READ_HOLE_FAIL,
erofc_fscache_subreq_complete, subreq);
if (ret == -EIOCBQUEUED)
ret = 0;
@@ -43,7 +43,7 @@ static void netfs_cache_read_terminated(void *priv, ssize_t transferred_or_error
*/
static void netfs_read_from_cache(struct netfs_io_request *rreq,
struct netfs_io_subrequest *subreq,
- enum netfs_read_from_hole read_hole)
+ enum fscache_read_from_hole read_hole)
{
struct netfs_cache_resources *cres = &rreq->cache_resources;
struct iov_iter iter;
@@ -251,7 +251,7 @@ static void netfs_rreq_short_read(struct netfs_io_request *rreq,
netfs_get_subrequest(subreq, netfs_sreq_trace_get_short_read);
atomic_inc(&rreq->nr_outstanding);
if (subreq->source == FSCACHE_READ_FROM_CACHE)
- netfs_read_from_cache(rreq, subreq, NETFS_READ_HOLE_CLEAR);
+ netfs_read_from_cache(rreq, subreq, FSCACHE_READ_HOLE_CLEAR);
else
netfs_read_from_server(rreq, subreq);
}
@@ -580,7 +580,7 @@ static bool netfs_rreq_submit_slice(struct netfs_io_request *rreq,
netfs_read_from_server(rreq, subreq);
break;
case FSCACHE_READ_FROM_CACHE:
- netfs_read_from_cache(rreq, subreq, NETFS_READ_HOLE_IGNORE);
+ netfs_read_from_cache(rreq, subreq, FSCACHE_READ_HOLE_IGNORE);
break;
default:
BUG();
@@ -258,7 +258,7 @@ static int fscache_fallback_read_page(struct inode *inode, struct page *page)
if (ret < 0)
return ret;
- ret = fscache_read(&cres, page_offset(page), &iter, NETFS_READ_HOLE_FAIL,
+ ret = fscache_read(&cres, page_offset(page), &iter, FSCACHE_READ_HOLE_FAIL,
NULL, NULL);
fscache_end_operation(&cres);
return ret;
@@ -496,18 +496,18 @@ static inline void fscache_end_operation(struct netfs_cache_resources *cres)
* @read_hole indicates how a partially populated region in the cache should be
* handled. It can be one of a number of settings:
*
- * NETFS_READ_HOLE_IGNORE - Just try to read (may return a short read).
+ * FSCACHE_READ_HOLE_IGNORE - Just try to read (may return a short read).
*
- * NETFS_READ_HOLE_CLEAR - Seek for data, clearing the part of the buffer
+ * FSCACHE_READ_HOLE_CLEAR - Seek for data, clearing the part of the buffer
* skipped over, then do as for IGNORE.
*
- * NETFS_READ_HOLE_FAIL - Give ENODATA if we encounter a hole.
+ * FSCACHE_READ_HOLE_FAIL - Give ENODATA if we encounter a hole.
*/
static inline
int fscache_read(struct netfs_cache_resources *cres,
loff_t start_pos,
struct iov_iter *iter,
- enum netfs_read_from_hole read_hole,
+ enum fscache_read_from_hole read_hole,
fscache_io_terminated_t term_func,
void *term_func_priv)
{
@@ -221,10 +221,10 @@ struct netfs_request_ops {
/*
* How to handle reading from a hole.
*/
-enum netfs_read_from_hole {
- NETFS_READ_HOLE_IGNORE,
- NETFS_READ_HOLE_CLEAR,
- NETFS_READ_HOLE_FAIL,
+enum fscache_read_from_hole {
+ FSCACHE_READ_HOLE_IGNORE,
+ FSCACHE_READ_HOLE_CLEAR,
+ FSCACHE_READ_HOLE_FAIL,
};
/*
@@ -239,7 +239,7 @@ struct netfs_cache_ops {
int (*read)(struct netfs_cache_resources *cres,
loff_t start_pos,
struct iov_iter *iter,
- enum netfs_read_from_hole read_hole,
+ enum fscache_read_from_hole read_hole,
fscache_io_terminated_t term_func,
void *term_func_priv);