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

Remove obsollete nidtbl swabbing code

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.7.0
    • Lustre 2.7.0
    • 3
    • 14871

    Description

      lustre/ldlm/ldlm_lib.c has this warning that needs to be fixed:

      #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 51, 0)
              /* 2.2.0 clients always swab nidtbl entries due to a bug, so server
               * will do the swabbing for if the client is using the same endianness.
               *
               * This fixup is version-limited, because we don't want to carry the
               * OBD_CONNECT_MNE_SWAB flag around forever, just so long as we need
               * interop with unpatched 2.2 clients.  For newer clients, servers
               * will never do MNE swabbing, let the client handle that.  LU-1644 */
              export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) &&
                              !(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB);
      #else
      #warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and exp_need_mne_swab"
      #endif
      

      Attachments

        Issue Links

          Activity

            [LU-5329] Remove obsollete nidtbl swabbing code

            Patch removing obsolete code landed to master (pre-2.7)

            jamesanunez James Nunez (Inactive) added a comment - Patch removing obsolete code landed to master (pre-2.7)

            Proposed patch to remove obsolete code is at http://review.whamcloud.com/12010

            jamesanunez James Nunez (Inactive) added a comment - Proposed patch to remove obsolete code is at http://review.whamcloud.com/12010

            I'm reopening this ticket so that we can post the patch that actually removes the nidtbl swab code here.

            There are four sections of code that should be deleted as part of this patch:

            In file lustre/ldlm/ldlm_lib.c, routine target_handle_connect(),

            #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                            /* 2.2.0 clients always swab nidtbl entries due to a bug, so server
                            * will do the swabbing for if the client is using the same endianness.
                            *
                            * This fixup is version-limited, because we don't want to carry the
                            * OBD_CONNECT_MNE_SWAB flag around forever, just so long as we need
                            * interop with unpatched 2.2 clients.  For newer clients, servers
                            * will never do MNE swabbing, let the client handle that.  LU-1644 */
                            export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) &&
                                                            !(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB);
            #endif
            

            and in file lustre/mgs/mgs_nids., routine mgs_nidtbl_read(),

            #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                                                                            /* May need to swab back to update the length.*/
                                                                            if (exp->exp_need_mne_swab)
                                                                                            lustre_swab_mgs_nidtbl_entry(last_in_unit);
            #endif
            

            In mgs_nidtbl_read(),

            #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                                                                            if (exp->exp_need_mne_swab)
                                                                                            lustre_swab_mgs_nidtbl_entry(last_in_unit);
            #endif
            

            In mgs_nidtbl_read(),

            #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0)
                                            /* For LU-1644, swab entry for 2.2 clients. */
                                            if (exp->exp_need_mne_swab)
                                                            lustre_swab_mgs_nidtbl_entry(entry);
            #endif
            
            

            I'm happy to upload a patch for this code removal when 2.6.53 is tagged.

            jamesanunez James Nunez (Inactive) added a comment - I'm reopening this ticket so that we can post the patch that actually removes the nidtbl swab code here. There are four sections of code that should be deleted as part of this patch: In file lustre/ldlm/ldlm_lib.c, routine target_handle_connect(), #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0) /* 2.2.0 clients always swab nidtbl entries due to a bug, so server * will do the swabbing for if the client is using the same endianness. * * This fixup is version-limited, because we don't want to carry the * OBD_CONNECT_MNE_SWAB flag around forever, just so long as we need * interop with unpatched 2.2 clients. For newer clients, servers * will never do MNE swabbing, let the client handle that. LU-1644 */ export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) && !(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB); #endif and in file lustre/mgs/mgs_nids., routine mgs_nidtbl_read(), #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0) /* May need to swab back to update the length.*/ if (exp->exp_need_mne_swab) lustre_swab_mgs_nidtbl_entry(last_in_unit); #endif In mgs_nidtbl_read(), #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0) if (exp->exp_need_mne_swab) lustre_swab_mgs_nidtbl_entry(last_in_unit); #endif In mgs_nidtbl_read(), #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(2, 6, 53, 0) /* For LU-1644, swab entry for 2.2 clients. */ if (exp->exp_need_mne_swab) lustre_swab_mgs_nidtbl_entry(entry); #endif I'm happy to upload a patch for this code removal when 2.6.53 is tagged.

            Patch landed to Master.

            jlevi Jodi Levi (Inactive) added a comment - Patch landed to Master.

            Emoly,
            Could you please rebase Change, 8630?

            jlevi Jodi Levi (Inactive) added a comment - Emoly, Could you please rebase Change, 8630?

            I disable this code as part of http://review.whamcloud.com/8630 after 2.6.53, among other cleanups.

            It would be great if you could move that patch along to landing. The code could then be deleted in a separate patch as part of this bug.

            adilger Andreas Dilger added a comment - I disable this code as part of http://review.whamcloud.com/8630 after 2.6.53, among other cleanups. It would be great if you could move that patch along to landing. The code could then be deleted in a separate patch as part of this bug.

            Andreas can comment this.

            jay Jinshan Xiong (Inactive) added a comment - Andreas can comment this.
            emoly.liu Emoly Liu added a comment - - edited

            I saw this code from http://review.whamcloud.com/#/c/3897/. So we haven't worked with 2.2 clients any more since 2.6.50, right? Then, do I need to remove other parts of code introduced by the fixes of LU-1644 as well?

            emoly.liu Emoly Liu added a comment - - edited I saw this code from http://review.whamcloud.com/#/c/3897/ . So we haven't worked with 2.2 clients any more since 2.6.50, right? Then, do I need to remove other parts of code introduced by the fixes of LU-1644 as well?
            pjones Peter Jones added a comment -

            Emoly

            Could you please look into this one?

            Thanks

            Peter

            pjones Peter Jones added a comment - Emoly Could you please look into this one? Thanks Peter

            People

              emoly.liu Emoly Liu
              green Oleg Drokin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: