Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trivial check for GF_XATTR_SHARD_FILE_SIZE before calling shard_modify_size_and_block_count() #1703

Closed
vh05 opened this issue Oct 23, 2020 · 0 comments · Fixed by #1769
Assignees

Comments

@vh05
Copy link
Contributor

vh05 commented Oct 23, 2020

The caller to shard_modify_size_and_block_count() need not to check GF_XATTR_SHARD_FILE_SIZE before calling shard_modify_size_and_block_count() as the same check is done inside shard_modify_size_and_block_count()

if (dict_get(xdata, GF_XATTR_SHARD_FILE_SIZE) &&
        frame->root->pid != GF_CLIENT_PID_GSYNCD)
        shard_modify_size_and_block_count(buf, xdata);

- The operating system / glusterfs version:
gluster devel

rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Nov 9, 2020
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: gluster#1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
@rkothiya rkothiya self-assigned this Nov 9, 2020
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Dec 8, 2020
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: gluster#1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Dec 8, 2020
Avoid printing log message when we do not know if key
GF_XATTR_SHARD_FILE_SIZE is present in dictionary.

Fixes: gluster#1703

Change-Id: I1f6e30366e1fa2093cf6f5158e77227aa0d0f560
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Dec 8, 2020
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: gluster#1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Dec 8, 2020
Avoid printing log message when we do not know if key
GF_XATTR_SHARD_FILE_SIZE is present in dictionary.

Fixes: gluster#1703

Change-Id: I1f6e30366e1fa2093cf6f5158e77227aa0d0f560
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: gluster#1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
Avoid printing log message when we do not know if key
GF_XATTR_SHARD_FILE_SIZE is present in dictionary.

Fixes: gluster#1703

Change-Id: I1f6e30366e1fa2093cf6f5158e77227aa0d0f560
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
As per the review comments made the function static.

Fixes: gluster#1703

Change-Id: I54b756b32cd93076583c69b429192ee35e52155f
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: gluster#1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
Avoid printing log message when we do not know if key
GF_XATTR_SHARD_FILE_SIZE is present in dictionary.

Fixes: gluster#1703

Change-Id: I1f6e30366e1fa2093cf6f5158e77227aa0d0f560
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
rkothiya pushed a commit to rkothiya/glusterfs that referenced this issue Jan 11, 2021
As per the review comments made the function static.

Fixes: gluster#1703

Change-Id: I54b756b32cd93076583c69b429192ee35e52155f
Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
xhernandez pushed a commit that referenced this issue Jan 18, 2021
This patch fixes redundant checks done while calling
shard_modify_size_and_block_count.

Fixes: #1703

Change-Id: I735e532c78cbb181afa4b51480ad742ef4a75f77
Signed-off-by: Rinku Kothiya rkothiya@redhat.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants