Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320288
b: refs/heads/master
c: df6ad1f
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed Jul 6, 2012
1 parent a39c023 commit 6e7d6dc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 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: fd154f3c75465abd83b7a395033e3755908a1e6e
refs/heads/master: df6ad1f97342ebc4270128222e896541405eecdb
50 changes: 25 additions & 25 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,31 @@ static void con_out_kvec_add(struct ceph_connection *con,
con->out_kvec_bytes += size;
}

#ifdef CONFIG_BLOCK
static void init_bio_iter(struct bio *bio, struct bio **iter, int *seg)
{
if (!bio) {
*iter = NULL;
*seg = 0;
return;
}
*iter = bio;
*seg = bio->bi_idx;
}

static void iter_bio_next(struct bio **bio_iter, int *seg)
{
if (*bio_iter == NULL)
return;

BUG_ON(*seg >= (*bio_iter)->bi_vcnt);

(*seg)++;
if (*seg == (*bio_iter)->bi_vcnt)
init_bio_iter((*bio_iter)->bi_next, bio_iter, seg);
}
#endif

static void prepare_write_message_data(struct ceph_connection *con)
{
struct ceph_msg *msg = con->out_msg;
Expand Down Expand Up @@ -868,31 +893,6 @@ static int write_partial_kvec(struct ceph_connection *con)
return ret; /* done! */
}

#ifdef CONFIG_BLOCK
static void init_bio_iter(struct bio *bio, struct bio **iter, int *seg)
{
if (!bio) {
*iter = NULL;
*seg = 0;
return;
}
*iter = bio;
*seg = bio->bi_idx;
}

static void iter_bio_next(struct bio **bio_iter, int *seg)
{
if (*bio_iter == NULL)
return;

BUG_ON(*seg >= (*bio_iter)->bi_vcnt);

(*seg)++;
if (*seg == (*bio_iter)->bi_vcnt)
init_bio_iter((*bio_iter)->bi_next, bio_iter, seg);
}
#endif

static void out_msg_pos_next(struct ceph_connection *con, struct page *page,
size_t len, size_t sent, bool in_trail)
{
Expand Down

0 comments on commit 6e7d6dc

Please sign in to comment.