Details

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

    Description

      LU-7906 osd: no blocksize on non-OST objects

      diff --git a/lustre/osd-zfs/osd_object.c b/lustre/osd-zfs/osd_object.c
      index fa9ec89..4079eeb 100644
      --- a/lustre/osd-zfs/osd_object.c
      +++ b/lustre/osd-zfs/osd_object.c
      @@ -1390,8 +1390,9 @@ static dmu_buf_t *osd_mkreg(const struct lu_env *env, struct osd_object *obj,
                                  struct lu_attr *la, uint64_t parent,
                                  struct osd_thandle *oh)
       {
      -       dmu_buf_t         *db;
      -       int                rc;
      +       const struct lu_fid *fid = lu_object_fid(&obj->oo_dt.do_lu);
      +       dmu_buf_t           *db;
      +       int                  rc;
              struct osd_device *osd = osd_obj2dev(obj);
      
              LASSERT(S_ISREG(la->la_mode));
      @@ -1406,7 +1407,7 @@ static dmu_buf_t *osd_mkreg(const struct lu_env *env, struct osd_object *obj,
               * blocksize is selected based on the file size rather than the
               * making broad assumptions based on the osd type.
               */
      -       if (!lu_device_is_md(osd2lu_dev(osd))) {
      +       if ((fid_is_idif(fid) || fid_is_norm(fid)) && osd->od_is_ost) {
                      rc = -dmu_object_set_blocksize(osd->od_os, db->db_object,
                                                     osd->od_max_blksz, 0, oh->ot_tx);
                      if (unlikely(rc)) {
      

      Actually, the block size should be set on echo object as well.

      Attachments

        Issue Links

          Activity

            [LU-8748] set block size for zfs echo object
            pjones Peter Jones added a comment -

            Landed for 2.9

            pjones Peter Jones added a comment - Landed for 2.9

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/23323/
            Subject: LU-8748 osd-zfs: set block size of echo object
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 64191ab6bb01d909453fc318e038f80d8ef548d9

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/23323/ Subject: LU-8748 osd-zfs: set block size of echo object Project: fs/lustre-release Branch: master Current Patch Set: Commit: 64191ab6bb01d909453fc318e038f80d8ef548d9

            Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/23323
            Subject: LU-8748 osd-zfs: set block size of echo object
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: eaf9d24050595a91706e51b929c9fbb3d55a2520

            gerrit Gerrit Updater added a comment - Niu Yawei (yawei.niu@intel.com) uploaded a new patch: http://review.whamcloud.com/23323 Subject: LU-8748 osd-zfs: set block size of echo object Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: eaf9d24050595a91706e51b929c9fbb3d55a2520

            People

              niu Niu Yawei (Inactive)
              niu Niu Yawei (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: