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

Lustre grants flock exclusive locks on two file descriptors for the same file

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.1.0
    • Lustre 2.1.0
    • None
    • 3
    • 22,660
    • 5058

    Description

      Lustre grants flock exclusive locks on two file descriptors for the same
      file in the same process. However, the second flock SHOULD fail.

      Fortunately, the VFS already has the correct behavior. And since we are
      already calling the flock_lock_file_wait() or posix_lock_file_wait() VFS
      calls, we just need to record that return code and return it in
      ll_file_lock().

      This patch was already landed on 1.8, needs to land on master.

      Attachments

        Activity

          [LU-104] Lustre grants flock exclusive locks on two file descriptors for the same file

          Integrated in hydra-server » x86_64,el5 #12
          Initial 'events' interface (LU-104, LU-122)

          john :
          Files :

          • monitor/lib/lustre_audit.py
          • monitor/static/images/dialog-error.png
          • settings.py
          • monitor/urls.py
          • monitor/views.py
          • monitor/static/css/base.css
          • monitor/templates/events.html
          • monitor/models.py
          • monitor/bin/hydra-debug.py
          • monitor/static/images/dialog-warning.png
          • monitor/templates/base.html
          • monitor/static/images/dialog-information.png
          hudson Build Master (Inactive) added a comment - Integrated in hydra-server » x86_64,el5 #12 Initial 'events' interface ( LU-104 , LU-122 ) john : Files : monitor/lib/lustre_audit.py monitor/static/images/dialog-error.png settings.py monitor/urls.py monitor/views.py monitor/static/css/base.css monitor/templates/events.html monitor/models.py monitor/bin/hydra-debug.py monitor/static/images/dialog-warning.png monitor/templates/base.html monitor/static/images/dialog-information.png

          Integrated in lustre-master » i686,client,el5,ofa #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/ldlm/ldlm_extent.c
          • lustre/llite/file.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/tests/flocks_test.c
          • lustre/ptlrpc/wiretest.c
          • lustre/ldlm/ldlm_plain.c
          • lustre/utils/wirecheck.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/tests/sanity.sh
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/tests/flock_test.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/ldlm/ldlm_request.c
          • lustre/include/lustre/lustre_idl.h
          • lustre/ldlm/ldlm_flock.c
          • lustre/utils/wiretest.c
          • lustre/include/lustre_dlm.h
          • lustre/tests/Makefile.am
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » i686,client,el5,ofa #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/ldlm/ldlm_extent.c lustre/llite/file.c lustre/ldlm/ldlm_internal.h lustre/tests/flocks_test.c lustre/ptlrpc/wiretest.c lustre/ldlm/ldlm_plain.c lustre/utils/wirecheck.c lustre/ldlm/ldlm_lockd.c lustre/tests/sanity.sh lustre/ldlm/ldlm_inodebits.c lustre/tests/flock_test.c lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_lock.c lustre/ldlm/ldlm_request.c lustre/include/lustre/lustre_idl.h lustre/ldlm/ldlm_flock.c lustre/utils/wiretest.c lustre/include/lustre_dlm.h lustre/tests/Makefile.am

          Integrated in lustre-master » x86_64,server,el5,inkernel #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/utils/wiretest.c
          • lustre/llite/file.c
          • lustre/ldlm/ldlm_flock.c
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_plain.c
          • lustre/tests/sanity.sh
          • lustre/ldlm/ldlm_lockd.c
          • lustre/tests/flock_test.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/ldlm/ldlm_extent.c
          • lustre/tests/flocks_test.c
          • lustre/tests/Makefile.am
          • lustre/include/lustre_dlm.h
          • lustre/include/lustre/lustre_idl.h
          • lustre/ldlm/ldlm_request.c
          • lustre/ptlrpc/wiretest.c
          • lustre/utils/wirecheck.c
          • lustre/ldlm/ldlm_lock.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » x86_64,server,el5,inkernel #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/utils/wiretest.c lustre/llite/file.c lustre/ldlm/ldlm_flock.c lustre/ldlm/ldlm_inodebits.c lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_plain.c lustre/tests/sanity.sh lustre/ldlm/ldlm_lockd.c lustre/tests/flock_test.c lustre/ldlm/ldlm_internal.h lustre/ldlm/ldlm_extent.c lustre/tests/flocks_test.c lustre/tests/Makefile.am lustre/include/lustre_dlm.h lustre/include/lustre/lustre_idl.h lustre/ldlm/ldlm_request.c lustre/ptlrpc/wiretest.c lustre/utils/wirecheck.c lustre/ldlm/ldlm_lock.c

          Integrated in lustre-master » i686,server,el5,inkernel #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/ldlm/ldlm_lock.c
          • lustre/include/lustre/lustre_idl.h
          • lustre/ldlm/ldlm_flock.c
          • lustre/tests/flock_test.c
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/ldlm/ldlm_lockd.c
          • lustre/ldlm/ldlm_request.c
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_plain.c
          • lustre/tests/flocks_test.c
          • lustre/tests/sanity.sh
          • lustre/ldlm/ldlm_extent.c
          • lustre/utils/wirecheck.c
          • lustre/tests/Makefile.am
          • lustre/ptlrpc/pack_generic.c
          • lustre/llite/file.c
          • lustre/ptlrpc/wiretest.c
          • lustre/utils/wiretest.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » i686,server,el5,inkernel #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/ldlm/ldlm_lock.c lustre/include/lustre/lustre_idl.h lustre/ldlm/ldlm_flock.c lustre/tests/flock_test.c lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_internal.h lustre/ldlm/ldlm_lockd.c lustre/ldlm/ldlm_request.c lustre/include/lustre_dlm.h lustre/ldlm/ldlm_plain.c lustre/tests/flocks_test.c lustre/tests/sanity.sh lustre/ldlm/ldlm_extent.c lustre/utils/wirecheck.c lustre/tests/Makefile.am lustre/ptlrpc/pack_generic.c lustre/llite/file.c lustre/ptlrpc/wiretest.c lustre/utils/wiretest.c

          Integrated in lustre-master » i686,server,el6,inkernel #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/include/lustre/lustre_idl.h
          • lustre/ldlm/ldlm_flock.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/tests/Makefile.am
          • lustre/llite/file.c
          • lustre/utils/wiretest.c
          • lustre/ldlm/ldlm_extent.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/tests/sanity.sh
          • lustre/ldlm/ldlm_internal.h
          • lustre/tests/flocks_test.c
          • lustre/tests/flock_test.c
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_plain.c
          • lustre/ptlrpc/wiretest.c
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_request.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/utils/wirecheck.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » i686,server,el6,inkernel #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/include/lustre/lustre_idl.h lustre/ldlm/ldlm_flock.c lustre/ldlm/ldlm_lockd.c lustre/tests/Makefile.am lustre/llite/file.c lustre/utils/wiretest.c lustre/ldlm/ldlm_extent.c lustre/ptlrpc/pack_generic.c lustre/tests/sanity.sh lustre/ldlm/ldlm_internal.h lustre/tests/flocks_test.c lustre/tests/flock_test.c lustre/include/lustre_dlm.h lustre/ldlm/ldlm_plain.c lustre/ptlrpc/wiretest.c lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_request.c lustre/ldlm/ldlm_lock.c lustre/utils/wirecheck.c

          Integrated in lustre-master » x86_64,client,ubuntu1004,ofa #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/tests/flock_test.c
          • lustre/llite/file.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_plain.c
          • lustre/ptlrpc/wiretest.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/ldlm/ldlm_flock.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/tests/sanity.sh
          • lustre/tests/flocks_test.c
          • lustre/utils/wiretest.c
          • lustre/include/lustre_dlm.h
          • lustre/utils/wirecheck.c
          • lustre/ldlm/ldlm_request.c
          • lustre/tests/Makefile.am
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_extent.c
          • lustre/include/lustre/lustre_idl.h
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » x86_64,client,ubuntu1004,ofa #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/tests/flock_test.c lustre/llite/file.c lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_plain.c lustre/ptlrpc/wiretest.c lustre/ldlm/ldlm_lock.c lustre/ldlm/ldlm_lockd.c lustre/ldlm/ldlm_flock.c lustre/ldlm/ldlm_internal.h lustre/tests/sanity.sh lustre/tests/flocks_test.c lustre/utils/wiretest.c lustre/include/lustre_dlm.h lustre/utils/wirecheck.c lustre/ldlm/ldlm_request.c lustre/tests/Makefile.am lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_extent.c lustre/include/lustre/lustre_idl.h

          Integrated in lustre-master » i686,server,el5,ofa #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/tests/flocks_test.c
          • lustre/tests/Makefile.am
          • lustre/utils/wiretest.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/ldlm/ldlm_lockd.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/include/lustre/lustre_idl.h
          • lustre/tests/sanity.sh
          • lustre/ldlm/ldlm_request.c
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_extent.c
          • lustre/utils/wirecheck.c
          • lustre/ldlm/ldlm_plain.c
          • lustre/tests/flock_test.c
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_flock.c
          • lustre/llite/file.c
          • lustre/ptlrpc/wiretest.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » i686,server,el5,ofa #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/tests/flocks_test.c lustre/tests/Makefile.am lustre/utils/wiretest.c lustre/ldlm/ldlm_internal.h lustre/ldlm/ldlm_lockd.c lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_lock.c lustre/include/lustre/lustre_idl.h lustre/tests/sanity.sh lustre/ldlm/ldlm_request.c lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_extent.c lustre/utils/wirecheck.c lustre/ldlm/ldlm_plain.c lustre/tests/flock_test.c lustre/include/lustre_dlm.h lustre/ldlm/ldlm_flock.c lustre/llite/file.c lustre/ptlrpc/wiretest.c

          Integrated in lustre-master » x86_64,client,el6,inkernel #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/ldlm/ldlm_flock.c
          • lustre/tests/sanity.sh
          • lustre/ptlrpc/wiretest.c
          • lustre/ldlm/ldlm_request.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/tests/Makefile.am
          • lustre/utils/wiretest.c
          • lustre/include/lustre/lustre_idl.h
          • lustre/ldlm/ldlm_extent.c
          • lustre/llite/file.c
          • lustre/tests/flocks_test.c
          • lustre/ldlm/ldlm_plain.c
          • lustre/utils/wirecheck.c
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/tests/flock_test.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » x86_64,client,el6,inkernel #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/ldlm/ldlm_flock.c lustre/tests/sanity.sh lustre/ptlrpc/wiretest.c lustre/ldlm/ldlm_request.c lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_lock.c lustre/ldlm/ldlm_lockd.c lustre/tests/Makefile.am lustre/utils/wiretest.c lustre/include/lustre/lustre_idl.h lustre/ldlm/ldlm_extent.c lustre/llite/file.c lustre/tests/flocks_test.c lustre/ldlm/ldlm_plain.c lustre/utils/wirecheck.c lustre/include/lustre_dlm.h lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_internal.h lustre/tests/flock_test.c

          Integrated in lustre-master » x86_64,client,el5,ofa #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/tests/Makefile.am
          • lustre/tests/sanity.sh
          • lustre/tests/flock_test.c
          • lustre/ldlm/ldlm_extent.c
          • lustre/utils/wiretest.c
          • lustre/ldlm/ldlm_flock.c
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_plain.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/include/lustre/lustre_idl.h
          • lustre/ptlrpc/pack_generic.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/tests/flocks_test.c
          • lustre/ldlm/ldlm_inodebits.c
          • lustre/ldlm/ldlm_internal.h
          • lustre/ldlm/ldlm_request.c
          • lustre/ptlrpc/wiretest.c
          • lustre/utils/wirecheck.c
          • lustre/llite/file.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » x86_64,client,el5,ofa #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/tests/Makefile.am lustre/tests/sanity.sh lustre/tests/flock_test.c lustre/ldlm/ldlm_extent.c lustre/utils/wiretest.c lustre/ldlm/ldlm_flock.c lustre/include/lustre_dlm.h lustre/ldlm/ldlm_plain.c lustre/ldlm/ldlm_lock.c lustre/include/lustre/lustre_idl.h lustre/ptlrpc/pack_generic.c lustre/ldlm/ldlm_lockd.c lustre/tests/flocks_test.c lustre/ldlm/ldlm_inodebits.c lustre/ldlm/ldlm_internal.h lustre/ldlm/ldlm_request.c lustre/ptlrpc/wiretest.c lustre/utils/wirecheck.c lustre/llite/file.c

          Integrated in lustre-master » i686,client,el6,inkernel #101
          LU-104 Properly address ownership of posix and flock locks

          Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f
          Files :

          • lustre/tests/flocks_test.c
          • lustre/tests/Makefile.am
          • lustre/include/lustre/lustre_idl.h
          • lustre/include/lustre_dlm.h
          • lustre/ldlm/ldlm_internal.h
          • lustre/ldlm/ldlm_plain.c
          • lustre/utils/wiretest.c
          • lustre/ldlm/ldlm_extent.c
          • lustre/llite/file.c
          • lustre/ptlrpc/pack_generic.c
          • lustre/utils/wirecheck.c
          • lustre/ldlm/ldlm_lockd.c
          • lustre/ptlrpc/wiretest.c
          • lustre/ldlm/ldlm_request.c
          • lustre/ldlm/ldlm_flock.c
          • lustre/tests/sanity.sh
          • lustre/tests/flock_test.c
          • lustre/ldlm/ldlm_lock.c
          • lustre/ldlm/ldlm_inodebits.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-master » i686,client,el6,inkernel #101 LU-104 Properly address ownership of posix and flock locks Oleg Drokin : 3bb8d1b9656994b0313cdba6ad8eeb7b84f5ee9f Files : lustre/tests/flocks_test.c lustre/tests/Makefile.am lustre/include/lustre/lustre_idl.h lustre/include/lustre_dlm.h lustre/ldlm/ldlm_internal.h lustre/ldlm/ldlm_plain.c lustre/utils/wiretest.c lustre/ldlm/ldlm_extent.c lustre/llite/file.c lustre/ptlrpc/pack_generic.c lustre/utils/wirecheck.c lustre/ldlm/ldlm_lockd.c lustre/ptlrpc/wiretest.c lustre/ldlm/ldlm_request.c lustre/ldlm/ldlm_flock.c lustre/tests/sanity.sh lustre/tests/flock_test.c lustre/ldlm/ldlm_lock.c lustre/ldlm/ldlm_inodebits.c

          People

            green Oleg Drokin
            morrone Christopher Morrone (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: