summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-14 06:31:10 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-14 05:38:12 -0700
commita9cbdd2916ab6851d108833e30536c02bf502f17 (patch)
tree77ad7b14559db69a27b1c9e0094f0e71046c5672
parent7b591588b3031d0c6351d7c0a4626caad5fb3263 (diff)
posix: fix an issue with existing data in case of readdirv3.1.0qa22
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1597 (readdirp fails if there is old data in the subvolumes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1597
-rw-r--r--xlators/storage/posix/src/posix.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index 482a66e169c..551c93f6660 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -258,7 +258,7 @@ posix_lstat_with_gfid (xlator_t *this, const char *path, struct iatt *stbuf_p)
ret = posix_fill_gfid_path (this, path, &stbuf);
if (ret)
- gf_log (this->name, GF_LOG_DEBUG, "failed to set gfid");
+ gf_log (this->name, GF_LOG_DEBUG, "failed to get gfid");
if (stbuf_p)
*stbuf_p = stbuf;
@@ -3968,9 +3968,12 @@ posix_do_readdir (call_frame_t *frame, xlator_t *this,
*/
if ((whichop == GF_FOP_READDIRP) || (priv->span_devices)) {
strcpy (entry_path + real_path_len + 1, entry->d_name);
- op_ret = posix_lstat_with_gfid (this, entry_path, &stbuf);
- if (-1 == op_ret)
- continue;
+ /* Don't check for return value of below function.
+ * because, if there is some data already existing,
+ * (before gfid changes), this function fails to fill
+ * gfid info (but gets the 'struct iatt' properly).
+ */
+ posix_lstat_with_gfid (this, entry_path, &stbuf);
} else
stbuf.ia_ino = entry->d_ino;