|
|
256ebe |
From e33b3e0a443d4a54634a664f2d499a3fce9e7fb4 Mon Sep 17 00:00:00 2001
|
|
|
256ebe |
From: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
256ebe |
Date: Tue, 16 Apr 2019 14:19:47 +0530
|
|
|
256ebe |
Subject: [PATCH 116/124] cluster/ec: fix fd reopen
|
|
|
256ebe |
|
|
|
256ebe |
Currently EC tries to reopen fd's that have been opened while a brick
|
|
|
256ebe |
was down. This is done as part of regular write operations, just after
|
|
|
256ebe |
having acquired the locks, and it's sent as a sub-fop of the main write
|
|
|
256ebe |
fop.
|
|
|
256ebe |
|
|
|
256ebe |
There were two problems:
|
|
|
256ebe |
|
|
|
256ebe |
1. The reopen was attempted on all UP bricks, even if a previous lock
|
|
|
256ebe |
didn't succeed. This is incorrect because most probably the open will
|
|
|
256ebe |
fail.
|
|
|
256ebe |
|
|
|
256ebe |
2. If reopen is sent and fails, the error is propagated to the main
|
|
|
256ebe |
operation, causing it to fail when it shouldn't.
|
|
|
256ebe |
|
|
|
256ebe |
To fix this, we only attempt reopens on bricks where the current fop
|
|
|
256ebe |
owns a lock, and we prevent any error to be propagated to the main
|
|
|
256ebe |
fop.
|
|
|
256ebe |
|
|
|
256ebe |
To implement this behaviour an argument used to indicate the minimum
|
|
|
256ebe |
number of required answers has overloaded to also include some flags. To
|
|
|
256ebe |
make the change consistent, it has been necessary to rename the
|
|
|
256ebe |
argument, which means that a lot of files have been changed. However
|
|
|
256ebe |
there are no functional changes.
|
|
|
256ebe |
|
|
|
256ebe |
This change has also uncovered a problem in discard code, which didn't
|
|
|
256ebe |
correctely process requests of small sizes because no real discard fop
|
|
|
256ebe |
was being processed, only a write of 0's on some region. In this case
|
|
|
256ebe |
some fields of the fop remained uninitialized or with incorrect values.
|
|
|
256ebe |
To fix this, a new function has been created to simulate success on a
|
|
|
256ebe |
fop and it's used in the discard case.
|
|
|
256ebe |
|
|
|
256ebe |
Thanks to Pranith for providing a test script that has also detected an
|
|
|
256ebe |
issue in this patch. This patch includes a small modification of this
|
|
|
256ebe |
script to force data to be written into bricks before stopping them.
|
|
|
256ebe |
|
|
|
256ebe |
Upstream patch: https://review.gluster.org/22574
|
|
|
256ebe |
> Change-Id: I7ccd1fc5fc134eeb6d443c755962a20819320d48
|
|
|
256ebe |
> BUG: bz#1699866
|
|
|
256ebe |
> Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
|
|
|
256ebe |
|
|
|
256ebe |
Upstream patch: https://review.gluster.org/22558
|
|
|
256ebe |
> Change-Id: If272343873369186c2fb8f43c1d9c52c3ea304ec
|
|
|
256ebe |
> BUG: bz#1699866
|
|
|
256ebe |
> Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
256ebe |
|
|
|
256ebe |
Change-Id: If272343873369186c2fb8f43c1d9c52c3ea304ec
|
|
|
256ebe |
Fixes: bz#1663375
|
|
|
256ebe |
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
|
|
|
256ebe |
Reviewed-on: https://code.engineering.redhat.com/gerrit/168522
|
|
|
256ebe |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
256ebe |
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
|
|
|
256ebe |
---
|
|
|
256ebe |
tests/basic/ec/self-heal-read-write-fail.t | 69 +++++++++++++
|
|
|
256ebe |
tests/bugs/ec/bug-1699866-check-reopen-fd.t | 34 +++++++
|
|
|
256ebe |
xlators/cluster/ec/src/ec-common.c | 73 ++++++++++----
|
|
|
256ebe |
xlators/cluster/ec/src/ec-common.h | 14 ++-
|
|
|
256ebe |
xlators/cluster/ec/src/ec-data.c | 7 +-
|
|
|
256ebe |
xlators/cluster/ec/src/ec-data.h | 2 +-
|
|
|
256ebe |
xlators/cluster/ec/src/ec-dir-read.c | 12 +--
|
|
|
256ebe |
xlators/cluster/ec/src/ec-dir-write.c | 52 +++++-----
|
|
|
256ebe |
xlators/cluster/ec/src/ec-fops.h | 144 ++++++++++++++--------------
|
|
|
256ebe |
xlators/cluster/ec/src/ec-generic.c | 54 ++++++-----
|
|
|
256ebe |
xlators/cluster/ec/src/ec-heal.c | 20 ++--
|
|
|
256ebe |
xlators/cluster/ec/src/ec-inode-read.c | 58 +++++------
|
|
|
256ebe |
xlators/cluster/ec/src/ec-inode-write.c | 74 +++++++-------
|
|
|
256ebe |
xlators/cluster/ec/src/ec-locks.c | 36 +++----
|
|
|
256ebe |
xlators/cluster/ec/src/ec-types.h | 11 ++-
|
|
|
256ebe |
xlators/cluster/ec/src/ec.c | 45 +++++----
|
|
|
256ebe |
16 files changed, 431 insertions(+), 274 deletions(-)
|
|
|
256ebe |
create mode 100644 tests/basic/ec/self-heal-read-write-fail.t
|
|
|
256ebe |
create mode 100644 tests/bugs/ec/bug-1699866-check-reopen-fd.t
|
|
|
256ebe |
|
|
|
256ebe |
diff --git a/tests/basic/ec/self-heal-read-write-fail.t b/tests/basic/ec/self-heal-read-write-fail.t
|
|
|
256ebe |
new file mode 100644
|
|
|
256ebe |
index 0000000..0ba591b
|
|
|
256ebe |
--- /dev/null
|
|
|
256ebe |
+++ b/tests/basic/ec/self-heal-read-write-fail.t
|
|
|
256ebe |
@@ -0,0 +1,69 @@
|
|
|
256ebe |
+#!/bin/bash
|
|
|
256ebe |
+
|
|
|
256ebe |
+. $(dirname $0)/../../include.rc
|
|
|
256ebe |
+. $(dirname $0)/../../volume.rc
|
|
|
256ebe |
+
|
|
|
256ebe |
+#This test verifies that self-heal fails when read/write fails as part of heal
|
|
|
256ebe |
+cleanup
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST glusterd
|
|
|
256ebe |
+TEST pidof glusterd
|
|
|
256ebe |
+TEST $CLI volume info
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $CLI volume create $V0 disperse 3 redundancy 1 $H0:$B0/${V0}{0,1,2}
|
|
|
256ebe |
+TEST $CLI volume heal $V0 disable
|
|
|
256ebe |
+TEST $CLI volume start $V0
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
|
|
|
256ebe |
+TEST touch $M0/a
|
|
|
256ebe |
+TEST kill_brick $V0 $H0 $B0/${V0}0
|
|
|
256ebe |
+echo abc >> $M0/a
|
|
|
256ebe |
+
|
|
|
256ebe |
+# Umount the volume to force all pending writes to reach the bricks
|
|
|
256ebe |
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
|
|
|
256ebe |
+
|
|
|
256ebe |
+#Load error-gen and fail read fop and test that heal fails
|
|
|
256ebe |
+TEST $CLI volume stop $V0 #Stop volume so that error-gen can be loaded
|
|
|
256ebe |
+TEST $CLI volume set $V0 debug.error-gen posix
|
|
|
256ebe |
+TEST $CLI volume set $V0 debug.error-fops read
|
|
|
256ebe |
+TEST $CLI volume set $V0 debug.error-number EBADF
|
|
|
256ebe |
+TEST $CLI volume set $V0 debug.error-failure 100
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $CLI volume start $V0
|
|
|
256ebe |
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
|
|
|
256ebe |
+EXPECT_WITHIN $HEAL_TIMEOUT "^2$" get_pending_heal_count $V0
|
|
|
256ebe |
+TEST ! getfattr -n trusted.ec.heal $M0/a
|
|
|
256ebe |
+EXPECT_WITHIN $HEAL_TIMEOUT "^2$" get_pending_heal_count $V0
|
|
|
256ebe |
+
|
|
|
256ebe |
+#fail write fop and test that heal fails
|
|
|
256ebe |
+TEST $CLI volume stop $V0
|
|
|
256ebe |
+TEST $CLI volume set $V0 debug.error-fops write
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $CLI volume start $V0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
|
|
|
256ebe |
+EXPECT_WITHIN $HEAL_TIMEOUT "^2$" get_pending_heal_count $V0
|
|
|
256ebe |
+TEST ! getfattr -n trusted.ec.heal $M0/a
|
|
|
256ebe |
+EXPECT_WITHIN $HEAL_TIMEOUT "^2$" get_pending_heal_count $V0
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $CLI volume stop $V0 #Stop volume so that error-gen can be disabled
|
|
|
256ebe |
+TEST $CLI volume reset $V0 debug.error-gen
|
|
|
256ebe |
+TEST $CLI volume reset $V0 debug.error-fops
|
|
|
256ebe |
+TEST $CLI volume reset $V0 debug.error-number
|
|
|
256ebe |
+TEST $CLI volume reset $V0 debug.error-failure
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST $CLI volume start $V0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "3" ec_child_up_count $V0 0
|
|
|
256ebe |
+EXPECT_WITHIN $HEAL_TIMEOUT "^2$" get_pending_heal_count $V0
|
|
|
256ebe |
+TEST getfattr -n trusted.ec.heal $M0/a
|
|
|
256ebe |
+EXPECT "^0$" get_pending_heal_count $V0
|
|
|
256ebe |
+
|
|
|
256ebe |
+#Test that heal worked as expected by forcing read from brick0
|
|
|
256ebe |
+#remount to make sure data is not served from any cache
|
|
|
256ebe |
+EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
|
|
|
256ebe |
+TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
|
|
|
256ebe |
+TEST kill_brick $V0 $H0 $B0/${V0}2
|
|
|
256ebe |
+EXPECT "abc" cat $M0/a
|
|
|
256ebe |
+
|
|
|
256ebe |
+cleanup
|
|
|
256ebe |
diff --git a/tests/bugs/ec/bug-1699866-check-reopen-fd.t b/tests/bugs/ec/bug-1699866-check-reopen-fd.t
|
|
|
256ebe |
new file mode 100644
|
|
|
256ebe |
index 0000000..4386d01
|
|
|
256ebe |
--- /dev/null
|
|
|
256ebe |
+++ b/tests/bugs/ec/bug-1699866-check-reopen-fd.t
|
|
|
256ebe |
@@ -0,0 +1,34 @@
|
|
|
256ebe |
+#!/bin/bash
|
|
|
256ebe |
+
|
|
|
256ebe |
+. $(dirname $0)/../../include.rc
|
|
|
256ebe |
+. $(dirname $0)/../../volume.rc
|
|
|
256ebe |
+. $(dirname $0)/../../fileio.rc
|
|
|
256ebe |
+
|
|
|
256ebe |
+cleanup
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST glusterd
|
|
|
256ebe |
+TEST pidof glusterd
|
|
|
256ebe |
+TEST $CLI volume create $V0 disperse 6 redundancy 2 $H0:$B0/${V0}{0..5}
|
|
|
256ebe |
+TEST $CLI volume heal $V0 disable
|
|
|
256ebe |
+TEST $CLI volume set $V0 disperse.background-heals 0
|
|
|
256ebe |
+TEST $CLI volume set $V0 write-behind off
|
|
|
256ebe |
+TEST $CLI volume set $V0 open-behind off
|
|
|
256ebe |
+TEST $CLI volume start $V0
|
|
|
256ebe |
+TEST glusterfs --entry-timeout=0 --attribute-timeout=0 -s $H0 --volfile-id $V0 $M0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "6" ec_child_up_count $V0 0
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST mkdir -p $M0/dir
|
|
|
256ebe |
+
|
|
|
256ebe |
+fd="$(fd_available)"
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST kill_brick $V0 $H0 $B0/${V0}0
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "5" ec_child_up_count $V0 0
|
|
|
256ebe |
+
|
|
|
256ebe |
+TEST fd_open ${fd} rw $M0/dir/test
|
|
|
256ebe |
+TEST fd_write ${fd} "test1"
|
|
|
256ebe |
+TEST $CLI volume replace-brick ${V0} $H0:$B0/${V0}0 $H0:$B0/${V0}0_1 commit force
|
|
|
256ebe |
+EXPECT_WITHIN $CHILD_UP_TIMEOUT "6" ec_child_up_count $V0 0
|
|
|
256ebe |
+TEST fd_write ${fd} "test2"
|
|
|
256ebe |
+TEST fd_close ${fd}
|
|
|
256ebe |
+
|
|
|
256ebe |
+cleanup
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c
|
|
|
256ebe |
index 5183680..1454ae2 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-common.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-common.c
|
|
|
256ebe |
@@ -44,16 +44,16 @@ ec_update_fd_status(fd_t *fd, xlator_t *xl, int idx, int32_t ret_status)
|
|
|
256ebe |
UNLOCK(&fd->lock);
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
-static int
|
|
|
256ebe |
-ec_fd_ctx_need_open(fd_t *fd, xlator_t *this, uintptr_t *need_open)
|
|
|
256ebe |
+static uintptr_t
|
|
|
256ebe |
+ec_fd_ctx_need_open(fd_t *fd, xlator_t *this, uintptr_t mask)
|
|
|
256ebe |
{
|
|
|
256ebe |
int i = 0;
|
|
|
256ebe |
int count = 0;
|
|
|
256ebe |
ec_t *ec = NULL;
|
|
|
256ebe |
ec_fd_t *fd_ctx = NULL;
|
|
|
256ebe |
+ uintptr_t need_open = 0;
|
|
|
256ebe |
|
|
|
256ebe |
ec = this->private;
|
|
|
256ebe |
- *need_open = 0;
|
|
|
256ebe |
|
|
|
256ebe |
fd_ctx = ec_fd_get(fd, this);
|
|
|
256ebe |
if (!fd_ctx)
|
|
|
256ebe |
@@ -63,9 +63,9 @@ ec_fd_ctx_need_open(fd_t *fd, xlator_t *this, uintptr_t *need_open)
|
|
|
256ebe |
{
|
|
|
256ebe |
for (i = 0; i < ec->nodes; i++) {
|
|
|
256ebe |
if ((fd_ctx->fd_status[i] == EC_FD_NOT_OPENED) &&
|
|
|
256ebe |
- (ec->xl_up & (1 << i))) {
|
|
|
256ebe |
+ ((ec->xl_up & (1 << i)) != 0) && ((mask & (1 << i)) != 0)) {
|
|
|
256ebe |
fd_ctx->fd_status[i] = EC_FD_OPENING;
|
|
|
256ebe |
- *need_open |= (1 << i);
|
|
|
256ebe |
+ need_open |= (1 << i);
|
|
|
256ebe |
count++;
|
|
|
256ebe |
}
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -76,10 +76,11 @@ ec_fd_ctx_need_open(fd_t *fd, xlator_t *this, uintptr_t *need_open)
|
|
|
256ebe |
* then ignore fixing the fd as it has been
|
|
|
256ebe |
* requested from heal operation.
|
|
|
256ebe |
*/
|
|
|
256ebe |
- if (count >= ec->fragments)
|
|
|
256ebe |
- count = 0;
|
|
|
256ebe |
+ if (count >= ec->fragments) {
|
|
|
256ebe |
+ need_open = 0;
|
|
|
256ebe |
+ }
|
|
|
256ebe |
|
|
|
256ebe |
- return count;
|
|
|
256ebe |
+ return need_open;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
static gf_boolean_t
|
|
|
256ebe |
@@ -96,9 +97,8 @@ ec_is_fd_fixable(fd_t *fd)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
static void
|
|
|
256ebe |
-ec_fix_open(ec_fop_data_t *fop)
|
|
|
256ebe |
+ec_fix_open(ec_fop_data_t *fop, uintptr_t mask)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int call_count = 0;
|
|
|
256ebe |
uintptr_t need_open = 0;
|
|
|
256ebe |
int ret = 0;
|
|
|
256ebe |
loc_t loc = {
|
|
|
256ebe |
@@ -109,9 +109,10 @@ ec_fix_open(ec_fop_data_t *fop)
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
|
|
|
256ebe |
/* Evaluate how many remote fd's to be opened */
|
|
|
256ebe |
- call_count = ec_fd_ctx_need_open(fop->fd, fop->xl, &need_open);
|
|
|
256ebe |
- if (!call_count)
|
|
|
256ebe |
+ need_open = ec_fd_ctx_need_open(fop->fd, fop->xl, mask);
|
|
|
256ebe |
+ if (need_open == 0) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
+ }
|
|
|
256ebe |
|
|
|
256ebe |
loc.inode = inode_ref(fop->fd->inode);
|
|
|
256ebe |
gf_uuid_copy(loc.gfid, fop->fd->inode->gfid);
|
|
|
256ebe |
@@ -121,11 +122,13 @@ ec_fix_open(ec_fop_data_t *fop)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
if (IA_IFDIR == fop->fd->inode->ia_type) {
|
|
|
256ebe |
- ec_opendir(fop->frame, fop->xl, need_open, EC_MINIMUM_ONE, NULL, NULL,
|
|
|
256ebe |
+ ec_opendir(fop->frame, fop->xl, need_open,
|
|
|
256ebe |
+ EC_MINIMUM_ONE | EC_FOP_NO_PROPAGATE_ERROR, NULL, NULL,
|
|
|
256ebe |
&fop->loc[0], fop->fd, NULL);
|
|
|
256ebe |
} else {
|
|
|
256ebe |
- ec_open(fop->frame, fop->xl, need_open, EC_MINIMUM_ONE, NULL, NULL,
|
|
|
256ebe |
- &loc, fop->fd->flags, fop->fd, NULL);
|
|
|
256ebe |
+ ec_open(fop->frame, fop->xl, need_open,
|
|
|
256ebe |
+ EC_MINIMUM_ONE | EC_FOP_NO_PROPAGATE_ERROR, NULL, NULL, &loc,
|
|
|
256ebe |
+ fop->fd->flags, fop->fd, NULL);
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
out:
|
|
|
256ebe |
@@ -495,12 +498,16 @@ ec_resume(ec_fop_data_t *fop, int32_t error)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_resume_parent(ec_fop_data_t *fop, int32_t error)
|
|
|
256ebe |
+ec_resume_parent(ec_fop_data_t *fop)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_fop_data_t *parent;
|
|
|
256ebe |
+ int32_t error = 0;
|
|
|
256ebe |
|
|
|
256ebe |
parent = fop->parent;
|
|
|
256ebe |
if (parent != NULL) {
|
|
|
256ebe |
+ if ((fop->fop_flags & EC_FOP_NO_PROPAGATE_ERROR) == 0) {
|
|
|
256ebe |
+ error = fop->error;
|
|
|
256ebe |
+ }
|
|
|
256ebe |
ec_trace("RESUME_PARENT", fop, "error=%u", error);
|
|
|
256ebe |
fop->parent = NULL;
|
|
|
256ebe |
ec_resume(parent, error);
|
|
|
256ebe |
@@ -593,6 +600,8 @@ ec_internal_op(ec_fop_data_t *fop)
|
|
|
256ebe |
return _gf_true;
|
|
|
256ebe |
if (fop->id == GF_FOP_FXATTROP)
|
|
|
256ebe |
return _gf_true;
|
|
|
256ebe |
+ if (fop->id == GF_FOP_OPEN)
|
|
|
256ebe |
+ return _gf_true;
|
|
|
256ebe |
return _gf_false;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
@@ -631,7 +640,7 @@ ec_msg_str(ec_fop_data_t *fop)
|
|
|
256ebe |
return fop->errstr;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
-int32_t
|
|
|
256ebe |
+static int32_t
|
|
|
256ebe |
ec_child_select(ec_fop_data_t *fop)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_t *ec = fop->xl->private;
|
|
|
256ebe |
@@ -693,8 +702,6 @@ ec_child_select(ec_fop_data_t *fop)
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
- ec_sleep(fop);
|
|
|
256ebe |
-
|
|
|
256ebe |
return 1;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
@@ -773,6 +780,8 @@ ec_dispatch_one(ec_fop_data_t *fop)
|
|
|
256ebe |
ec_dispatch_start(fop);
|
|
|
256ebe |
|
|
|
256ebe |
if (ec_child_select(fop)) {
|
|
|
256ebe |
+ ec_sleep(fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
fop->expected = 1;
|
|
|
256ebe |
fop->first = ec_select_first_by_read_policy(fop->xl->private, fop);
|
|
|
256ebe |
|
|
|
256ebe |
@@ -807,6 +816,8 @@ ec_dispatch_inc(ec_fop_data_t *fop)
|
|
|
256ebe |
ec_dispatch_start(fop);
|
|
|
256ebe |
|
|
|
256ebe |
if (ec_child_select(fop)) {
|
|
|
256ebe |
+ ec_sleep(fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
fop->expected = gf_bits_count(fop->remaining);
|
|
|
256ebe |
fop->first = 0;
|
|
|
256ebe |
|
|
|
256ebe |
@@ -820,6 +831,8 @@ ec_dispatch_all(ec_fop_data_t *fop)
|
|
|
256ebe |
ec_dispatch_start(fop);
|
|
|
256ebe |
|
|
|
256ebe |
if (ec_child_select(fop)) {
|
|
|
256ebe |
+ ec_sleep(fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
fop->expected = gf_bits_count(fop->remaining);
|
|
|
256ebe |
fop->first = 0;
|
|
|
256ebe |
|
|
|
256ebe |
@@ -838,6 +851,8 @@ ec_dispatch_min(ec_fop_data_t *fop)
|
|
|
256ebe |
ec_dispatch_start(fop);
|
|
|
256ebe |
|
|
|
256ebe |
if (ec_child_select(fop)) {
|
|
|
256ebe |
+ ec_sleep(fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
fop->expected = count = ec->fragments;
|
|
|
256ebe |
fop->first = ec_select_first_by_read_policy(fop->xl->private, fop);
|
|
|
256ebe |
idx = fop->first - 1;
|
|
|
256ebe |
@@ -852,6 +867,23 @@ ec_dispatch_min(ec_fop_data_t *fop)
|
|
|
256ebe |
}
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
+void
|
|
|
256ebe |
+ec_succeed_all(ec_fop_data_t *fop)
|
|
|
256ebe |
+{
|
|
|
256ebe |
+ ec_dispatch_start(fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
+ if (ec_child_select(fop)) {
|
|
|
256ebe |
+ fop->expected = gf_bits_count(fop->remaining);
|
|
|
256ebe |
+ fop->first = 0;
|
|
|
256ebe |
+
|
|
|
256ebe |
+ /* Simulate a successful execution on all bricks */
|
|
|
256ebe |
+ ec_trace("SUCCEED", fop, "");
|
|
|
256ebe |
+
|
|
|
256ebe |
+ fop->good = fop->remaining;
|
|
|
256ebe |
+ fop->remaining = 0;
|
|
|
256ebe |
+ }
|
|
|
256ebe |
+}
|
|
|
256ebe |
+
|
|
|
256ebe |
ec_lock_t *
|
|
|
256ebe |
ec_lock_allocate(ec_fop_data_t *fop, loc_t *loc)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -1825,7 +1857,8 @@ ec_lock_acquired(ec_lock_link_t *link)
|
|
|
256ebe |
|
|
|
256ebe |
if (fop->use_fd &&
|
|
|
256ebe |
(link->update[EC_DATA_TXN] || link->update[EC_METADATA_TXN])) {
|
|
|
256ebe |
- ec_fix_open(fop);
|
|
|
256ebe |
+ /* Try to reopen closed fd's only if lock has succeeded. */
|
|
|
256ebe |
+ ec_fix_open(fop, lock->mask);
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
ec_lock_resume_shared(&list);
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
|
|
|
256ebe |
index 54aaa77..e948342 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-common.h
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-common.h
|
|
|
256ebe |
@@ -54,9 +54,12 @@ enum _ec_xattrop_flags {
|
|
|
256ebe |
|
|
|
256ebe |
#define EC_SELFHEAL_BIT 62
|
|
|
256ebe |
|
|
|
256ebe |
-#define EC_MINIMUM_ONE -1
|
|
|
256ebe |
-#define EC_MINIMUM_MIN -2
|
|
|
256ebe |
-#define EC_MINIMUM_ALL -3
|
|
|
256ebe |
+#define EC_MINIMUM_ONE (1 << 6)
|
|
|
256ebe |
+#define EC_MINIMUM_MIN (2 << 6)
|
|
|
256ebe |
+#define EC_MINIMUM_ALL (3 << 6)
|
|
|
256ebe |
+#define EC_FOP_NO_PROPAGATE_ERROR (1 << 8)
|
|
|
256ebe |
+#define EC_FOP_MINIMUM(_flags) ((_flags)&255)
|
|
|
256ebe |
+#define EC_FOP_FLAGS(_flags) ((_flags) & ~255)
|
|
|
256ebe |
|
|
|
256ebe |
#define EC_UPDATE_DATA 1
|
|
|
256ebe |
#define EC_UPDATE_META 2
|
|
|
256ebe |
@@ -163,11 +166,14 @@ void
|
|
|
256ebe |
ec_dispatch_one(ec_fop_data_t *fop);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
+ec_succeed_all(ec_fop_data_t *fop);
|
|
|
256ebe |
+
|
|
|
256ebe |
+void
|
|
|
256ebe |
ec_sleep(ec_fop_data_t *fop);
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_resume(ec_fop_data_t *fop, int32_t error);
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_resume_parent(ec_fop_data_t *fop, int32_t error);
|
|
|
256ebe |
+ec_resume_parent(ec_fop_data_t *fop);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_manager(ec_fop_data_t *fop, int32_t error);
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-data.c b/xlators/cluster/ec/src/ec-data.c
|
|
|
256ebe |
index fae8843..6ef9340 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-data.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-data.c
|
|
|
256ebe |
@@ -98,7 +98,7 @@ ec_cbk_data_destroy(ec_cbk_data_t *cbk)
|
|
|
256ebe |
|
|
|
256ebe |
ec_fop_data_t *
|
|
|
256ebe |
ec_fop_data_allocate(call_frame_t *frame, xlator_t *this, int32_t id,
|
|
|
256ebe |
- uint32_t flags, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
+ uint32_t flags, uintptr_t target, uint32_t fop_flags,
|
|
|
256ebe |
ec_wind_f wind, ec_handler_f handler, ec_cbk_t cbks,
|
|
|
256ebe |
void *data)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -151,7 +151,8 @@ ec_fop_data_allocate(call_frame_t *frame, xlator_t *this, int32_t id,
|
|
|
256ebe |
fop->refs = 1;
|
|
|
256ebe |
|
|
|
256ebe |
fop->flags = flags;
|
|
|
256ebe |
- fop->minimum = minimum;
|
|
|
256ebe |
+ fop->minimum = EC_FOP_MINIMUM(fop_flags);
|
|
|
256ebe |
+ fop->fop_flags = EC_FOP_FLAGS(fop_flags);
|
|
|
256ebe |
fop->mask = target;
|
|
|
256ebe |
|
|
|
256ebe |
fop->wind = wind;
|
|
|
256ebe |
@@ -271,7 +272,7 @@ ec_fop_data_release(ec_fop_data_t *fop)
|
|
|
256ebe |
loc_wipe(&fop->loc[1]);
|
|
|
256ebe |
GF_FREE(fop->errstr);
|
|
|
256ebe |
|
|
|
256ebe |
- ec_resume_parent(fop, fop->error);
|
|
|
256ebe |
+ ec_resume_parent(fop);
|
|
|
256ebe |
|
|
|
256ebe |
ec_fop_cleanup(fop);
|
|
|
256ebe |
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-data.h b/xlators/cluster/ec/src/ec-data.h
|
|
|
256ebe |
index 112536d..c8a74ff 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-data.h
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-data.h
|
|
|
256ebe |
@@ -18,7 +18,7 @@ ec_cbk_data_allocate(call_frame_t *frame, xlator_t *this, ec_fop_data_t *fop,
|
|
|
256ebe |
int32_t id, int32_t idx, int32_t op_ret, int32_t op_errno);
|
|
|
256ebe |
ec_fop_data_t *
|
|
|
256ebe |
ec_fop_data_allocate(call_frame_t *frame, xlator_t *this, int32_t id,
|
|
|
256ebe |
- uint32_t flags, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
+ uint32_t flags, uintptr_t target, uint32_t fop_flags,
|
|
|
256ebe |
ec_wind_f wind, ec_handler_f handler, ec_cbk_t cbks,
|
|
|
256ebe |
void *data);
|
|
|
256ebe |
void
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c
|
|
|
256ebe |
index c9db701..8310d4a 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-dir-read.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-dir-read.c
|
|
|
256ebe |
@@ -219,7 +219,7 @@ ec_manager_opendir(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_opendir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_opendir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_opendir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
fd_t *fd, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.opendir = func};
|
|
|
256ebe |
@@ -233,7 +233,7 @@ ec_opendir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_OPENDIR, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_opendir,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_opendir,
|
|
|
256ebe |
ec_manager_opendir, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -515,7 +515,7 @@ ec_manager_readdir(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
size_t size, off_t offset, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.readdir = func};
|
|
|
256ebe |
@@ -529,7 +529,7 @@ ec_readdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_READDIR, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_readdir,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_readdir,
|
|
|
256ebe |
ec_manager_readdir, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -585,7 +585,7 @@ ec_wind_readdirp(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readdirp(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readdirp_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readdirp_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
size_t size, off_t offset, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.readdirp = func};
|
|
|
256ebe |
@@ -599,7 +599,7 @@ ec_readdirp(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(
|
|
|
256ebe |
- frame, this, GF_FOP_READDIRP, EC_FLAG_LOCK_SHARED, target, minimum,
|
|
|
256ebe |
+ frame, this, GF_FOP_READDIRP, EC_FLAG_LOCK_SHARED, target, fop_flags,
|
|
|
256ebe |
ec_wind_readdirp, ec_manager_readdir, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-dir-write.c b/xlators/cluster/ec/src/ec-dir-write.c
|
|
|
256ebe |
index e24667f..0b8ee21 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-dir-write.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-dir-write.c
|
|
|
256ebe |
@@ -262,7 +262,7 @@ ec_manager_create(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_create(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_create_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_create_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int32_t flags, mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.create = func};
|
|
|
256ebe |
@@ -275,7 +275,7 @@ ec_create(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_CREATE, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_CREATE, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_create, ec_manager_create, callback,
|
|
|
256ebe |
data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
@@ -432,9 +432,9 @@ ec_manager_link(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_link(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_link_cbk_t func, void *data, loc_t *oldloc, loc_t *newloc,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_link(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_link_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
+ loc_t *newloc, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.link = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -446,7 +446,7 @@ ec_link(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_LINK, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_LINK, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_link, ec_manager_link, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -613,9 +613,9 @@ ec_manager_mkdir(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_mkdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_mkdir_cbk_t func, void *data, loc_t *loc, mode_t mode,
|
|
|
256ebe |
- mode_t umask, dict_t *xdata)
|
|
|
256ebe |
+ec_mkdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_mkdir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ mode_t mode, mode_t umask, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.mkdir = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -627,7 +627,7 @@ ec_mkdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_MKDIR, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_MKDIR, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_mkdir, ec_manager_mkdir, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -815,9 +815,9 @@ ec_manager_mknod(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_mknod(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_mknod_cbk_t func, void *data, loc_t *loc, mode_t mode, dev_t rdev,
|
|
|
256ebe |
- mode_t umask, dict_t *xdata)
|
|
|
256ebe |
+ec_mknod(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_mknod_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.mknod = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -829,7 +829,7 @@ ec_mknod(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_MKNOD, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_MKNOD, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_mknod, ec_manager_mknod, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -975,7 +975,7 @@ ec_manager_rename(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_rename(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_rename_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_rename_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
loc_t *newloc, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.rename = func};
|
|
|
256ebe |
@@ -988,7 +988,7 @@ ec_rename(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_RENAME, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_RENAME, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_rename, ec_manager_rename, callback,
|
|
|
256ebe |
data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
@@ -1125,9 +1125,9 @@ ec_manager_rmdir(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_rmdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_rmdir_cbk_t func, void *data, loc_t *loc, int xflags,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_rmdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_rmdir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int xflags, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.rmdir = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1139,7 +1139,7 @@ ec_rmdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_RMDIR, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_RMDIR, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_rmdir, ec_manager_rmdir, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1281,7 +1281,7 @@ ec_manager_symlink(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_symlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_symlink_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_symlink_cbk_t func, void *data,
|
|
|
256ebe |
const char *linkname, loc_t *loc, mode_t umask, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.symlink = func};
|
|
|
256ebe |
@@ -1294,9 +1294,9 @@ ec_symlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_SYMLINK, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_symlink, ec_manager_symlink, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_SYMLINK, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_symlink, ec_manager_symlink,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1435,7 +1435,7 @@ ec_manager_unlink(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_unlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_unlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_unlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int xflags, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.unlink = func};
|
|
|
256ebe |
@@ -1448,7 +1448,7 @@ ec_unlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_UNLINK, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_UNLINK, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_unlink, ec_manager_unlink, callback,
|
|
|
256ebe |
data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-fops.h b/xlators/cluster/ec/src/ec-fops.h
|
|
|
256ebe |
index 2abef0d..07edf8a 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-fops.h
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-fops.h
|
|
|
256ebe |
@@ -18,233 +18,237 @@
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_access(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_access_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_access_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int32_t mask, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_create(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_create_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_create_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int32_t flags, mode_t mode, mode_t umask, fd_t *fd, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_entrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_entrylk_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_entrylk_cbk_t func, void *data,
|
|
|
256ebe |
const char *volume, loc_t *loc, const char *basename,
|
|
|
256ebe |
entrylk_cmd cmd, entrylk_type type, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fentrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fentrylk_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fentrylk_cbk_t func, void *data,
|
|
|
256ebe |
const char *volume, fd_t *fd, const char *basename, entrylk_cmd cmd,
|
|
|
256ebe |
entrylk_type type, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_flush(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_flush_cbk_t func, void *data, fd_t *fd, dict_t *xdata);
|
|
|
256ebe |
+ec_flush(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_flush_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fsync(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fsync_cbk_t func, void *data, fd_t *fd, int32_t datasync,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_fsync(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsync_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ int32_t datasync, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsyncdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsyncdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsyncdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
int32_t datasync, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_getxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_getxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_getxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
const char *name, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fgetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fgetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fgetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
const char *name, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_heal(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_heal_cbk_t func, void *data, loc_t *loc, int32_t partial,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_heal(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_heal_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int32_t partial, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fheal(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fheal_cbk_t func, void *data, fd_t *fd, int32_t partial,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_fheal(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fheal_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ int32_t partial, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_inodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
- uintptr_t target, int32_t minimum, fop_inodelk_cbk_t func,
|
|
|
256ebe |
+ uintptr_t target, uint32_t fop_flags, fop_inodelk_cbk_t func,
|
|
|
256ebe |
void *data, const char *volume, loc_t *loc, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_finodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
- uintptr_t target, int32_t minimum, fop_finodelk_cbk_t func,
|
|
|
256ebe |
+ uintptr_t target, uint32_t fop_flags, fop_finodelk_cbk_t func,
|
|
|
256ebe |
void *data, const char *volume, fd_t *fd, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_link(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_link_cbk_t func, void *data, loc_t *oldloc, loc_t *newloc,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_link(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_link_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
+ loc_t *newloc, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_lk(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
+ec_lk(call_frame_t *frame, xlator_t *this, uintptr_t target, uint32_t fop_flags,
|
|
|
256ebe |
fop_lk_cbk_t func, void *data, fd_t *fd, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_lookup(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_lookup_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_lookup_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_mkdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_mkdir_cbk_t func, void *data, loc_t *loc, mode_t mode,
|
|
|
256ebe |
- mode_t umask, dict_t *xdata);
|
|
|
256ebe |
+ec_mkdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_mkdir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ mode_t mode, mode_t umask, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_mknod(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_mknod_cbk_t func, void *data, loc_t *loc, mode_t mode, dev_t rdev,
|
|
|
256ebe |
- mode_t umask, dict_t *xdata);
|
|
|
256ebe |
+ec_mknod(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_mknod_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_open(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_open_cbk_t func, void *data, loc_t *loc, int32_t flags, fd_t *fd,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_open(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_open_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int32_t flags, fd_t *fd, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_opendir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_opendir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_opendir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
fd_t *fd, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
size_t size, off_t offset, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readdirp(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readdirp_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readdirp_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
size_t size, off_t offset, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
size_t size, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_readv(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_readv_cbk_t func, void *data, fd_t *fd, size_t size, off_t offset,
|
|
|
256ebe |
- uint32_t flags, dict_t *xdata);
|
|
|
256ebe |
+ec_readv(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readv_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ size_t size, off_t offset, uint32_t flags, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_removexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_removexattr_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_removexattr_cbk_t func, void *data,
|
|
|
256ebe |
loc_t *loc, const char *name, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fremovexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fremovexattr_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fremovexattr_cbk_t func, void *data,
|
|
|
256ebe |
fd_t *fd, const char *name, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_rename(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_rename_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_rename_cbk_t func, void *data, loc_t *oldloc,
|
|
|
256ebe |
loc_t *newloc, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_rmdir(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_rmdir_cbk_t func, void *data, loc_t *loc, int xflags,
|
|
|
256ebe |
- dict_t *xdata);
|
|
|
256ebe |
+ec_rmdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_rmdir_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int xflags, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_setattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_setattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_setattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
struct iatt *stbuf, int32_t valid, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsetattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsetattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsetattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
struct iatt *stbuf, int32_t valid, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_setxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_setxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_setxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *dict, int32_t flags, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
dict_t *dict, int32_t flags, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_stat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_stat_cbk_t func, void *data, loc_t *loc, dict_t *xdata);
|
|
|
256ebe |
+ec_stat(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_stat_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fstat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fstat_cbk_t func, void *data, fd_t *fd, dict_t *xdata);
|
|
|
256ebe |
+ec_fstat(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fstat_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_statfs(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_statfs_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_statfs_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_symlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_symlink_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_symlink_cbk_t func, void *data,
|
|
|
256ebe |
const char *linkname, loc_t *loc, mode_t umask, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fallocate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fallocate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fallocate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
int32_t mode, off_t offset, size_t len, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_discard(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_discard_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_discard_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
off_t offset, size_t len, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_truncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_truncate_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_truncate_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
off_t offset, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_ftruncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_ftruncate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_ftruncate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
off_t offset, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_unlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_unlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_unlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int xflags, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_writev(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_writev_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_writev_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
struct iovec *vector, int32_t count, off_t offset, uint32_t flags,
|
|
|
256ebe |
struct iobref *iobref, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_xattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_xattrop_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_xattrop_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fxattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fxattrop_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fxattrop_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_seek(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_seek_cbk_t func, void *data, fd_t *fd, off_t offset,
|
|
|
256ebe |
- gf_seek_what_t what, dict_t *xdata);
|
|
|
256ebe |
+ec_seek(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_seek_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ off_t offset, gf_seek_what_t what, dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_ipc(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_ipc_cbk_t func, void *data, int32_t op, dict_t *xdata);
|
|
|
256ebe |
+ec_ipc(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_ipc_cbk_t func, void *data, int32_t op,
|
|
|
256ebe |
+ dict_t *xdata);
|
|
|
256ebe |
|
|
|
256ebe |
#endif /* __EC_FOPS_H__ */
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-generic.c b/xlators/cluster/ec/src/ec-generic.c
|
|
|
256ebe |
index 175e88a..acc16b5 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-generic.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-generic.c
|
|
|
256ebe |
@@ -151,8 +151,9 @@ ec_manager_flush(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_flush(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_flush_cbk_t func, void *data, fd_t *fd, dict_t *xdata)
|
|
|
256ebe |
+ec_flush(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_flush_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.flush = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -164,7 +165,7 @@ ec_flush(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FLUSH, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FLUSH, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_flush, ec_manager_flush, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -366,9 +367,9 @@ ec_manager_fsync(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fsync(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fsync_cbk_t func, void *data, fd_t *fd, int32_t datasync,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_fsync(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsync_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ int32_t datasync, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fsync = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -380,7 +381,7 @@ ec_fsync(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FSYNC, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FSYNC, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_fsync, ec_manager_fsync, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -553,7 +554,7 @@ ec_manager_fsyncdir(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsyncdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsyncdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsyncdir_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
int32_t datasync, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fsyncdir = func};
|
|
|
256ebe |
@@ -566,9 +567,9 @@ ec_fsyncdir(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FSYNCDIR, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_fsyncdir, ec_manager_fsyncdir, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FSYNCDIR, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_fsyncdir, ec_manager_fsyncdir,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -848,7 +849,7 @@ ec_manager_lookup(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_lookup(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_lookup_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_lookup_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.lookup = func};
|
|
|
256ebe |
@@ -862,7 +863,7 @@ ec_lookup(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_LOOKUP, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_lookup,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_lookup,
|
|
|
256ebe |
ec_manager_lookup, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1033,7 +1034,7 @@ ec_manager_statfs(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_statfs(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_statfs_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_statfs_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.statfs = func};
|
|
|
256ebe |
@@ -1047,7 +1048,7 @@ ec_statfs(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_STATFS, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_statfs,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_statfs,
|
|
|
256ebe |
ec_manager_statfs, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1270,7 +1271,7 @@ ec_manager_xattrop(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_xattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_xattrop_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_xattrop_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.xattrop = func};
|
|
|
256ebe |
@@ -1283,9 +1284,9 @@ ec_xattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_XATTROP, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_xattrop, ec_manager_xattrop, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_XATTROP, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_xattrop, ec_manager_xattrop,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1343,7 +1344,7 @@ ec_wind_fxattrop(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fxattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fxattrop_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fxattrop_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
gf_xattrop_flags_t optype, dict_t *xattr, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fxattrop = func};
|
|
|
256ebe |
@@ -1356,9 +1357,9 @@ ec_fxattrop(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FXATTROP, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_fxattrop, ec_manager_xattrop, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FXATTROP, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_fxattrop, ec_manager_xattrop,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1507,8 +1508,9 @@ ec_manager_ipc(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_ipc(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_ipc_cbk_t func, void *data, int32_t op, dict_t *xdata)
|
|
|
256ebe |
+ec_ipc(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_ipc_cbk_t func, void *data, int32_t op,
|
|
|
256ebe |
+ dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.ipc = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1520,7 +1522,7 @@ ec_ipc(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_IPC, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_IPC, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_ipc, ec_manager_ipc, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
|
|
|
256ebe |
index 1ca12c1..3aa04fb 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-heal.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-heal.c
|
|
|
256ebe |
@@ -367,16 +367,16 @@ ec_heal_data_block(ec_heal_t *heal)
|
|
|
256ebe |
/* FOP: fheal */
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fheal(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fheal_cbk_t func, void *data, fd_t *fd, int32_t partial,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_fheal(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fheal_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ int32_t partial, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_fd_t *ctx = ec_fd_get(fd, this);
|
|
|
256ebe |
|
|
|
256ebe |
if (ctx != NULL) {
|
|
|
256ebe |
gf_msg_trace("ec", 0, "FHEAL ctx: flags=%X, open=%" PRIXPTR, ctx->flags,
|
|
|
256ebe |
ctx->open);
|
|
|
256ebe |
- ec_heal(frame, this, target, minimum, func, data, &ctx->loc, partial,
|
|
|
256ebe |
+ ec_heal(frame, this, target, fop_flags, func, data, &ctx->loc, partial,
|
|
|
256ebe |
xdata);
|
|
|
256ebe |
}
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1975,7 +1975,7 @@ ec_manager_heal_block(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
/*Takes lock */
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_heal_block(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_heal_cbk_t func, ec_heal_t *heal)
|
|
|
256ebe |
+ uint32_t fop_flags, fop_heal_cbk_t func, ec_heal_t *heal)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.heal = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1986,7 +1986,7 @@ ec_heal_block(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
VALIDATE_OR_GOTO(this, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, EC_FOP_HEAL, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, EC_FOP_HEAL, 0, target, fop_flags,
|
|
|
256ebe |
NULL, ec_manager_heal_block, callback, heal);
|
|
|
256ebe |
if (fop == NULL)
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -2761,9 +2761,9 @@ ec_heal_throttle(xlator_t *this, ec_fop_data_t *fop)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_heal(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_heal_cbk_t func, void *data, loc_t *loc, int32_t partial,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_heal(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_heal_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int32_t partial, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.heal = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -2779,7 +2779,7 @@ ec_heal(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
|
|
|
256ebe |
if (frame && frame->local)
|
|
|
256ebe |
goto fail;
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, EC_FOP_HEAL, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, EC_FOP_HEAL, 0, target, fop_flags,
|
|
|
256ebe |
NULL, NULL, callback, data);
|
|
|
256ebe |
|
|
|
256ebe |
err = ENOMEM;
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c
|
|
|
256ebe |
index 55e5934..f87a94a 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-inode-read.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-inode-read.c
|
|
|
256ebe |
@@ -135,7 +135,7 @@ ec_manager_access(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_access(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_access_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_access_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
int32_t mask, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.access = func};
|
|
|
256ebe |
@@ -149,7 +149,7 @@ ec_access(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_ACCESS, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_access,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_access,
|
|
|
256ebe |
ec_manager_access, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -446,7 +446,7 @@ out:
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_getxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_getxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_getxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
const char *name, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.getxattr = func};
|
|
|
256ebe |
@@ -468,7 +468,7 @@ ec_getxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(
|
|
|
256ebe |
- frame, this, GF_FOP_GETXATTR, EC_FLAG_LOCK_SHARED, target, minimum,
|
|
|
256ebe |
+ frame, this, GF_FOP_GETXATTR, EC_FLAG_LOCK_SHARED, target, fop_flags,
|
|
|
256ebe |
ec_wind_getxattr, ec_manager_getxattr, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -588,7 +588,7 @@ ec_wind_fgetxattr(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fgetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fgetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fgetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
const char *name, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fgetxattr = func};
|
|
|
256ebe |
@@ -602,7 +602,7 @@ ec_fgetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(
|
|
|
256ebe |
- frame, this, GF_FOP_FGETXATTR, EC_FLAG_LOCK_SHARED, target, minimum,
|
|
|
256ebe |
+ frame, this, GF_FOP_FGETXATTR, EC_FLAG_LOCK_SHARED, target, fop_flags,
|
|
|
256ebe |
ec_wind_fgetxattr, ec_manager_getxattr, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -869,9 +869,9 @@ ec_manager_open(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_open(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_open_cbk_t func, void *data, loc_t *loc, int32_t flags, fd_t *fd,
|
|
|
256ebe |
- dict_t *xdata)
|
|
|
256ebe |
+ec_open(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_open_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ int32_t flags, fd_t *fd, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.open = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -884,7 +884,7 @@ ec_open(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_OPEN, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_open, ec_manager_open,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_open, ec_manager_open,
|
|
|
256ebe |
callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1071,7 +1071,7 @@ ec_manager_readlink(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_readlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_readlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readlink_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
size_t size, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.readlink = func};
|
|
|
256ebe |
@@ -1085,7 +1085,7 @@ ec_readlink(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(
|
|
|
256ebe |
- frame, this, GF_FOP_READLINK, EC_FLAG_LOCK_SHARED, target, minimum,
|
|
|
256ebe |
+ frame, this, GF_FOP_READLINK, EC_FLAG_LOCK_SHARED, target, fop_flags,
|
|
|
256ebe |
ec_wind_readlink, ec_manager_readlink, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1417,9 +1417,9 @@ ec_manager_readv(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_readv(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_readv_cbk_t func, void *data, fd_t *fd, size_t size, off_t offset,
|
|
|
256ebe |
- uint32_t flags, dict_t *xdata)
|
|
|
256ebe |
+ec_readv(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_readv_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ size_t size, off_t offset, uint32_t flags, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.readv = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1432,8 +1432,8 @@ ec_readv(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_READ, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_readv, ec_manager_readv,
|
|
|
256ebe |
- callback, data);
|
|
|
256ebe |
+ target, fop_flags, ec_wind_readv,
|
|
|
256ebe |
+ ec_manager_readv, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1637,9 +1637,9 @@ ec_manager_seek(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_seek(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_seek_cbk_t func, void *data, fd_t *fd, off_t offset,
|
|
|
256ebe |
- gf_seek_what_t what, dict_t *xdata)
|
|
|
256ebe |
+ec_seek(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_seek_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ off_t offset, gf_seek_what_t what, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.seek = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1652,7 +1652,7 @@ ec_seek(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_SEEK, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_seek, ec_manager_seek,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_seek, ec_manager_seek,
|
|
|
256ebe |
callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1855,8 +1855,9 @@ ec_manager_stat(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_stat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_stat_cbk_t func, void *data, loc_t *loc, dict_t *xdata)
|
|
|
256ebe |
+ec_stat(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_stat_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.stat = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1869,7 +1870,7 @@ ec_stat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_STAT, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_stat, ec_manager_stat,
|
|
|
256ebe |
+ target, fop_flags, ec_wind_stat, ec_manager_stat,
|
|
|
256ebe |
callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1965,8 +1966,9 @@ ec_wind_fstat(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_fstat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
- fop_fstat_cbk_t func, void *data, fd_t *fd, dict_t *xdata)
|
|
|
256ebe |
+ec_fstat(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fstat_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fstat = func};
|
|
|
256ebe |
ec_fop_data_t *fop = NULL;
|
|
|
256ebe |
@@ -1979,8 +1981,8 @@ ec_fstat(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_FSTAT, EC_FLAG_LOCK_SHARED,
|
|
|
256ebe |
- target, minimum, ec_wind_fstat, ec_manager_stat,
|
|
|
256ebe |
- callback, data);
|
|
|
256ebe |
+ target, fop_flags, ec_wind_fstat,
|
|
|
256ebe |
+ ec_manager_stat, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-inode-write.c b/xlators/cluster/ec/src/ec-inode-write.c
|
|
|
256ebe |
index e7b34e6..a903664 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-inode-write.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-inode-write.c
|
|
|
256ebe |
@@ -281,7 +281,7 @@ ec_manager_xattr(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_removexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_removexattr_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_removexattr_cbk_t func, void *data,
|
|
|
256ebe |
loc_t *loc, const char *name, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.removexattr = func};
|
|
|
256ebe |
@@ -295,7 +295,7 @@ ec_removexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_REMOVEXATTR, 0, target,
|
|
|
256ebe |
- minimum, ec_wind_removexattr, ec_manager_xattr,
|
|
|
256ebe |
+ fop_flags, ec_wind_removexattr, ec_manager_xattr,
|
|
|
256ebe |
callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -361,7 +361,7 @@ ec_wind_fremovexattr(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fremovexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fremovexattr_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fremovexattr_cbk_t func, void *data,
|
|
|
256ebe |
fd_t *fd, const char *name, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fremovexattr = func};
|
|
|
256ebe |
@@ -375,8 +375,8 @@ ec_fremovexattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_FREMOVEXATTR, 0, target,
|
|
|
256ebe |
- minimum, ec_wind_fremovexattr, ec_manager_xattr,
|
|
|
256ebe |
- callback, data);
|
|
|
256ebe |
+ fop_flags, ec_wind_fremovexattr,
|
|
|
256ebe |
+ ec_manager_xattr, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -550,7 +550,7 @@ ec_manager_setattr(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_setattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_setattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_setattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
struct iatt *stbuf, int32_t valid, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.setattr = func};
|
|
|
256ebe |
@@ -563,9 +563,9 @@ ec_setattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_SETATTR, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_setattr, ec_manager_setattr, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_SETATTR, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_setattr, ec_manager_setattr,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -627,7 +627,7 @@ ec_wind_fsetattr(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsetattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsetattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsetattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
struct iatt *stbuf, int32_t valid, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fsetattr = func};
|
|
|
256ebe |
@@ -640,9 +640,9 @@ ec_fsetattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FSETATTR, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_fsetattr, ec_manager_setattr, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FSETATTR, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_fsetattr, ec_manager_setattr,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -707,7 +707,7 @@ ec_wind_setxattr(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_setxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_setxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_setxattr_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
dict_t *dict, int32_t flags, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.setxattr = func};
|
|
|
256ebe |
@@ -720,9 +720,9 @@ ec_setxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_SETXATTR, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_setxattr, ec_manager_xattr, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_SETXATTR, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_setxattr, ec_manager_xattr,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -825,7 +825,7 @@ ec_wind_fsetxattr(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fsetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fsetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fsetxattr_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
dict_t *dict, int32_t flags, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fsetxattr = func};
|
|
|
256ebe |
@@ -839,7 +839,7 @@ ec_fsetxattr(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_FSETXATTR, 0, target,
|
|
|
256ebe |
- minimum, ec_wind_fsetxattr, ec_manager_xattr,
|
|
|
256ebe |
+ fop_flags, ec_wind_fsetxattr, ec_manager_xattr,
|
|
|
256ebe |
callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
@@ -1035,7 +1035,7 @@ ec_manager_fallocate(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fallocate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fallocate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fallocate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
int32_t mode, off_t offset, size_t len, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.fallocate = func};
|
|
|
256ebe |
@@ -1049,8 +1049,8 @@ ec_fallocate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_FALLOCATE, 0, target,
|
|
|
256ebe |
- minimum, ec_wind_fallocate, ec_manager_fallocate,
|
|
|
256ebe |
- callback, data);
|
|
|
256ebe |
+ fop_flags, ec_wind_fallocate,
|
|
|
256ebe |
+ ec_manager_fallocate, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1209,8 +1209,8 @@ ec_manager_discard(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
ec_dispatch_all(fop);
|
|
|
256ebe |
return EC_STATE_DELAYED_START;
|
|
|
256ebe |
} else {
|
|
|
256ebe |
- /*Assume discard to have succeeded on mask*/
|
|
|
256ebe |
- fop->good = fop->mask;
|
|
|
256ebe |
+ /* Assume discard to have succeeded on all bricks */
|
|
|
256ebe |
+ ec_succeed_all(fop);
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
/* Fall through */
|
|
|
256ebe |
@@ -1289,7 +1289,7 @@ ec_manager_discard(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_discard(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_discard_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_discard_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
off_t offset, size_t len, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.discard = func};
|
|
|
256ebe |
@@ -1302,9 +1302,9 @@ ec_discard(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_DISCARD, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_discard, ec_manager_discard, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_DISCARD, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_discard, ec_manager_discard,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1530,7 +1530,7 @@ ec_manager_truncate(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_truncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_truncate_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_truncate_cbk_t func, void *data, loc_t *loc,
|
|
|
256ebe |
off_t offset, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.truncate = func};
|
|
|
256ebe |
@@ -1543,9 +1543,9 @@ ec_truncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_TRUNCATE, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_truncate, ec_manager_truncate, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_TRUNCATE, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_truncate, ec_manager_truncate,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1604,7 +1604,7 @@ ec_wind_ftruncate(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_ftruncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_ftruncate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_ftruncate_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
off_t offset, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
ec_cbk_t callback = {.ftruncate = func};
|
|
|
256ebe |
@@ -1618,8 +1618,8 @@ ec_ftruncate(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
fop = ec_fop_data_allocate(frame, this, GF_FOP_FTRUNCATE, 0, target,
|
|
|
256ebe |
- minimum, ec_wind_ftruncate, ec_manager_truncate,
|
|
|
256ebe |
- callback, data);
|
|
|
256ebe |
+ fop_flags, ec_wind_ftruncate,
|
|
|
256ebe |
+ ec_manager_truncate, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -2262,7 +2262,7 @@ ec_manager_writev(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_writev(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_writev_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_writev_cbk_t func, void *data, fd_t *fd,
|
|
|
256ebe |
struct iovec *vector, int32_t count, off_t offset, uint32_t flags,
|
|
|
256ebe |
struct iobref *iobref, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -2276,7 +2276,7 @@ ec_writev(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_WRITE, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_WRITE, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_writev, ec_manager_writev, callback,
|
|
|
256ebe |
data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-locks.c b/xlators/cluster/ec/src/ec-locks.c
|
|
|
256ebe |
index f978af0..ffcac07 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-locks.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-locks.c
|
|
|
256ebe |
@@ -275,7 +275,7 @@ ec_manager_entrylk(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_entrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_entrylk_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_entrylk_cbk_t func, void *data,
|
|
|
256ebe |
const char *volume, loc_t *loc, const char *basename,
|
|
|
256ebe |
entrylk_cmd cmd, entrylk_type type, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -288,9 +288,9 @@ ec_entrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_ENTRYLK, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_entrylk, ec_manager_entrylk, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_ENTRYLK, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_entrylk, ec_manager_entrylk,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -403,7 +403,7 @@ ec_wind_fentrylk(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_fentrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
- int32_t minimum, fop_fentrylk_cbk_t func, void *data,
|
|
|
256ebe |
+ uint32_t fop_flags, fop_fentrylk_cbk_t func, void *data,
|
|
|
256ebe |
const char *volume, fd_t *fd, const char *basename, entrylk_cmd cmd,
|
|
|
256ebe |
entrylk_type type, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -416,9 +416,9 @@ ec_fentrylk(call_frame_t *frame, xlator_t *this, uintptr_t target,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FENTRYLK, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_fentrylk, ec_manager_entrylk, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FENTRYLK, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_fentrylk, ec_manager_entrylk,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -650,7 +650,7 @@ ec_manager_inodelk(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_inodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
- uintptr_t target, int32_t minimum, fop_inodelk_cbk_t func,
|
|
|
256ebe |
+ uintptr_t target, uint32_t fop_flags, fop_inodelk_cbk_t func,
|
|
|
256ebe |
void *data, const char *volume, loc_t *loc, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -664,9 +664,9 @@ ec_inodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_INODELK, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_inodelk, ec_manager_inodelk, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_INODELK, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_inodelk, ec_manager_inodelk,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -782,7 +782,7 @@ ec_wind_finodelk(ec_t *ec, ec_fop_data_t *fop, int32_t idx)
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
ec_finodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
- uintptr_t target, int32_t minimum, fop_finodelk_cbk_t func,
|
|
|
256ebe |
+ uintptr_t target, uint32_t fop_flags, fop_finodelk_cbk_t func,
|
|
|
256ebe |
void *data, const char *volume, fd_t *fd, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -796,9 +796,9 @@ ec_finodelk(call_frame_t *frame, xlator_t *this, gf_lkowner_t *owner,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_FINODELK, 0, target, minimum,
|
|
|
256ebe |
- ec_wind_finodelk, ec_manager_inodelk, callback,
|
|
|
256ebe |
- data);
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_FINODELK, 0, target,
|
|
|
256ebe |
+ fop_flags, ec_wind_finodelk, ec_manager_inodelk,
|
|
|
256ebe |
+ callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -1032,7 +1032,7 @@ ec_manager_lk(ec_fop_data_t *fop, int32_t state)
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
void
|
|
|
256ebe |
-ec_lk(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
+ec_lk(call_frame_t *frame, xlator_t *this, uintptr_t target, uint32_t fop_flags,
|
|
|
256ebe |
fop_lk_cbk_t func, void *data, fd_t *fd, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
@@ -1045,7 +1045,7 @@ ec_lk(call_frame_t *frame, xlator_t *this, uintptr_t target, int32_t minimum,
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, frame, out);
|
|
|
256ebe |
GF_VALIDATE_OR_GOTO(this->name, this->private, out);
|
|
|
256ebe |
|
|
|
256ebe |
- fop = ec_fop_data_allocate(frame, this, GF_FOP_LK, 0, target, minimum,
|
|
|
256ebe |
+ fop = ec_fop_data_allocate(frame, this, GF_FOP_LK, 0, target, fop_flags,
|
|
|
256ebe |
ec_wind_lk, ec_manager_lk, callback, data);
|
|
|
256ebe |
if (fop == NULL) {
|
|
|
256ebe |
goto out;
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h
|
|
|
256ebe |
index 6ae4a2b..1c295c0 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec-types.h
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec-types.h
|
|
|
256ebe |
@@ -308,9 +308,9 @@ struct _ec_fop_data {
|
|
|
256ebe |
int32_t id; /* ID of the file operation */
|
|
|
256ebe |
int32_t refs;
|
|
|
256ebe |
int32_t state;
|
|
|
256ebe |
- int32_t minimum; /* Minimum number of successful
|
|
|
256ebe |
- operation required to conclude a
|
|
|
256ebe |
- fop as successful */
|
|
|
256ebe |
+ uint32_t minimum; /* Minimum number of successful
|
|
|
256ebe |
+ operation required to conclude a
|
|
|
256ebe |
+ fop as successful */
|
|
|
256ebe |
int32_t expected;
|
|
|
256ebe |
int32_t winds;
|
|
|
256ebe |
int32_t jobs;
|
|
|
256ebe |
@@ -325,11 +325,12 @@ struct _ec_fop_data {
|
|
|
256ebe |
ec_cbk_data_t *answer; /* accepted answer */
|
|
|
256ebe |
int32_t lock_count;
|
|
|
256ebe |
int32_t locked;
|
|
|
256ebe |
+ gf_lock_t lock;
|
|
|
256ebe |
ec_lock_link_t locks[2];
|
|
|
256ebe |
int32_t first_lock;
|
|
|
256ebe |
- gf_lock_t lock;
|
|
|
256ebe |
|
|
|
256ebe |
- uint32_t flags;
|
|
|
256ebe |
+ uint32_t fop_flags; /* Flags passed by the caller. */
|
|
|
256ebe |
+ uint32_t flags; /* Internal flags. */
|
|
|
256ebe |
uint32_t first;
|
|
|
256ebe |
uintptr_t mask;
|
|
|
256ebe |
uintptr_t healing; /*Dispatch is done but call is successful only
|
|
|
256ebe |
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
|
|
|
256ebe |
index 13ffeb9..3c8013e 100644
|
|
|
256ebe |
--- a/xlators/cluster/ec/src/ec.c
|
|
|
256ebe |
+++ b/xlators/cluster/ec/src/ec.c
|
|
|
256ebe |
@@ -797,11 +797,12 @@ ec_gf_entrylk(call_frame_t *frame, xlator_t *this, const char *volume,
|
|
|
256ebe |
loc_t *loc, const char *basename, entrylk_cmd cmd,
|
|
|
256ebe |
entrylk_type type, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ uint32_t fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
+
|
|
|
256ebe |
if (cmd == ENTRYLK_UNLOCK)
|
|
|
256ebe |
- minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
- ec_entrylk(frame, this, -1, minimum, default_entrylk_cbk, NULL, volume, loc,
|
|
|
256ebe |
- basename, cmd, type, xdata);
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ ec_entrylk(frame, this, -1, fop_flags, default_entrylk_cbk, NULL, volume,
|
|
|
256ebe |
+ loc, basename, cmd, type, xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
}
|
|
|
256ebe |
@@ -811,10 +812,11 @@ ec_gf_fentrylk(call_frame_t *frame, xlator_t *this, const char *volume,
|
|
|
256ebe |
fd_t *fd, const char *basename, entrylk_cmd cmd,
|
|
|
256ebe |
entrylk_type type, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ uint32_t fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
+
|
|
|
256ebe |
if (cmd == ENTRYLK_UNLOCK)
|
|
|
256ebe |
- minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
- ec_fentrylk(frame, this, -1, minimum, default_fentrylk_cbk, NULL, volume,
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ ec_fentrylk(frame, this, -1, fop_flags, default_fentrylk_cbk, NULL, volume,
|
|
|
256ebe |
fd, basename, cmd, type, xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
@@ -905,7 +907,7 @@ ec_gf_getxattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
256ebe |
{
|
|
|
256ebe |
int error = 0;
|
|
|
256ebe |
ec_t *ec = this->private;
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ int32_t fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
|
|
|
256ebe |
if (name && strcmp(name, EC_XATTR_HEAL) != 0) {
|
|
|
256ebe |
EC_INTERNAL_XATTR_OR_GOTO(name, NULL, error, out);
|
|
|
256ebe |
@@ -920,11 +922,11 @@ ec_gf_getxattr(call_frame_t *frame, xlator_t *this, loc_t *loc,
|
|
|
256ebe |
|
|
|
256ebe |
if (name && ((fnmatch(GF_XATTR_STIME_PATTERN, name, 0) == 0) ||
|
|
|
256ebe |
XATTR_IS_NODE_UUID(name) || XATTR_IS_NODE_UUID_LIST(name))) {
|
|
|
256ebe |
- minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
}
|
|
|
256ebe |
|
|
|
256ebe |
- ec_getxattr(frame, this, -1, minimum, default_getxattr_cbk, NULL, loc, name,
|
|
|
256ebe |
- xdata);
|
|
|
256ebe |
+ ec_getxattr(frame, this, -1, fop_flags, default_getxattr_cbk, NULL, loc,
|
|
|
256ebe |
+ name, xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
out:
|
|
|
256ebe |
@@ -954,11 +956,12 @@ int32_t
|
|
|
256ebe |
ec_gf_inodelk(call_frame_t *frame, xlator_t *this, const char *volume,
|
|
|
256ebe |
loc_t *loc, int32_t cmd, struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ int32_t fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
+
|
|
|
256ebe |
if (flock->l_type == F_UNLCK)
|
|
|
256ebe |
- minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
|
|
|
256ebe |
- ec_inodelk(frame, this, &frame->root->lk_owner, -1, minimum,
|
|
|
256ebe |
+ ec_inodelk(frame, this, &frame->root->lk_owner, -1, fop_flags,
|
|
|
256ebe |
default_inodelk_cbk, NULL, volume, loc, cmd, flock, xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
@@ -968,10 +971,11 @@ int32_t
|
|
|
256ebe |
ec_gf_finodelk(call_frame_t *frame, xlator_t *this, const char *volume,
|
|
|
256ebe |
fd_t *fd, int32_t cmd, struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ int32_t fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
+
|
|
|
256ebe |
if (flock->l_type == F_UNLCK)
|
|
|
256ebe |
- minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
- ec_finodelk(frame, this, &frame->root->lk_owner, -1, minimum,
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ ec_finodelk(frame, this, &frame->root->lk_owner, -1, fop_flags,
|
|
|
256ebe |
default_finodelk_cbk, NULL, volume, fd, cmd, flock, xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
@@ -991,10 +995,11 @@ int32_t
|
|
|
256ebe |
ec_gf_lk(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
|
|
|
256ebe |
struct gf_flock *flock, dict_t *xdata)
|
|
|
256ebe |
{
|
|
|
256ebe |
- int32_t minimum = EC_MINIMUM_ALL;
|
|
|
256ebe |
+ int32_t fop_flags = EC_MINIMUM_ALL;
|
|
|
256ebe |
+
|
|
|
256ebe |
if (flock->l_type == F_UNLCK)
|
|
|
256ebe |
- minimum = EC_MINIMUM_ONE;
|
|
|
256ebe |
- ec_lk(frame, this, -1, minimum, default_lk_cbk, NULL, fd, cmd, flock,
|
|
|
256ebe |
+ fop_flags = EC_MINIMUM_ONE;
|
|
|
256ebe |
+ ec_lk(frame, this, -1, fop_flags, default_lk_cbk, NULL, fd, cmd, flock,
|
|
|
256ebe |
xdata);
|
|
|
256ebe |
|
|
|
256ebe |
return 0;
|
|
|
256ebe |
--
|
|
|
256ebe |
1.8.3.1
|
|
|
256ebe |
|