[LU-11456] MDT can skip sync if the object is synced yet Created: 02/Oct/18  Updated: 09/Aug/19  Resolved: 09/Aug/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Upstream
Fix Version/s: Lustre 2.13.0

Type: Improvement Priority: Minor
Reporter: Alex Zhuravlev Assignee: Alex Zhuravlev
Resolution: Fixed Votes: 0
Labels: None

Rank (Obsolete): 9223372036854775807

 Description   

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



 Comments   
Comment by Gerrit Updater [ 02/Oct/18 ]

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

Comment by Andreas Dilger [ 02/Oct/18 ]

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);
}
Comment by Alex Zhuravlev [ 03/Oct/18 ]

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..

Comment by Alex Zhuravlev [ 03/Oct/18 ]

created LU-11462 to track ZFS-specific solution.

Comment by Gerrit Updater [ 09/Aug/19 ]

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

Comment by Peter Jones [ 09/Aug/19 ]

Landed for 2.13

Generated at Sat Feb 10 02:44:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.