mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-06-14 01:50:29 -04:00
netfs: Use mempools for allocating requests and subrequests
Use mempools for allocating requests and subrequests in an effort to make sure that allocation always succeeds so that when performing writeback we can always make progress. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <linux/uio.h>
|
||||
|
||||
enum netfs_sreq_ref_trace;
|
||||
typedef struct mempool_s mempool_t;
|
||||
|
||||
/**
|
||||
* folio_start_private_2 - Start an fscache write on a folio. [DEPRECATED]
|
||||
@@ -236,8 +237,8 @@ struct netfs_io_request {
|
||||
* Operations the network filesystem can/must provide to the helpers.
|
||||
*/
|
||||
struct netfs_request_ops {
|
||||
unsigned int io_request_size; /* Alloc size for netfs_io_request struct */
|
||||
unsigned int io_subrequest_size; /* Alloc size for netfs_io_subrequest struct */
|
||||
mempool_t *request_pool;
|
||||
mempool_t *subrequest_pool;
|
||||
int (*init_request)(struct netfs_io_request *rreq, struct file *file);
|
||||
void (*free_request)(struct netfs_io_request *rreq);
|
||||
void (*free_subrequest)(struct netfs_io_subrequest *rreq);
|
||||
|
||||
Reference in New Issue
Block a user