From 3a9b94929b3d7d272256ec1310ed0c362d818433 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 6 Oct 2009 22:43:44 +0000 Subject: [PATCH] b=20603 i=rahul i=rread use sync output for changelog so we don't overflow buffer --- lustre/obdclass/llog_obd.c | 2 +- lustre/utils/lfs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c index 8c7196f..c0fb21b 100644 --- a/lustre/obdclass/llog_obd.c +++ b/lustre/obdclass/llog_obd.c @@ -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); } diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index b11f16b..b5e54b4 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -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", -- 1.8.3.1