Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189914
b: refs/heads/master
c: fc837c8
h: refs/heads/master
v: v3
  • Loading branch information
Sage Weil committed Apr 13, 2010
1 parent e7deb5b commit 94c57dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 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: f5b066287c74b624583b993395a65d03a6487b3a
refs/heads/master: fc837c8f0446b73a1661339db406c0238dd1d184
16 changes: 7 additions & 9 deletions trunk/fs/ceph/snap.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,7 @@ static int dup_array(u64 **dst, __le64 *src, int num)
* Caller must hold snap_rwsem for read (i.e., the realm topology won't
* change).
*/
void ceph_queue_cap_snap(struct ceph_inode_info *ci,
struct ceph_snap_context *snapc)
void ceph_queue_cap_snap(struct ceph_inode_info *ci)
{
struct inode *inode = &ci->vfs_inode;
struct ceph_cap_snap *capsnap;
Expand All @@ -450,10 +449,11 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci,
as no new writes are allowed to start when pending, so any
writes in progress now were started before the previous
cap_snap. lucky us. */
dout("queue_cap_snap %p snapc %p seq %llu used %d"
" already pending\n", inode, snapc, snapc->seq, used);
dout("queue_cap_snap %p already pending\n", inode);
kfree(capsnap);
} else if (ci->i_wrbuffer_ref_head || (used & CEPH_CAP_FILE_WR)) {
struct ceph_snap_context *snapc = ci->i_head_snapc;

igrab(inode);

atomic_set(&capsnap->nref, 1);
Expand All @@ -462,7 +462,6 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci,
INIT_LIST_HEAD(&capsnap->flushing_item);

capsnap->follows = snapc->seq - 1;
capsnap->context = ceph_get_snap_context(snapc);
capsnap->issued = __ceph_caps_issued(ci, NULL);
capsnap->dirty = __ceph_caps_dirty(ci);

Expand All @@ -479,7 +478,7 @@ void ceph_queue_cap_snap(struct ceph_inode_info *ci,
snapshot. */
capsnap->dirty_pages = ci->i_wrbuffer_ref_head;
ci->i_wrbuffer_ref_head = 0;
ceph_put_snap_context(ci->i_head_snapc);
capsnap->context = snapc;
ci->i_head_snapc = NULL;
list_add_tail(&capsnap->ci_item, &ci->i_cap_snaps);

Expand Down Expand Up @@ -603,7 +602,7 @@ int ceph_update_snap_trace(struct ceph_mds_client *mdsc,
if (lastinode)
iput(lastinode);
lastinode = inode;
ceph_queue_cap_snap(ci, realm->cached_context);
ceph_queue_cap_snap(ci);
spin_lock(&realm->inodes_with_caps_lock);
}
spin_unlock(&realm->inodes_with_caps_lock);
Expand Down Expand Up @@ -825,8 +824,7 @@ void ceph_handle_snap(struct ceph_mds_client *mdsc,
spin_unlock(&realm->inodes_with_caps_lock);
spin_unlock(&inode->i_lock);

ceph_queue_cap_snap(ci,
ci->i_snap_realm->cached_context);
ceph_queue_cap_snap(ci);

iput(inode);
continue;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/ceph/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,7 @@ extern int ceph_update_snap_trace(struct ceph_mds_client *m,
extern void ceph_handle_snap(struct ceph_mds_client *mdsc,
struct ceph_mds_session *session,
struct ceph_msg *msg);
extern void ceph_queue_cap_snap(struct ceph_inode_info *ci,
struct ceph_snap_context *snapc);
extern void ceph_queue_cap_snap(struct ceph_inode_info *ci);
extern int __ceph_finish_cap_snap(struct ceph_inode_info *ci,
struct ceph_cap_snap *capsnap);
extern void ceph_cleanup_empty_realms(struct ceph_mds_client *mdsc);
Expand Down

0 comments on commit 94c57dd

Please sign in to comment.