diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2012-03-28 18:41:29 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-03-28 18:41:29 +0100 |
commit | a66cc28f53a7e9679dedb2bc66ddb0e0c6bdd0ee (patch) | |
tree | 0d1037562bd8a47f6e9d31d7ed56e24c7aa98c66 /drivers/md/dm-bufio.h | |
parent | 67e2e2b281812b5caf4923a38aadc6b89e34f064 (diff) | |
download | linux-a66cc28f53a7e9679dedb2bc66ddb0e0c6bdd0ee.tar.gz linux-a66cc28f53a7e9679dedb2bc66ddb0e0c6bdd0ee.tar.bz2 linux-a66cc28f53a7e9679dedb2bc66ddb0e0c6bdd0ee.zip |
dm bufio: prefetch
This patch introduces a new function dm_bufio_prefetch. It prefetches
the specified range of blocks into dm-bufio cache without waiting
for i/o completion.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-bufio.h')
-rw-r--r-- | drivers/md/dm-bufio.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/dm-bufio.h b/drivers/md/dm-bufio.h index 5c4c3a04e381..b142946a9e32 100644 --- a/drivers/md/dm-bufio.h +++ b/drivers/md/dm-bufio.h @@ -63,6 +63,14 @@ void *dm_bufio_new(struct dm_bufio_client *c, sector_t block, struct dm_buffer **bp); /* + * Prefetch the specified blocks to the cache. + * The function starts to read the blocks and returns without waiting for + * I/O to finish. + */ +void dm_bufio_prefetch(struct dm_bufio_client *c, + sector_t block, unsigned n_blocks); + +/* * Release a reference obtained with dm_bufio_{read,get,new}. The data * pointer and dm_buffer pointer is no longer valid after this call. */ |