Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 373410
b: refs/heads/master
c: 02ee07d
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed May 2, 2013
1 parent 1e5b772 commit 68d4a2b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 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: 88486957f9fbf52ff4313ff52d583110a6503c28
refs/heads/master: 02ee07d3002e6c0b0c4ea1982cd7e6aeca203ed6
4 changes: 2 additions & 2 deletions trunk/fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
if (IS_ERR(req))
return PTR_ERR(req);

ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);

/* build page vector */
nr_pages = calc_pages_for(0, len);
pages = kmalloc(sizeof(*pages) * nr_pages, GFP_NOFS);
Expand Down Expand Up @@ -351,6 +349,8 @@ static int start_read(struct inode *inode, struct list_head *page_list, int max)
req->r_callback = finish_read;
req->r_inode = inode;

ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);

dout("start_read %p starting %p %lld~%lld\n", inode, req, off, len);
ret = ceph_osdc_start_request(osdc, req, false);
if (ret < 0)
Expand Down
7 changes: 4 additions & 3 deletions trunk/fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,6 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
if (IS_ERR(req))
return PTR_ERR(req);

ceph_osdc_build_request(req, pos, num_ops, ops,
snapc, vino.snap, &mtime);

/* write from beginning of first page, regardless of io alignment */
page_align = file->f_flags & O_DIRECT ? buf_align : io_align;
num_pages = calc_pages_for(page_align, len);
Expand Down Expand Up @@ -583,6 +580,10 @@ static ssize_t ceph_sync_write(struct file *file, const char __user *data,
req->r_data_out.alignment = page_align;
req->r_inode = inode;

/* BUG_ON(vino.snap != CEPH_NOSNAP); */
ceph_osdc_build_request(req, pos, num_ops, ops,
snapc, vino.snap, &mtime);

ret = ceph_osdc_start_request(&fsc->client->osdc, req, false);
if (!ret) {
if (req->r_safe_callback) {
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2056,8 +2056,6 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc,
if (IS_ERR(req))
return PTR_ERR(req);

ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);

/* it may be a short read due to an object boundary */

osd_data = &req->r_data_in;
Expand All @@ -2069,6 +2067,8 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc,
dout("readpages final extent is %llu~%llu (%llu bytes align %d)\n",
off, *plen, osd_data->length, page_align);

ceph_osdc_build_request(req, off, 1, &op, NULL, vino.snap, NULL);

rc = ceph_osdc_start_request(osdc, req, false);
if (!rc)
rc = ceph_osdc_wait_request(osdc, req);
Expand Down Expand Up @@ -2105,8 +2105,6 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino,
if (IS_ERR(req))
return PTR_ERR(req);

ceph_osdc_build_request(req, off, 1, &op, snapc, CEPH_NOSNAP, mtime);

/* it may be a short write due to an object boundary */
osd_data = &req->r_data_out;
osd_data->type = CEPH_OSD_DATA_TYPE_PAGES;
Expand All @@ -2115,6 +2113,8 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino,
osd_data->alignment = page_align;
dout("writepages %llu~%llu (%llu bytes)\n", off, len, osd_data->length);

ceph_osdc_build_request(req, off, 1, &op, snapc, CEPH_NOSNAP, mtime);

rc = ceph_osdc_start_request(osdc, req, true);
if (!rc)
rc = ceph_osdc_wait_request(osdc, req);
Expand Down

0 comments on commit 68d4a2b

Please sign in to comment.