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

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

    XMLWordPrintable

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: