diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-10-09 20:20:29 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-14 14:29:10 -0400 |
commit | da1e90985a0e767e44397c9db0937e236033fa58 (patch) | |
tree | 88d16dd378bf1b180d345a87de95316546af348a /fs/ocfs2/resize.c | |
parent | 936b8834366ec05f2a6993f73afd8348cac9718e (diff) |
ocfs2: Separate out sync reads from ocfs2_read_blocks()
The ocfs2_read_blocks() function currently handles sync reads, cached,
reads, and sometimes cached reads. We're going to add some
functionality to it, so first we should simplify it. The uncached,
synchronous reads are much easer to handle as a separate function, so we
instroduce ocfs2_read_blocks_sync().
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/resize.c')
-rw-r--r-- | fs/ocfs2/resize.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c index 8166968e9015..472d854796c2 100644 --- a/fs/ocfs2/resize.c +++ b/fs/ocfs2/resize.c | |||
@@ -200,7 +200,7 @@ static int update_backups(struct inode * inode, u32 clusters, char *data) | |||
200 | if (cluster > clusters) | 200 | if (cluster > clusters) |
201 | break; | 201 | break; |
202 | 202 | ||
203 | ret = ocfs2_read_block(osb, blkno, &backup, 0, NULL); | 203 | ret = ocfs2_read_blocks_sync(osb, blkno, 1, &backup); |
204 | if (ret < 0) { | 204 | if (ret < 0) { |
205 | mlog_errno(ret); | 205 | mlog_errno(ret); |
206 | break; | 206 | break; |
@@ -236,8 +236,8 @@ static void ocfs2_update_super_and_backups(struct inode *inode, | |||
236 | * update the superblock last. | 236 | * update the superblock last. |
237 | * It doesn't matter if the write failed. | 237 | * It doesn't matter if the write failed. |
238 | */ | 238 | */ |
239 | ret = ocfs2_read_block(osb, OCFS2_SUPER_BLOCK_BLKNO, | 239 | ret = ocfs2_read_blocks_sync(osb, OCFS2_SUPER_BLOCK_BLKNO, 1, |
240 | &super_bh, 0, NULL); | 240 | &super_bh); |
241 | if (ret < 0) { | 241 | if (ret < 0) { |
242 | mlog_errno(ret); | 242 | mlog_errno(ret); |
243 | goto out; | 243 | goto out; |
@@ -540,7 +540,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input) | |||
540 | goto out_unlock; | 540 | goto out_unlock; |
541 | } | 541 | } |
542 | 542 | ||
543 | ret = ocfs2_read_block(osb, input->group, &group_bh, 0, NULL); | 543 | ret = ocfs2_read_blocks_sync(osb, input->group, 1, &group_bh); |
544 | if (ret < 0) { | 544 | if (ret < 0) { |
545 | mlog(ML_ERROR, "Can't read the group descriptor # %llu " | 545 | mlog(ML_ERROR, "Can't read the group descriptor # %llu " |
546 | "from the device.", (unsigned long long)input->group); | 546 | "from the device.", (unsigned long long)input->group); |