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

mdt_object_open_lock() may not flush conflicting handles

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.13.0, Lustre 2.12.4
    • Lustre 2.6.0, Lustre 2.5.1
    • 3
    • 12075

    Description

      Calls to mdt_object_open_lock() which do not have MDS_OPEN_LOCK in open flags may fail to flush conflicting handles.

      t:~# rm /mnt/lustre/*
      t:~# ls /mnt/lustre/
      t:~# cp /bin/echo /mnt/lustre/echo
      t:~# lfs path2fid /mnt/lustre/echo
      [0x280000401:0x9:0x0]
      t:~# /mnt/lustre/echo Hi
      Hi
      t:~# lctl clear
      t:~# echo Bye > /mnt/lustre2/echo
      -bash: /mnt/lustre2/echo: Text file busy
      t:~# lctl dk > 2.dk
      
      00000004:00000002:0.0:1387473999.026142:0:15064:0:(mdt_open.c:1610:mdt_reint_open()) I am going to open [0x200000007:0x1:0x0]/(echo->[0x280000402:0x4:0x0]) cr_flag=01102 mode=0100666 msg_flag=0x0
      
      ** There is a typo in the CDEBUG for the next message, the open count
      ** is really printed.
      
              CDEBUG(D_INODE, "normal open:"DFID" lease count: %d, lm: %d\n",
                     PFID(mdt_object_fid(obj)),
                     atomic_read(&obj->mot_open_count), lm);
      
      00000004:00000002:0.0:1387473999.026365:0:15064:0:(mdt_open.c:1242:mdt_object_open_lock()) normal open:[0x280000401:0x9:0x0] lease count: 1, lm: 16
      
      A CR LOOKUP LAYOUT is granted:
      
      00000004:00000002:0.0:1387473999.026430:0:15064:0:(mdt_open.c:1269:mdt_object_open_lock()) Requested bits lock:[0x280000401:0x9:0x0], ibits = 0x9, open_flags = 01102, try_layout = 1, rc = 0
      00000004:00000001:0.0:1387473999.026433:0:15064:0:(mdt_open.c:1332:mdt_object_open_lock()) Process leaving via out (rc=0 : 0 : 0x0)
      
      00000004:00000001:0.0:1387473999.026456:0:15064:0:(mdt_open.c:536:mdt_write_get()) Process leaving (rc=18446744073709551590 : -26 : ffffffffffffffe6)
      00000004:00000001:0.0:1387473999.026458:0:15064:0:(mdt_open.c:723:mdt_mfd_open()) Process leaving (rc=18446744073709551590 : -26 : ffffffffffffffe6)
      00000004:00000001:0.0:1387473999.026459:0:15064:0:(mdt_open.c:994:mdt_finish_open()) Process leaving (rc=18446744073709551590 : -26 : ffffffffffffffe6)
      

      Attachments

        Issue Links

          Activity

            People

              guzheng Gu Zheng (Inactive)
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: