Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148161
b: refs/heads/master
c: 62f469b
h: refs/heads/master
i:
  148159: 6d1780c
v: v3
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Jun 10, 2009
1 parent 88818c9 commit 7953923
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 546881aea9787ed5c626ac99ab80158ea9ae0515
refs/heads/master: 62f469b596dd0aadf046a69027087c18db43734e
23 changes: 13 additions & 10 deletions trunk/drivers/scsi/osd/osd_initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,13 +779,14 @@ EXPORT_SYMBOL(osd_req_remove_object);
*/

void osd_req_write(struct osd_request *or,
const struct osd_obj_id *obj, struct bio *bio, u64 offset)
const struct osd_obj_id *obj, u64 offset,
struct bio *bio, u64 len)
{
_osd_req_encode_common(or, OSD_ACT_WRITE, obj, offset, bio->bi_size);
_osd_req_encode_common(or, OSD_ACT_WRITE, obj, offset, len);
WARN_ON(or->out.bio || or->out.total_bytes);
bio->bi_rw |= (1 << BIO_RW);
WARN_ON(0 == bio_rw_flagged(bio, BIO_RW));
or->out.bio = bio;
or->out.total_bytes = bio->bi_size;
or->out.total_bytes = len;
}
EXPORT_SYMBOL(osd_req_write);

Expand All @@ -798,7 +799,8 @@ int osd_req_write_kern(struct osd_request *or,
if (IS_ERR(bio))
return PTR_ERR(bio);

osd_req_write(or, obj, bio, offset);
bio->bi_rw |= (1 << BIO_RW); /* FIXME: bio_set_dir() */
osd_req_write(or, obj, offset, bio, len);
return 0;
}
EXPORT_SYMBOL(osd_req_write_kern);
Expand Down Expand Up @@ -828,13 +830,14 @@ void osd_req_flush_object(struct osd_request *or,
EXPORT_SYMBOL(osd_req_flush_object);

void osd_req_read(struct osd_request *or,
const struct osd_obj_id *obj, struct bio *bio, u64 offset)
const struct osd_obj_id *obj, u64 offset,
struct bio *bio, u64 len)
{
_osd_req_encode_common(or, OSD_ACT_READ, obj, offset, bio->bi_size);
_osd_req_encode_common(or, OSD_ACT_READ, obj, offset, len);
WARN_ON(or->in.bio || or->in.total_bytes);
bio->bi_rw &= ~(1 << BIO_RW);
WARN_ON(1 == bio_rw_flagged(bio, BIO_RW));
or->in.bio = bio;
or->in.total_bytes = bio->bi_size;
or->in.total_bytes = len;
}
EXPORT_SYMBOL(osd_req_read);

Expand All @@ -847,7 +850,7 @@ int osd_req_read_kern(struct osd_request *or,
if (IS_ERR(bio))
return PTR_ERR(bio);

osd_req_read(or, obj, bio, offset);
osd_req_read(or, obj, offset, bio, len);
return 0;
}
EXPORT_SYMBOL(osd_req_read_kern);
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int read_exec(struct page_collect *pcol, bool is_sync)
goto err;
}

osd_req_read(or, &obj, pcol->bio, i_start);
osd_req_read(or, &obj, i_start, pcol->bio, pcol->length);

if (is_sync) {
exofs_sync_op(or, pcol->sbi->s_timeout, oi->i_cred);
Expand Down Expand Up @@ -522,7 +522,8 @@ static int write_exec(struct page_collect *pcol)

*pcol_copy = *pcol;

osd_req_write(or, &obj, pcol_copy->bio, i_start);
pcol_copy->bio->bi_rw |= (1 << BIO_RW); /* FIXME: bio_set_dir() */
osd_req_write(or, &obj, i_start, pcol_copy->bio, pcol_copy->length);
ret = exofs_async_op(or, writepages_done, pcol_copy, oi->i_cred);
if (unlikely(ret)) {
EXOFS_ERR("write_exec: exofs_async_op() Faild\n");
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/scsi/osd_initiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void osd_req_create_object(struct osd_request *or, struct osd_obj_id *);
void osd_req_remove_object(struct osd_request *or, struct osd_obj_id *);

void osd_req_write(struct osd_request *or,
const struct osd_obj_id *, struct bio *data_out, u64 offset);
const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len);
int osd_req_write_kern(struct osd_request *or,
const struct osd_obj_id *obj, u64 offset, void *buff, u64 len);
void osd_req_append(struct osd_request *or,
Expand All @@ -380,7 +380,7 @@ void osd_req_flush_object(struct osd_request *or,
/*V2*/ u64 offset, /*V2*/ u64 len);

void osd_req_read(struct osd_request *or,
const struct osd_obj_id *, struct bio *data_in, u64 offset);
const struct osd_obj_id *obj, u64 offset, struct bio *bio, u64 len);
int osd_req_read_kern(struct osd_request *or,
const struct osd_obj_id *obj, u64 offset, void *buff, u64 len);

Expand Down

0 comments on commit 7953923

Please sign in to comment.