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

Remove triple buffer update from llog_osd_write_blob()

Details

    • Improvement
    • Resolution: Duplicate
    • Blocker
    • None
    • Lustre 2.6.0
    • None
    • 13537

    Description

      The llog_osd_write_blob() have two ways to update llog record, the first one is just normal record write with header, buffer and tail at once, the second is actually three separate writes for header, buffer and tail. The latest produces number of troubles because one of three writes may fail causing partially written buffer and corrupted llog. There is special undo procedure to clean things up after that. All of these demands twice more credits for normal operations and for undo case which is critical in case of wide striping.

      Meanwhile this particular triple write case is used only by MGS and can be avoided by preparing correct llog record before calling llog_write(). That would require additional memory allocations to prepare write buffer.

      Attachments

        Issue Links

          Activity

            [LU-4901] Remove triple buffer update from llog_osd_write_blob()

            Reopening to remove fix version as this is a duplicate

            jlevi Jodi Levi (Inactive) added a comment - Reopening to remove fix version as this is a duplicate

            Duplicate of LU-4528.

            jlevi Jodi Levi (Inactive) added a comment - Duplicate of LU-4528 .

            While you are in here, can you please change osd_trans_exec_op():

                            if (unlikely(rb >= OSD_OT_MAX)) {
                                    if (unlikely(ldiskfs_track_declares_assert))
                                            LASSERTF(rb < OSD_OT_MAX, "rb = %u\n", rb);
                                    else {
                                            CWARN("%s: Invalid rollback index %d\n",
                                                  osd_name(oti->oti_dev), rb);
                                            libcfs_debug_dumpstack(NULL);
                                            return;
                                    }
                            }
            

            so that it has proper braces around the "if" part of these checks, and only prints this CWARN() and dumpstack once per mount. Otherwise it spews to the stack.

            adilger Andreas Dilger added a comment - While you are in here, can you please change osd_trans_exec_op(): if (unlikely(rb >= OSD_OT_MAX)) { if (unlikely(ldiskfs_track_declares_assert)) LASSERTF(rb < OSD_OT_MAX, "rb = %u\n" , rb); else { CWARN( "%s: Invalid rollback index %d\n" , osd_name(oti->oti_dev), rb); libcfs_debug_dumpstack(NULL); return ; } } so that it has proper braces around the "if" part of these checks, and only prints this CWARN() and dumpstack once per mount. Otherwise it spews to the stack.

            People

              tappro Mikhail Pershin
              tappro Mikhail Pershin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: