diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-03 04:54:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-03 04:54:42 -0700 |
| commit | 4b22645477b933f5cf2a972beebef367b628cdc2 (patch) | |
| tree | 8854fbfa4ab414ef5455a2d6c1d6f1494b07efc5 /include/linux/buffer_head.h | |
| parent | d23caa21ece9e3f2d0270047b0b7f0b6887e51fb (diff) | |
Add an asynchronous buffer read-ahead facility. Nobody
uses it for now, but I needed it for some tuning tests,
and it is potentially useful for others.
Diffstat (limited to 'include/linux/buffer_head.h')
| -rw-r--r-- | include/linux/buffer_head.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 22d3ac8efc6b..1f468b0491ed 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -167,6 +167,7 @@ struct buffer_head *__find_get_block(struct block_device *, sector_t, int); struct buffer_head * __getblk(struct block_device *, sector_t, int); void __brelse(struct buffer_head *); void __bforget(struct buffer_head *); +void __breadahead(struct block_device *, sector_t block, int size); struct buffer_head *__bread(struct block_device *, sector_t block, int size); struct buffer_head *alloc_buffer_head(int gfp_flags); void free_buffer_head(struct buffer_head * bh); @@ -241,6 +242,12 @@ sb_bread(struct super_block *sb, sector_t block) return __bread(sb->s_bdev, block, sb->s_blocksize); } +static inline void +sb_breadahead(struct super_block *sb, sector_t block) +{ + __breadahead(sb->s_bdev, block, sb->s_blocksize); +} + static inline struct buffer_head * sb_getblk(struct super_block *sb, sector_t block) { |
