From 9ea6f360aa9caaad3231c1607293ca3611e9a3cd Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 19 Feb 2004 15:55:41 +0000 Subject: [PATCH] Some last b_size work: - use the KMS in prepare_write - remove now-useless ll_extent_lock_no_validate - I noticed that lookup_it_finish still took whole-file locks when a getattr comes in through lookup instead of revalidate; fixed. - record the last time a lock was used: lock->l_last_used - if we see a glimpse callback for a lock that hasn't been used in 10 seconds, call both the glimpse and blocking AST callbacks Repeated "ls -l /mnt/lustre/foo" then leads to: [Write a file] First ls, inode instantiation and glimpsing: 118 debug-log lines [10 seconds pass] Second ls, glimpse runs and blocking ast runs: 75 debug-log lines Third ls, glimpse runs and returns a lock: 40 debug-log lines Fourth ls, glimpse matches local lock: 19 debug-log lines This can be condensed somewhat when "instant cancellation" is possible for locks with no outstanding dirty pages to writeback. --- lustre/llite/llite_close.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index 03cdcda..3e1c195 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -132,8 +132,8 @@ static void ll_close_done_writing(struct inode *inode) if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags)) goto rpc; - rc = ll_extent_lock_no_validate(NULL, inode, lli->lli_smd, LCK_PW, - &policy, &lockh, ast_flags); + rc = ll_extent_lock(NULL, inode, lli->lli_smd, LCK_PW, &policy, &lockh, + ast_flags); if (rc != ELDLM_OK) { CERROR("lock acquisition failed (%d): unable to send " "DONE_WRITING for inode %lu/%u\n", rc, inode->i_ino, -- 1.8.3.1