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

lod_get_default_lov_striping() misinterprets composite striping for append

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      In lod_get_default_lov_striping() if the default striping is composite and dah_append_stripes is non zero then we try to read lmm_pattern from a struct lov_comp_md_v1 which isn't really there and we get confused.

      To reproduce:

      $LUSTRE/tets/llmount.sh 
      POOL=lustre.pool0
      lctl pool_new $POOL
      lctl pool_add $POOL OST0000
      lctl pool_add $POOL OST0001
      lfs setstripe -E 1M -c 1 -p $POOL -E 2M -c 2 -p $POOL -E eof -c -1 /mnt/lustre
      lctl set_param debug='+layout trace'
      lctl clear echo XXX >> /mnt/lustre/f0
      lctl dk | grep lod_get_default_lov_striping
      

      Output:

      00000004:00000001:1.0:1649345555.830519:0:1905344:0:(lod_object.c:5263:lod_get_default_lov_striping()) Process entered
      00000004:00000001:1.0:1649345555.830540:0:1905344:0:(lod_object.c:5347:lod_get_default_lov_striping()) Process leaving (rc=18446744073709551594 : -22 : ffffffffffffffea)
      00000004:00000001:1.0:1649345555.830543:0:1905344:0:(lod_object.c:5263:lod_get_default_lov_striping()) Process entered
      00000004:00000001:1.0:1649345555.830553:0:1905344:0:(lod_object.c:5347:lod_get_default_lov_striping()) Process leaving rc=18446744073709551594 : -22 : ffffffffffffffea)
      
                      if (!lov_pattern_supported(v1->lmm_pattern) &&
                          !(v1->lmm_pattern & LOV_PATTERN_F_RELEASED)) {
      			lod_free_def_comp_entries(lds);
                              RETURN(-EINVAL);
                      }
      

      This is because we use composite in two different senses: lti_ea_store contains a composite layout, and we should return a composite layout.

      Attachments

        Issue Links

          Activity

            [LU-15727] lod_get_default_lov_striping() misinterprets composite striping for append
            pjones Peter Jones added a comment -

            green  should we try reverting this patch to confirm?

            pjones Peter Jones added a comment - green   should we try reverting this patch to confirm?
            green Oleg Drokin added a comment -

            I feel like LU-16014 is a regression introduced by this patch

            green Oleg Drokin added a comment - I feel like LU-16014 is a regression introduced by this patch
            pjones Peter Jones added a comment -

            Landed for 2.16

            pjones Peter Jones added a comment - Landed for 2.16

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47014/
            Subject: LU-15727 lod: honor append_pool with default composite layouts
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 03963106926883cf322e085feb8caa3ea64db1d1

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47014/ Subject: LU-15727 lod: honor append_pool with default composite layouts Project: fs/lustre-release Branch: master Current Patch Set: Commit: 03963106926883cf322e085feb8caa3ea64db1d1

            I don't really have an opinion here - Andreas' comment seems reasonable to me.

            paf0186 Patrick Farrell added a comment - I don't really have an opinion here - Andreas' comment seems reasonable to me.
            adilger Andreas Dilger added a comment - - edited

            IMHO, the appended file should still be a plain layout file on an OST using the mdd.*.append_* parameters. Using a DoM file for append could cause grief if the file grows very large, as there wouldn't be any way to limit the size. I think this is reasonable and straight forward until/if there is a fix that avoids instantiating all components of an appended file.

            adilger Andreas Dilger added a comment - - edited IMHO, the appended file should still be a plain layout file on an OST using the mdd.*.append_* parameters. Using a DoM file for append could cause grief if the file grows very large, as there wouldn't be any way to limit the size. I think this is reasonable and straight forward until/if there is a fix that avoids instantiating all components of an appended file.
            jhammond John Hammond added a comment -

            adilger, paf0186
            When the default striping is PFL with a DoM component then what should happen for O_APPEND:

            # lfs setstripe -L mdt -E 1M -E -1 -c 2 .
            # echo XXXX >> f0
            

            What should the striping be?

            jhammond John Hammond added a comment - adilger , paf0186 When the default striping is PFL with a DoM component then what should happen for O_APPEND: # lfs setstripe -L mdt -E 1M -E -1 -c 2 . # echo XXXX >> f0 What should the striping be?

            "John L. Hammond <jhammond@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47014
            Subject: LU-15727 lod: honor append_pool with default composite layouts
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 69eb62ad9432dbb15a871f9e8ee6dbf3d3aa8a48

            gerrit Gerrit Updater added a comment - "John L. Hammond <jhammond@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47014 Subject: LU-15727 lod: honor append_pool with default composite layouts Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 69eb62ad9432dbb15a871f9e8ee6dbf3d3aa8a48

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: