[LU-12296] ll_dom_lock_cancel() should zero kms attribute Created: 14/May/19  Updated: 03/Nov/20  Resolved: 24/Jul/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.13.0, Lustre 2.12.6

Type: Bug Priority: Minor
Reporter: Vladimir Saveliev Assignee: Vladimir Saveliev
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

ll_dom_lock_cancel() should set lov->lloi_kms to 0 like in mdc_ldlm_blocking_ast(). Otherwise, obsolete file size can be brought back.

The below test illustrates the issue:

test_5() {
        $MULTIOP $DIR1/$tfile Oz40960w100_z200w100c &
        MULTIPID=$!

        # let MULTIPID to create the file                                                                                                                                            
        sleep 1
        $MULTIOP $DIR2/$tfile oO_RDWR:Tw100c
        kill -USR1 $MULTIPID
        wait
        $MULTIOP $DIR2/$tfile oO_RDWR:z400w100c
        $CHECKSTAT -s 500 $DIR2/$tfile || error "wrong size"
}
run_test 5 "Race two writes, check file size"

The $DIR2/$tfile should be 500 bytes at the end. We get 4096.

== sanity-dom test 5: Race two writes, check file size =============================================== 12:29:42 (1557826182)
/mnt/lustre2/f5.sanity-dom has size 4096, not 500
 sanity-dom test_5: @@@@@@ FAIL: wrong size 
  Trace dump:
  = /home/vs/lustre-release/lustre/tests/test-framework.sh:5873:error()
  = sanity-dom.sh:133:test_5()
  = /home/vs/lustre-release/lustre/tests/test-framework.sh:6160:run_one()
  = /home/vs/lustre-release/lustre/tests/test-framework.sh:6199:run_one_logged()
  = /home/vs/lustre-release/lustre/tests/test-framework.sh:5998:run_test()
  = sanity-dom.sh:135:main()
Dumping lctl log to /tmp/test_logs/1557826153/sanity-dom.test_5.*.1557826183.log
Dumping logs only on local client.
Resetting fail_loc on all nodes...done.

 



 Comments   
Comment by Gerrit Updater [ 14/May/19 ]

Vladimir Saveliev (c17830@cray.com) uploaded a new patch: https://review.whamcloud.com/34858
Subject: LU-12296 llite: clear KMS on DoM lock cancel
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 805ee4ee0cd9fe926700d786ace2103a1070b9ac

Comment by Gerrit Updater [ 24/Jul/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34858/
Subject: LU-12296 llite: improve ll_dom_lock_cancel
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 707bab62f5d6c704b30e4ee9e769b5c9f026e1e7

Comment by Peter Jones [ 24/Jul/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 16/Oct/20 ]

Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40277
Subject: LU-12296 llite: ll_dom_lock_cancel() KMS fixes
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: f35dd0ca455172913916411886758112514e3408

Comment by Gerrit Updater [ 19/Oct/20 ]

Mike Pershin (mpershin@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40296
Subject: LU-12296 llite: improve ll_dom_lock_cancel
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: b1352e2139481852bb58b0147d0c133d77e1293e

Comment by Gerrit Updater [ 03/Nov/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40296/
Subject: LU-12296 llite: improve ll_dom_lock_cancel
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 98ee0d5b10858287c74e1b7d51129b7a5fd97ae9

Generated at Sat Feb 10 02:51:20 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.