diff options
| author | Adrien Schildknecht <adriens@google.com> | 2016-11-07 12:37:55 -0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 11:00:20 +0200 |
| commit | bbdb7dc21bb91b81d56a566eb43c9dccdf17ed01 (patch) | |
| tree | 6d7fb6ebb490d595c127dbf1c28d67c92669d418 /fs/squashfs/squashfs.h | |
| parent | d5a8d9dadae88f0bc4623dfc724c451b8417885a (diff) | |
Squashfs: replace buffer_head with BIO
The 'll_rw_block' has been deprecated and BIO is now the basic container
for block I/O within the kernel.
Switching to BIO offers 2 advantages:
1/ It removes synchronous wait for the up-to-date buffers: SquashFS
now deals with decompressions/copies asynchronously.
Implementing an asynchronous mechanism to read data is needed to
efficiently implement .readpages().
2/ Prior to this patch, merging the read requests entirely depends on
the IO scheduler. SquashFS has more information than the IO
scheduler about what could be merged. Moreover, merging the reads
at the FS level means that we rely less on the IO scheduler.
Signed-off-by: Adrien Schildknecht <adriens@google.com>
Change-Id: I98cf130f1977d396cdeb1f0617425e208b7d0214
Diffstat (limited to 'fs/squashfs/squashfs.h')
| -rw-r--r-- | fs/squashfs/squashfs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h index 887d6d270..e9b75e27b 100644 --- a/fs/squashfs/squashfs.h +++ b/fs/squashfs/squashfs.h @@ -28,8 +28,14 @@ #define WARNING(s, args...) pr_warn("SQUASHFS: "s, ## args) /* block.c */ +extern int squashfs_init_read_wq(void); extern int squashfs_read_data(struct super_block *, u64, int, u64 *, struct squashfs_page_actor *); +extern void squashfs_destroy_read_wq(void); +extern int squashfs_read_data(struct super_block *, u64, int, u64 *, + struct squashfs_page_actor *); +extern int squashfs_read_data_async(struct super_block *, u64, int, u64 *, + struct squashfs_page_actor *); /* cache.c */ extern struct squashfs_cache *squashfs_cache_init(char *, int, int); |
