Whamcloud - gitweb
b=20603
authornathan <nathan>
Tue, 6 Oct 2009 22:43:44 +0000 (22:43 +0000)
committernathan <nathan>
Tue, 6 Oct 2009 22:43:44 +0000 (22:43 +0000)
i=rahul
i=rread
use sync output for changelog so we don't overflow buffer

lustre/obdclass/llog_obd.c
lustre/utils/lfs.c

index 8c7196f..c0fb21b 100644 (file)
@@ -444,7 +444,7 @@ int llog_obd_origin_add(struct llog_ctxt *ctxt,
         cathandle = ctxt->loc_handle;
         LASSERT(cathandle != NULL);
         rc = llog_cat_add_rec(cathandle, rec, logcookies, NULL);
-        if (rc != 1)
+        if (rc != 0 && rc != 1)
                 CERROR("write one catalog record failed: %d\n", rc);
         RETURN(rc);
 }
index b11f16b..b5e54b4 100644 (file)
@@ -2342,7 +2342,8 @@ static int lfs_changelog(int argc, char **argv)
                 endrec = strtoll(argv[optind++], NULL, 10);
 
         rc = llapi_changelog_start(&changelog_priv,
-                                   follow ? CHANGELOG_FLAG_FOLLOW : 0,
+                                   CHANGELOG_FLAG_BLOCK |
+                                   (follow ? CHANGELOG_FLAG_FOLLOW : 0),
                                    mdd, startrec);
         if (rc < 0) {
                 fprintf(stderr, "Can't start changelog: %s\n",