diff options
| author | Pranith Kumar K <pkarampu@redhat.com> | 2016-05-31 21:51:22 +0530 | 
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2016-06-10 08:20:36 -0700 | 
| commit | 1a8da06eb3e6adcca730451c5abd1c76efa226dd (patch) | |
| tree | 8a5fcc0382277a4a8219d622a6c328c5dd982512 /xlators/features/index/src/index.c | |
| parent | be879643ea47c1fe6f0721da5100b43921d44927 (diff) | |
features/index: Exclude gfid-type for '.', '..'
index_get_gfid_type is assuming all names are gfids where as some of these
entry->d_names can be '.' or '..'
Thanks a lot to Nithya for RC
 >BUG: 1336630
 >Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186
 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
 >Reviewed-on: http://review.gluster.org/14589
 >Smoke: Gluster Build System <jenkins@build.gluster.com>
 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
 >CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
 >Reviewed-by: Ravishankar N <ravishankar@redhat.com>
 >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
 >(cherry picked from commit a89a9d266c439800286f281655d67f4e362dec32)
Change-Id: Iad85874b4bc9ffbc4351c5a4f6c7a9c2e5bf4c9c
BUG: 1341477
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/14596
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/index/src/index.c')
| -rw-r--r-- | xlators/features/index/src/index.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c index 36502383488..2c8813b2959 100644 --- a/xlators/features/index/src/index.c +++ b/xlators/features/index/src/index.c @@ -1478,9 +1478,16 @@ index_get_gfid_type (void *opaque)          int                      ret    = 0;          list_for_each_entry (entry, &args->entries->list, list) { +                if (strcmp (entry->d_name, ".") == 0 || +                    strcmp (entry->d_name, "..") == 0) +                        continue; +                  loc_wipe (&loc); -                gf_uuid_parse (entry->d_name, loc.gfid); +                  entry->d_type = IA_INVAL; +                if (gf_uuid_parse (entry->d_name, loc.gfid)) +                        continue; +                  loc.inode = inode_find (args->parent->table, loc.gfid);                  if (loc.inode) {                          entry->d_type = loc.inode->ia_type;  | 
