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

MDT can skip sync if the object is synced yet

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.13.0
    • Upstream
    • None
    • 9223372036854775807

    Description

      mdt_object_sync() can skip sync if the version stored in the object is declared committed

      Attachments

        Activity

          [LU-11456] MDT can skip sync if the object is synced yet
          pjones Peter Jones added a comment -

          Landed for 2.13

          pjones Peter Jones added a comment - Landed for 2.13

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33266/
          Subject: LU-11456 mdt: mdt_object_sync() can skip sync
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 2291c21d174ac0a88f2c3b0551362079c963df16

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33266/ Subject: LU-11456 mdt: mdt_object_sync() can skip sync Project: fs/lustre-release Branch: master Current Patch Set: Commit: 2291c21d174ac0a88f2c3b0551362079c963df16

          created LU-11462 to track ZFS-specific solution.

          bzzz Alex Zhuravlev added a comment - created LU-11462 to track ZFS-specific solution.

          yes, I think we can improve this a bit more as each OSD could check whether specific state has been already sent to disk and skip another skip just waiting for the previous one to complete.
          at least for ZFS this is relatively easy, need to think about ldiskfs..

          bzzz Alex Zhuravlev added a comment - yes, I think we can improve this a bit more as each OSD could check whether specific state has been already sent to disk and skip another skip just waiting for the previous one to complete. at least for ZFS this is relatively easy, need to think about ldiskfs..

          I also see in the osd-zfs code:

          static int osd_object_sync(const struct lu_env *env, struct dt_object *dt,
                                     __u64 start, __u64 end)
          {
                  struct osd_device *osd = osd_obj2dev(osd_dt_obj(dt));
                  ENTRY;
                  
                  /* XXX: no other option than syncing the whole filesystem until we
                   * support ZIL.  If the object tracked the txg that it was last
                   * modified in, it could pass that txg here instead of "0".  Maybe
                   * the changes are already committed, so no wait is needed at all? */
                  if (!osd->od_dt_dev.dd_rdonly) {
                          if (osd_object_sync_delay_us < 0)
                                  txg_wait_synced(dmu_objset_pool(osd->od_os), 0ULL);
                          else
                                  udelay(osd_object_sync_delay_us);
                  } 
                   
                  RETURN(0);
          }
          
          adilger Andreas Dilger added a comment - I also see in the osd-zfs code: static int osd_object_sync( const struct lu_env *env, struct dt_object *dt, __u64 start, __u64 end) { struct osd_device *osd = osd_obj2dev(osd_dt_obj(dt)); ENTRY; /* XXX: no other option than syncing the whole filesystem until we * support ZIL. If the object tracked the txg that it was last * modified in, it could pass that txg here instead of "0" . Maybe * the changes are already committed, so no wait is needed at all? */ if (!osd->od_dt_dev.dd_rdonly) { if (osd_object_sync_delay_us < 0) txg_wait_synced(dmu_objset_pool(osd->od_os), 0ULL); else udelay(osd_object_sync_delay_us); } RETURN(0); }

          Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33266
          Subject: LU-11456 mdt: mdt_object_sync() can skip sync
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 03d8b8f3eb66c839041176e4f3149de4811f88c1

          gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33266 Subject: LU-11456 mdt: mdt_object_sync() can skip sync Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 03d8b8f3eb66c839041176e4f3149de4811f88c1

          People

            bzzz Alex Zhuravlev
            bzzz Alex Zhuravlev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: