Whamcloud - gitweb
Some last b_size work:
authorphil <phil>
Thu, 19 Feb 2004 15:55:41 +0000 (15:55 +0000)
committerphil <phil>
Thu, 19 Feb 2004 15:55:41 +0000 (15:55 +0000)
- 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

index 03cdcda..3e1c195 100644 (file)
@@ -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,