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

osd_ldiskfs_write_record(): do not update in-bh inode every time

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.14.0
    • Lustre 2.14.0, Lustre 2.12.6
    • 3
    • 9223372036854775807

    Description

      there is no point to update in-bh inode every call to osd_ldiskfs_write_record(), but
      the following construction makes it so:

              dirty_inode = test_and_set_bit(LDISKFS_INODE_JOURNAL_DATA,
                                             &ei->i_flags);
      ....
              if (dirty_inode)
                      osd_dirty_inode(inode, I_DIRTY_DATASYNC);
      

      there are two consequences:
      1) transaction can exceed declared credits as osd_declare_write() doesn't reserve inode for overwrite case (then current operation aborts with -ENOSPC and filesystem turns read-only)
      2) overwrites copy inode into buffer cache impacting performance, should be especially visible with changelogs enabled, where every record causes at least two separate writes

      Attachments

        Issue Links

          Activity

            [LU-14267] osd_ldiskfs_write_record(): do not update in-bh inode every time

            The backport above fixes the https://review.whamcloud.com/38705/ on the b2_12 branch.

            eaujames Etienne Aujames added a comment - The backport above fixes the https://review.whamcloud.com/38705/ on the b2_12 branch.

            Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/41174
            Subject: LU-14267 osd: do not update inode each write
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: 034b328cf68ad1878c17ea798764a06020e003ea

            gerrit Gerrit Updater added a comment - Etienne AUJAMES (eaujames@ddn.com) uploaded a new patch: https://review.whamcloud.com/41174 Subject: LU-14267 osd: do not update inode each write Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: 034b328cf68ad1878c17ea798764a06020e003ea
            pjones Peter Jones added a comment -

            Landed for 2.14

            pjones Peter Jones added a comment - Landed for 2.14

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41069/
            Subject: LU-14267 osd: do not update inode each write
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 620152339fe18f3a3cc317ab05a7e34adcc68098

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/41069/ Subject: LU-14267 osd: do not update inode each write Project: fs/lustre-release Branch: master Current Patch Set: Commit: 620152339fe18f3a3cc317ab05a7e34adcc68098

            This regression was introduced into master by commit v2_13_53-166-ga23aac2219 patch https://review.whamcloud.com/38281 "LU-13416 ldiskfs: don't corrupt data on journal replay" so the fix patch should be included into the 2.14.0 release.

            adilger Andreas Dilger added a comment - This regression was introduced into master by commit v2_13_53-166-ga23aac2219 patch https://review.whamcloud.com/38281 " LU-13416 ldiskfs: don't corrupt data on journal replay " so the fix patch should be included into the 2.14.0 release.

            Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41069
            Subject: LU-14267 osd: do not update inode each write
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: b72f6bb341277f6357549c13af9de6ef52b95b3a

            gerrit Gerrit Updater added a comment - Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/41069 Subject: LU-14267 osd: do not update inode each write Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: b72f6bb341277f6357549c13af9de6ef52b95b3a

            People

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

              Dates

                Created:
                Updated:
                Resolved: