[crypt]: file access problem with encrypt xlator in case one brick is offline #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
setup: replica x3 no distribution using encrypt xlator.
if 3 bricks are up all clients are able to access all the files.
if one brick goes down, every client is able to access the files that created.
first lookup is triggered with filename. Then nameless lookup is triggered with gfid and then, finaly, getxattr for trusted.glusterfs.crypt.att.size.
In case the file is created from own client last lookup includes the gfid but if the file is created from different client, although gfid is returned from the first lookup from server, it is not included in the nameless lookup.
This results error from server which of course causes failure in the whole operation.
Solution:
In crypt_lookup_cbk in case type is IA_IFREG the returned gfid from buf->ia_gfid copied in the inode->gfid.
Change-Id: Id2d8a052f55050134241e2f097eb78278a86c78b
fixes: bz#1656000
Signed-off-by: kinsu vpolakis@gmail.com