diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2009-05-24 13:04:26 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-10 09:59:52 -0400 |
commit | 62f469b596dd0aadf046a69027087c18db43734e (patch) | |
tree | 2e7fd67763b328fb47c3793e8a9d5a13ed49ea33 /fs/exofs | |
parent | 546881aea9787ed5c626ac99ab80158ea9ae0515 (diff) |
[SCSI] libosd: osd_req_{read,write} takes a length parameter
For supporting of chained-bios we can not inspect the first
bio only, as before. Caller shall pass the total length of the
request, ie. sum_bytes(bio-chain).
Also since the bio might be a chain we don't set it's direction
on behalf of it's callers. The bio direction should be properly
set prior to this call. So fix a couple of write users that now
need to set the bio direction properly
[In this patch I change both library code and user sites at
exofs, to make it easy on integration. It should be submitted
via James's scsi-misc tree.]
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
CC: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r-- | fs/exofs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c index ba8d9fab4693..f79e8e58c3a2 100644 --- a/fs/exofs/inode.c +++ b/fs/exofs/inode.c | |||
@@ -266,7 +266,7 @@ static int read_exec(struct page_collect *pcol, bool is_sync) | |||
266 | goto err; | 266 | goto err; |
267 | } | 267 | } |
268 | 268 | ||
269 | osd_req_read(or, &obj, pcol->bio, i_start); | 269 | osd_req_read(or, &obj, i_start, pcol->bio, pcol->length); |
270 | 270 | ||
271 | if (is_sync) { | 271 | if (is_sync) { |
272 | exofs_sync_op(or, pcol->sbi->s_timeout, oi->i_cred); | 272 | exofs_sync_op(or, pcol->sbi->s_timeout, oi->i_cred); |
@@ -522,7 +522,8 @@ static int write_exec(struct page_collect *pcol) | |||
522 | 522 | ||
523 | *pcol_copy = *pcol; | 523 | *pcol_copy = *pcol; |
524 | 524 | ||
525 | osd_req_write(or, &obj, pcol_copy->bio, i_start); | 525 | pcol_copy->bio->bi_rw |= (1 << BIO_RW); /* FIXME: bio_set_dir() */ |
526 | osd_req_write(or, &obj, i_start, pcol_copy->bio, pcol_copy->length); | ||
526 | ret = exofs_async_op(or, writepages_done, pcol_copy, oi->i_cred); | 527 | ret = exofs_async_op(or, writepages_done, pcol_copy, oi->i_cred); |
527 | if (unlikely(ret)) { | 528 | if (unlikely(ret)) { |
528 | EXOFS_ERR("write_exec: exofs_async_op() Faild\n"); | 529 | EXOFS_ERR("write_exec: exofs_async_op() Faild\n"); |