From: shadow Date: Tue, 16 Sep 2008 12:53:22 +0000 (+0000) Subject: be carefull about short read. X-Git-Tag: GIT_EPOCH_B_RELEASE_1_6_7~2^3~240 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=83e30d86429e718f06775266fc030f51a1db17b5;p=fs%2Flustre-release.git be carefull about short read. Branch b1_6 b=16679 i=tappro i=umka --- diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index dfcf144..4627507 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -795,11 +795,10 @@ int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd, CDEBUG(D_CONFIG, "cat list: disk size=%d, read=%d\n", (int)i_size_read(file->f_dentry->d_inode), size); + memset(idarray, 0, size); /* read for new ost index or for empty file */ - if (i_size_read(file->f_dentry->d_inode) < off) { - memset(idarray, 0, size); + if (i_size_read(file->f_dentry->d_inode) < off) GOTO(out, rc = 0); - } rc = fsfilt_read_record(disk_obd, file, idarray, size, &off); if (rc) {