Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12296

ll_dom_lock_cancel() should zero kms attribute

Details

    • 3
    • 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.
      

       

      Attachments

        Activity

          People

            vsaveliev Vladimir Saveliev
            vsaveliev Vladimir Saveliev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: