aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 15:39:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-09 15:39:10 -0400
commit9a5889ae1ce41f376e6a5b56e17e0c5a755fda80 (patch)
tree0eaadb5530d5b82460e0bfb0b4403e080d7b1b8f /fs/ceph/mds_client.c
parente3a0dd98e1ddfd135b7ef889fcc0269e8c2ca445 (diff)
parent8b8cf8917f9b5d74e04f281272d8719ce335a497 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph updates from Sage Weil: "There is some follow-on RBD cleanup after the last window's code drop, a series from Yan fixing multi-mds behavior in cephfs, and then a sprinkling of bug fixes all around. Some warnings, sleeping while atomic, a null dereference, and cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (36 commits) libceph: fix invalid unsigned->signed conversion for timespec encoding libceph: call r_unsafe_callback when unsafe reply is received ceph: fix race between cap issue and revoke ceph: fix cap revoke race ceph: fix pending vmtruncate race ceph: avoid accessing invalid memory libceph: Fix NULL pointer dereference in auth client code ceph: Reconstruct the func ceph_reserve_caps. ceph: Free mdsc if alloc mdsc->mdsmap failed. ceph: remove sb_start/end_write in ceph_aio_write. ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL. ceph: fix sleeping function called from invalid context. ceph: move inode to proper flushing list when auth MDS changes rbd: fix a couple warnings ceph: clear migrate seq when MDS restarts ceph: check migrate seq before changing auth cap ceph: fix race between page writeback and truncate ceph: reset iov_len when discarding cap release messages ceph: fix cap release race libceph: fix truncate size calculation ...
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 99890b02a10b..187bf214444d 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1391,6 +1391,7 @@ static void discard_cap_releases(struct ceph_mds_client *mdsc,
1391 num = le32_to_cpu(head->num); 1391 num = le32_to_cpu(head->num);
1392 dout("discard_cap_releases mds%d %p %u\n", session->s_mds, msg, num); 1392 dout("discard_cap_releases mds%d %p %u\n", session->s_mds, msg, num);
1393 head->num = cpu_to_le32(0); 1393 head->num = cpu_to_le32(0);
1394 msg->front.iov_len = sizeof(*head);
1394 session->s_num_cap_releases += num; 1395 session->s_num_cap_releases += num;
1395 1396
1396 /* requeue completed messages */ 1397 /* requeue completed messages */
@@ -2454,6 +2455,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
2454 spin_lock(&ci->i_ceph_lock); 2455 spin_lock(&ci->i_ceph_lock);
2455 cap->seq = 0; /* reset cap seq */ 2456 cap->seq = 0; /* reset cap seq */
2456 cap->issue_seq = 0; /* and issue_seq */ 2457 cap->issue_seq = 0; /* and issue_seq */
2458 cap->mseq = 0; /* and migrate_seq */
2457 2459
2458 if (recon_state->flock) { 2460 if (recon_state->flock) {
2459 rec.v2.cap_id = cpu_to_le64(cap->cap_id); 2461 rec.v2.cap_id = cpu_to_le64(cap->cap_id);
@@ -3040,8 +3042,10 @@ int ceph_mdsc_init(struct ceph_fs_client *fsc)
3040 fsc->mdsc = mdsc; 3042 fsc->mdsc = mdsc;
3041 mutex_init(&mdsc->mutex); 3043 mutex_init(&mdsc->mutex);
3042 mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS); 3044 mdsc->mdsmap = kzalloc(sizeof(*mdsc->mdsmap), GFP_NOFS);
3043 if (mdsc->mdsmap == NULL) 3045 if (mdsc->mdsmap == NULL) {
3046 kfree(mdsc);
3044 return -ENOMEM; 3047 return -ENOMEM;
3048 }
3045 3049
3046 init_completion(&mdsc->safe_umount_waiters); 3050 init_completion(&mdsc->safe_umount_waiters);
3047 init_waitqueue_head(&mdsc->session_close_wq); 3051 init_waitqueue_head(&mdsc->session_close_wq);