Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.14.0
    • Lustre 2.14.0
    • 3
    • 9223372036854775807

    Description

      lustre_grow_msg_v2() should move memory region even if new size for buffer has already been set. The use case is when it is called via mdt_dom_read_on_open() and req_capsule_server_grow() in order to put DoM file content into RMF_NIOBUF_INLINE field (RQF_LDLM_INTENT_OPEN request with ldlm_intent_open_server format for server part). Indeed, there is another field RMF_FILE_SECCTX (and soon another one for encryption context support) after RMF_NIOBUF_INLINE.

      To achieve this, I will push a patch that adds an 'oldlen' parameter.

      Attachments

        Issue Links

          Activity

            [LU-13593] Fix growing message buffer
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38701/
            Subject: LU-13593 ptlrpc: fix growing message buffer
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 2c62cef8ae4107602664271627cf03ff859f7b21

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/38701/ Subject: LU-13593 ptlrpc: fix growing message buffer Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2c62cef8ae4107602664271627cf03ff859f7b21

            Correct, at least that is my intention with patch submitted under this Jira ticket
            But maybe my fix proposal is not ideal?

            sebastien Sebastien Buisson added a comment - Correct, at least that is my intention with patch submitted under this Jira ticket But maybe my fix proposal is not ideal?

            so problem is that next buffers after NIOBUF_INLINE were not moved? At the same time old code has part that suppose to move such tail, so it does that wrongly and you fixed that, right?

            tappro Mikhail Pershin added a comment - so problem is that next buffers after NIOBUF_INLINE  were not moved? At the same time old code has part that suppose to move such tail, so it does that wrongly and you fixed that, right?

            Hi Mike,

            With the path explained in the description of this ticket, new size of grown buffer RMF_NIOBUF_INLINE is set, but content of fields after it, like RMF_FILE_SECCTX, is not moved, which ends up in corrupted request content.
            In order to fix this problem I had to modify code according to patch https://review.whamcloud.com/38701.

            sebastien Sebastien Buisson added a comment - Hi Mike, With the path explained in the description of this ticket, new size of grown buffer RMF_NIOBUF_INLINE is set, but content of fields after it, like RMF_FILE_SECCTX , is not moved, which ends up in corrupted request content. In order to fix this problem I had to modify code according to patch https://review.whamcloud.com/38701 .

            Sebastien, I don't understand the reason of the patch still. Could you give an example why memcpy() is needed if size is set already? You mean the size was set but data weren't moved? Or something else?

            tappro Mikhail Pershin added a comment - Sebastien, I don't understand the reason of the patch still. Could you give an example why memcpy() is needed if size is set already? You mean the size was set but data weren't moved? Or something else?

            Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/38701
            Subject: LU-13593 ptlrpc: fix growing message buffer
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 37e5ca4de3f1ef810cdbe710145a7e776d9e3798

            gerrit Gerrit Updater added a comment - Sebastien Buisson (sbuisson@ddn.com) uploaded a new patch: https://review.whamcloud.com/38701 Subject: LU-13593 ptlrpc: fix growing message buffer Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 37e5ca4de3f1ef810cdbe710145a7e776d9e3798

            People

              sebastien Sebastien Buisson
              sebastien Sebastien Buisson
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: