aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 17:00:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-20 17:00:13 -0500
commit40889e8d9fc6355980cf2bc94ef4356c10dec4ec (patch)
treec03f4e218477052c665cd9b01352f83e32c4a593 /fs/ceph/inode.c
parent1ca22254b32657d65315af261ae0e699b8427fb7 (diff)
parentc3e946ce7276faf0b302acd25c7b874edbeba661 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph update from Sage Weil: "There are a few different groups of commits here. The largest is Alex's ongoing work to enable the coming RBD features (cloning, striping). There is some cleanup in libceph that goes along with it. Cyril and David have fixed some problems with NFS reexport (leaking dentries and page locks), and there is a batch of patches from Yan fixing problems with the fs client when running against a clustered MDS. There are a few bug fixes mixed in for good measure, many of which will be going to the stable trees once they're upstream. My apologies for the late pull. There is still a gremlin in the rbd map/unmap code and I was hoping to include the fix for that as well, but we haven't been able to confirm the fix is correct yet; I'll send that in a separate pull once it's nailed down." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (68 commits) rbd: get rid of rbd_{get,put}_dev() libceph: register request before unregister linger libceph: don't use rb_init_node() in ceph_osdc_alloc_request() libceph: init event->node in ceph_osdc_create_event() libceph: init osd->o_node in create_osd() libceph: report connection fault with warning libceph: socket can close in any connection state rbd: don't use ENOTSUPP rbd: remove linger unconditionally rbd: get rid of RBD_MAX_SEG_NAME_LEN libceph: avoid using freed osd in __kick_osd_requests() ceph: don't reference req after put rbd: do not allow remove of mounted-on image libceph: Unlock unprocessed pages in start_read() error path ceph: call handle_cap_grant() for cap import message ceph: Fix __ceph_do_pending_vmtruncate ceph: Don't add dirty inode to dirty list if caps is in migration ceph: Fix infinite loop in __wake_requests ceph: Don't update i_max_size when handling non-auth cap bdi_register: add __printf verification, fix arg mismatch ...
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ba95eea201bf..2971eaa65cdc 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1466,7 +1466,7 @@ void __ceph_do_pending_vmtruncate(struct inode *inode)
1466{ 1466{
1467 struct ceph_inode_info *ci = ceph_inode(inode); 1467 struct ceph_inode_info *ci = ceph_inode(inode);
1468 u64 to; 1468 u64 to;
1469 int wrbuffer_refs, wake = 0; 1469 int wrbuffer_refs, finish = 0;
1470 1470
1471retry: 1471retry:
1472 spin_lock(&ci->i_ceph_lock); 1472 spin_lock(&ci->i_ceph_lock);
@@ -1498,15 +1498,18 @@ retry:
1498 truncate_inode_pages(inode->i_mapping, to); 1498 truncate_inode_pages(inode->i_mapping, to);
1499 1499
1500 spin_lock(&ci->i_ceph_lock); 1500 spin_lock(&ci->i_ceph_lock);
1501 ci->i_truncate_pending--; 1501 if (to == ci->i_truncate_size) {
1502 if (ci->i_truncate_pending == 0) 1502 ci->i_truncate_pending = 0;
1503 wake = 1; 1503 finish = 1;
1504 }
1504 spin_unlock(&ci->i_ceph_lock); 1505 spin_unlock(&ci->i_ceph_lock);
1506 if (!finish)
1507 goto retry;
1505 1508
1506 if (wrbuffer_refs == 0) 1509 if (wrbuffer_refs == 0)
1507 ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL); 1510 ceph_check_caps(ci, CHECK_CAPS_AUTHONLY, NULL);
1508 if (wake) 1511
1509 wake_up_all(&ci->i_cap_wq); 1512 wake_up_all(&ci->i_cap_wq);
1510} 1513}
1511 1514
1512 1515