diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2015-06-24 08:02:51 +0530 |
|---|---|---|
| committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-25 19:36:41 -0700 |
| commit | 7a99dacc0eb5c31ba2d95615f4fe787c03a311df (patch) | |
| tree | 7e0b69de9b11a0d868847be5ed3b123f46467f84 /xlators/cluster/afr/src/afr-dir-read.c | |
| parent | 90f5a6cd669660785213a187c9fa7a587cd15257 (diff) | |
cluster/afr: Pick gfid from poststat during fresh lookup for read child calculation
Backport of: http://review.gluster.org/11373
Change-Id: I3ddc70cb0e7dbd1ef8adb352393b5ec16464fc94
BUG: 1212842
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/11391
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
| -rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 984ed9c6095..11f583e42f1 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -153,7 +153,12 @@ afr_validate_read_subvol (inode_t *inode, xlator_t *this, int par_read_subvol) if (!priv->consistent_metadata) return 0; - entry_read_subvol = afr_data_subvol_get (inode, this, 0, 0); + /* For an inode fetched through readdirp which is yet to be linked, + * inode ctx would not be initialised (yet). So this function returns + * -1 above due to gen being 0, which is why it is OK to pass NULL for + * read_subvol_args here. + */ + entry_read_subvol = afr_data_subvol_get (inode, this, 0, 0, NULL); if (entry_read_subvol != par_read_subvol) return -1; |
