- 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.
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,