dht: gf_defrag_settle_hash should ignore ENOENT and ESTALE error
Problem: A directory deletion can happen just before gf_defrag_settle_hash which internally does a setxattr operation on a directory. Solution: Ignore ENOENT and ESTALE errors Fixes: bz#1572581 Change-Id: I2f91809f3b5e02976c4c3a5a596406a8b2f8f6f2 Signed-off-by: Susant Palai <spalai@redhat.com>
This commit is contained in:
parent
1bf8a8addb
commit
e2fda09811
@ -3616,8 +3616,15 @@ gf_defrag_settle_hash (xlator_t *this, gf_defrag_info_t *defrag,
|
||||
|
||||
ret = syncop_setxattr (this, loc, fix_layout, 0, NULL, NULL);
|
||||
if (ret) {
|
||||
gf_log (this->name, GF_LOG_ERROR,
|
||||
gf_msg (this->name, GF_LOG_ERROR, -ret,
|
||||
DHT_MSG_LAYOUT_FIX_FAILED,
|
||||
"fix layout on %s failed", loc->path);
|
||||
|
||||
if (-ret == ENOENT || -ret == ESTALE) {
|
||||
/* Dir most likely is deleted */
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user