Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373378
b: refs/heads/master
c: 6518be4
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 1bab26c commit 0878df0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 37 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: 463207aa40cf2cadcae84866b3f85ccaa7022ee8
refs/heads/master: 6518be47f910f62a98cb6044dbb457af55241f95
6 changes: 1 addition & 5 deletions trunk/include/linux/ceph/messenger.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,7 @@ struct ceph_msg_data {
enum ceph_msg_data_type type;
union {
#ifdef CONFIG_BLOCK
struct {
struct bio *bio_iter; /* iterator */
struct bio *bio;
unsigned int bio_seg; /* current seg in bio */
};
struct bio *bio;
#endif /* CONFIG_BLOCK */
struct {
struct page **pages; /* NOT OWNER. */
Expand Down
31 changes: 0 additions & 31 deletions trunk/net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,29 +716,6 @@ static void con_out_kvec_add(struct ceph_connection *con,
}

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

static void iter_bio_next(struct bio **bio_iter, unsigned 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);
}

/*
* For a bio data item, a piece is whatever remains of the next
Expand Down Expand Up @@ -1112,10 +1089,6 @@ static void prepare_message_data(struct ceph_msg *msg,
msg_pos->page_pos = msg->p.alignment;
else
msg_pos->page_pos = 0;
#ifdef CONFIG_BLOCK
if (ceph_msg_has_bio(msg))
init_bio_iter(msg->b.bio, &msg->b.bio_iter, &msg->b.bio_seg);
#endif
msg_pos->data_pos = 0;

/* Initialize data cursors */
Expand Down Expand Up @@ -1478,10 +1451,6 @@ static void in_msg_pos_next(struct ceph_connection *con, size_t len,
BUG_ON(received != len);
msg_pos->page_pos = 0;
msg_pos->page++;
#ifdef CONFIG_BLOCK
if (msg->b.bio)
iter_bio_next(&msg->b.bio_iter, &msg->b.bio_seg);
#endif /* CONFIG_BLOCK */
}

static u32 ceph_crc32c_page(u32 crc, struct page *page,
Expand Down

0 comments on commit 0878df0

Please sign in to comment.