diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-17 21:42:23 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-07-22 21:02:15 -0400 |
commit | 26dfdd8e29f28c08aa67861b3c83d0f3f7d30cee (patch) | |
tree | 3cc14a71010b454f6524006e973147837f040a39 /fs/nilfs2/btree.c | |
parent | f8e6cc013b896d75d6ce4ec9e168014af1257fd8 (diff) |
nilfs2: add read ahead mode to nilfs_btnode_submit_block
This adds mode argument to nilfs_btnode_submit_block() function and
allows it to issue a read-ahead request.
An optional submit_ptr argument is also added to store the actual
block address for which bio is sent. submit_ptr is used for a series
of read-ahead requests, and helps to decide if each requested block is
continous to the previous one on disk.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 6462c7026479..4669389bf686 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -71,9 +71,10 @@ static int nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr, | |||
71 | { | 71 | { |
72 | struct address_space *btnc = &NILFS_BMAP_I(btree)->i_btnode_cache; | 72 | struct address_space *btnc = &NILFS_BMAP_I(btree)->i_btnode_cache; |
73 | struct buffer_head *bh; | 73 | struct buffer_head *bh; |
74 | sector_t pbn = 0; | ||
74 | int err; | 75 | int err; |
75 | 76 | ||
76 | err = nilfs_btnode_submit_block(btnc, ptr, 0, bhp); | 77 | err = nilfs_btnode_submit_block(btnc, ptr, pbn, READ, bhp, &pbn); |
77 | if (err) | 78 | if (err) |
78 | return err == -EEXIST ? 0 : err; | 79 | return err == -EEXIST ? 0 : err; |
79 | 80 | ||