From: bobijam Date: Wed, 28 Nov 2007 02:33:36 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_7_0_51~458 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c8efa7507e389a1ed5dd420c3f6e6400b80bb761;hp=bd8b65394f0a1ffd0c7f8dd0d875c55ba219d9ec Branch HEAD b=14270 i=johann, kalpak.shah Description: lfs find does not continue on file error Details : Continue other files processing when a file/dir is absent. --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index b514c22..821a4f5 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -12,6 +12,12 @@ * Recommended e2fsprogs version: 1.40.2-cfs4 * Note that reiserfs quotas are disabled on SLES 10 in this kernel. +Severity : major +Frequency : always +Bugzilla : 14270 +Description: lfs find does not continue on file error +Details : Continue other files processing when a file/dir is absent. + Severity : normal Bugzilla : 11791 Description: Inconsistent usage of lustre_pack_reply() diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index 5ea3ee8..66b1604 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -743,6 +743,10 @@ static int cb_find_init(char *path, DIR *parent, DIR *dir, void *data) __FUNCTION__, path); return ret; } + } else if (errno == ENOENT) { + err_msg("warning: %s: %s does not exist", + __FUNCTION__, path); + goto decided; } else { err_msg("error: %s: %s failed for %s", __FUNCTION__, dir ? "LL_IOC_MDC_GETINFO" : @@ -856,9 +860,15 @@ static int cb_find_init(char *path, DIR *parent, DIR *dir, void *data) } if (ret) { - fprintf(stderr, "%s: IOC_LOV_GETINFO on %s failed: " - "%s.\n", __FUNCTION__, path, strerror(errno)); - return -EINVAL; + if (errno == ENOENT) { + err_msg("warning: %s: %s does not exist", + __FUNCTION__, path); + goto decided; + } else { + fprintf(stderr, "%s: IOC_LOV_GETINFO on %s failed: " + "%s.\n", __FUNCTION__, path, strerror(errno)); + return ret; + } } /* Check the time on osc. */ @@ -957,6 +967,10 @@ static int cb_getstripe(char *path, DIR *parent, DIR *d, void *data) } else if (errno == ENOTTY) { fprintf(stderr, "%s: '%s' not on a Lustre fs?\n", __FUNCTION__, path); + } else if (errno == ENOENT) { + err_msg("warning: %s: %s does not exist", + __FUNCTION__, path); + goto out; } else { err_msg("error: %s: %s failed for %s", __FUNCTION__, d ? "LL_IOC_LOV_GETSTRIPE" : @@ -1286,6 +1300,10 @@ static int cb_quotachown(char *path, DIR *parent, DIR *d, void *data) fprintf(stderr, "%s has no stripe info\n", path); rc = 0; + } else if (errno == ENOENT) { + err_msg("warning: %s: %s does not exist", + __FUNCTION__, path); + rc = 0; } else if (errno != EISDIR) { rc = errno; err_msg("%s ioctl failed for %s.",