cluster/afr: Convert quota size from n/w to host order before use
Change-Id: I3e4fe15716556441546fcd62b8ac2833869b21cf BUG: 1200670 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/9853 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
This commit is contained in:
parent
02d42a5e80
commit
65c68fb756
@ -30,6 +30,7 @@
|
||||
#include "stack.h"
|
||||
#include "list.h"
|
||||
#include "call-stub.h"
|
||||
#include "byte-order.h"
|
||||
#include "defaults.h"
|
||||
#include "common-utils.h"
|
||||
#include "compat-errno.h"
|
||||
@ -78,6 +79,7 @@ afr_handle_quota_size (call_frame_t *frame, xlator_t *this)
|
||||
continue;
|
||||
if (dict_get_uint64 (replies[i].xdata, QUOTA_SIZE_KEY, &size))
|
||||
continue;
|
||||
size = ntoh64 (size);
|
||||
if (read_subvol == -1)
|
||||
read_subvol = i;
|
||||
if (size > max_size) {
|
||||
@ -89,6 +91,8 @@ afr_handle_quota_size (call_frame_t *frame, xlator_t *this)
|
||||
if (!max_size)
|
||||
return read_subvol;
|
||||
|
||||
max_size = hton64 (max_size);
|
||||
|
||||
for (i = 0; i < priv->child_count; i++) {
|
||||
if (!replies[i].valid || replies[i].op_ret == -1)
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user