Whamcloud - gitweb
LU-15850 mdt: pack default LMV in open reply
[fs/lustre-release.git] / lustre / mdc / mdc_changelog.c
index 843c4de..c3a65f0 100644 (file)
@@ -228,6 +228,11 @@ static int chlg_read_cat_process_cb(const struct lu_env *env,
                RETURN(rc);
        }
 
+       /* Check if we can skip the entire llog plain */
+       if (llog_is_plain_skipable(llh->lgh_hdr, hdr, rec->cr.cr_index,
+                                  crs->crs_start_offset))
+               RETURN(LLOG_SKIP_PLAIN);
+
        /* Skip undesired records */
        if (rec->cr.cr_index < crs->crs_start_offset)
                RETURN(0);
@@ -826,7 +831,7 @@ int mdc_changelog_cdev_init(struct obd_device *obd)
 
        rc = chlg_minor_alloc(&minor);
        if (rc)
-               GOTO(out_unlock, rc);
+               GOTO(out_listrm, rc);
 
        device_initialize(&entry->ced_device);
        entry->ced_device.devt = MKDEV(MAJOR(mdc_changelog_dev), minor);
@@ -854,6 +859,7 @@ out_device_name:
 out_minor:
        chlg_minor_free(minor);
 
+out_listrm:
        list_del_init(&obd->u.cli.cl_chg_dev_linkage);
        list_del(&entry->ced_link);