From 0ce7360c323fab62113abb4842936b430d319733 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 7 May 2008 13:19:05 -0700 Subject: [PATCH] kclient: remove unnecessary flush/truncate bits from flush_write_caps --- src/TODO | 92 ++--------------------------------------- src/kernel/mds_client.c | 6 --- 2 files changed, 3 insertions(+), 95 deletions(-) diff --git a/src/TODO b/src/TODO index 3a5cd956d75f1..3786ee2bdba40 100644 --- a/src/TODO +++ b/src/TODO @@ -1,90 +1,3 @@ -[376940.226925] -[376940.226926] ======================================================= -[376940.230749] [ INFO: possible circular locking dependency detected ] -[376940.230749] 2.6.25 #23 -[376940.230749] ------------------------------------------------------- -[376940.230749] events/0/9 is trying to acquire lock: -[376940.230749] (&osdc->map_sem){----}, at: [] handle_timeout+0x51/0x76 [ceph] -[376940.230749] -[376940.230749] but task is already holding lock: -[376940.230749] (&(&osdc->timeout_work)->work){--..}, at: [] run_workqueue+0x9f/0x1f6 -[376940.230749] -[376940.230749] which lock already depends on the new lock. -[376940.230749] -[376940.230749] -[376940.230749] the existing dependency chain (in reverse order) is: -[376940.230749] -[376940.230749] -> #2 (&(&osdc->timeout_work)->work){--..}: -[376940.230749] [] __lock_acquire+0xa8b/0xc8a -[376940.230749] [] lock_acquire+0x8e/0xb2 -[376940.230749] [] __cancel_work_timer+0xe8/0x1ea -[376940.230749] [] cancel_delayed_work_sync+0xd/0xf -[376940.230749] [] do_request+0x1af/0x2bc [ceph] -[376940.230749] [] ceph_osdc_writepages+0x135/0x190 [ceph] -[376940.230749] [] ceph_writepages+0x92f/0xcdc [ceph] -[376940.230749] [] do_writepages+0x2b/0x3a -[376940.230749] [] __writeback_single_inode+0x151/0x282 -[376940.230749] [] sync_sb_inodes+0x1ab/0x26f -[376940.230749] [] writeback_inodes+0x85/0xe9 -[376940.230749] [] background_writeout+0x87/0xba -[376940.230749] [] pdflush+0x134/0x1df -[376940.230749] [] kthread+0x49/0x79 -[376940.230749] [] child_rip+0xa/0x12 -[376940.230749] [] 0xffffffffffffffff -[376940.230749] -[376940.230749] -> #1 (&osdc->request_lock){--..}: -[376940.230749] [] __lock_acquire+0xa8b/0xc8a -[376940.230749] [] lock_acquire+0x8e/0xb2 -[376940.230749] [] _spin_lock+0x26/0x53 -[376940.230749] [] ceph_osdc_handle_map+0x41c/0x5ea [ceph] -[376940.230749] [] ceph_dispatch+0x2cf/0x339 [ceph] -[376940.230749] [] try_read+0xf42/0x1199 [ceph] -[376940.230749] [] run_workqueue+0xee/0x1f6 -[376940.230749] [] worker_thread+0xdb/0xe8 -[376940.230749] [] kthread+0x49/0x79 -[376940.230749] [] child_rip+0xa/0x12 -[376940.230749] [] 0xffffffffffffffff -[376940.230749] -[376940.230749] -> #0 (&osdc->map_sem){----}: -[376940.230749] [] __lock_acquire+0x98d/0xc8a -[376940.230749] [] lock_acquire+0x8e/0xb2 -[376940.230749] [] down_read+0x3b/0x68 -[376940.230749] [] handle_timeout+0x51/0x76 [ceph] -[376940.230749] [] run_workqueue+0xee/0x1f6 -[376940.230749] [] worker_thread+0xdb/0xe8 -[376940.230749] [] kthread+0x49/0x79 -[376940.230749] [] child_rip+0xa/0x12 -[376940.230749] [] 0xffffffffffffffff -[376940.230749] -[376940.230749] other info that might help us debug this: -[376940.230749] -[376940.230749] 2 locks held by events/0/9: -[376940.230749] #0: (events){--..}, at: [] run_workqueue+0x9f/0x1f6 -[376940.230749] #1: (&(&osdc->timeout_work)->work){--..}, at: [] run_workqueue+0x9f/0x1f6 -[376940.230749] -[376940.230749] stack backtrace: -[376940.230749] Pid: 9, comm: events/0 Not tainted 2.6.25 #23 -[376940.230749] -[376940.230749] Call Trace: -[376940.230749] [] print_circular_bug_tail+0x70/0x7b -[376940.230749] [] ? print_circular_bug_entry+0x48/0x4f -[376940.230749] [] __lock_acquire+0x98d/0xc8a -[376940.230749] [] ? :ceph:handle_timeout+0x51/0x76 -[376940.230749] [] lock_acquire+0x8e/0xb2 -[376940.230749] [] ? :ceph:handle_timeout+0x51/0x76 -[376940.230749] [] ? :ceph:handle_timeout+0x0/0x76 -[376940.230749] [] down_read+0x3b/0x68 -[376940.230749] [] :ceph:handle_timeout+0x51/0x76 -[376940.230749] [] run_workqueue+0xee/0x1f6 -[376940.230749] [] worker_thread+0xdb/0xe8 -[376940.230749] [] ? autoremove_wake_function+0x0/0x38 -[376940.230749] [] ? worker_thread+0x0/0xe8 -[376940.230749] [] kthread+0x49/0x79 -[376940.230749] [] child_rip+0xa/0x12 -[376940.230749] [] ? restore_args+0x0/0x30 -[376940.230749] [] ? kthread+0x0/0x79 -[376940.230749] [] ? child_rip+0x0/0x12 -[376940.230749] code cleanup - userspace encoding/decoding needs major cleanup @@ -104,6 +17,9 @@ userspace client - also needs cope with mds failures kernel client +- large directories + - frag_map vs frag_tree in ci + - readdir - flush caps on sync, fsync, etc. - do we need to block? - timeout mds session close on umount @@ -118,8 +34,6 @@ kernel client - a dir for each client instance (client###)? - hooks to get mds, osd, monmap epoch #s - nfs exporting - - fill_trace needs to use d_splice_alias - - lookup needs to return last_dentry if it gets swapped by fill_trace/d_splice_alias - build fat fh's with multiple ancestors.. filenames..? - vfs - can we use dentry_path(), if it gets merged into mainline? diff --git a/src/kernel/mds_client.c b/src/kernel/mds_client.c index daff62681133f..7abdbda6434a6 100644 --- a/src/kernel/mds_client.c +++ b/src/kernel/mds_client.c @@ -1584,12 +1584,6 @@ static void flush_write_caps(struct ceph_mds_client *mdsc, struct inode *inode = &cap->ci->vfs_inode; int used, wanted; - __ceph_do_pending_vmtruncate(inode); - - mutex_lock(&inode->i_mutex); - filemap_write_and_wait(inode->i_mapping); - mutex_unlock(&inode->i_mutex); - spin_lock(&inode->i_lock); if ((cap->implemented & (CEPH_CAP_WR|CEPH_CAP_WRBUFFER)) == 0) { spin_unlock(&inode->i_lock); -- 2.39.5