diff options
author | Ravishankar N <ravishankar@redhat.com> | 2020-04-10 14:30:57 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2020-04-24 12:47:14 +0000 |
commit | f0fcd909ad4535b60c9208d4804ebe6afe421a09 (patch) | |
tree | 09617cced5e6186992892cba774411a9f5485c5c /INSTALL | |
parent | 8e2741fdeca5ae0d855add0c80966217887dccd5 (diff) |
afr: event gen changes
The general idea of the changes is to prevent resetting event generation
to zero in the inode ctx, since event gen is something that should
follow 'causal order'.
Change #1:
For a read txn, in inode refresh cbk, if event_generation is
found zero, we are failing the read fop. This is not needed
because change in event gen is only a marker for the next inode refresh to
happen and should not be taken into account by the current read txn.
Change #2:
The event gen being zero above can happen if there is a racing lookup,
which resets even get (in afr_lookup_done) if there are non zero afr
xattrs. The resetting is done only to trigger an inode refresh and a
possible client side heal on the next lookup. That can be acheived by
setting the need_refresh flag in the inode ctx. So replaced all
occurences of resetting even gen to zero with a call to
afr_inode_need_refresh_set().
Change #3:
In both lookup and discover path, we are doing an inode refresh which is
not required since all 3 essentially do the same thing- update the inode
ctx with the good/bad copies from the brick replies. Inode refresh also
triggers background heals, but I think it is okay to do it when we call
refresh during the read and write txns and not in the lookup path.
The .ts which relied on inode refresh in lookup path to trigger heals are
now changed to do read txn so that inode refresh and the heal happens.
Change-Id: Iebf39a9be6ffd7ffd6e4046c96b0fa78ade6c5ec
Fixes: #1179
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reported-by: Erik Jacobson <erik.jacobson at hpe.com>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions