diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2017-12-06 07:59:53 +0530 |
---|---|---|
committer | Pranith Kumar K <pkarampu@redhat.com> | 2017-12-22 14:55:29 +0530 |
commit | c96a1338fe8139d07a0aa1bc40f0843d033f0324 (patch) | |
tree | dda04fd3366565b2524a85091d29c3a55a5fb544 /libglusterfs/src | |
parent | 85d321b21c0e982866fd2c83b91b71de458dd043 (diff) | |
download | glusterfs-c96a1338fe8139d07a0aa1bc40f0843d033f0324.tar.gz glusterfs-c96a1338fe8139d07a0aa1bc40f0843d033f0324.tar.xz glusterfs-c96a1338fe8139d07a0aa1bc40f0843d033f0324.zip |
cluster/ec: Change [f]getxattr to parallel-dispatch-one
At the moment in EC, [f]getxattr operations wait to acquire a lock
while other operations are in progress even when it is in the same mount with a
lock on the file/directory. This happens because [f]getxattr operations
follow the model where the operation is wound on 'k' of the bricks and are
matched to make sure the data returned is same on all of them. This consistency
check requires that no other operations are on-going while [f]getxattr
operations are wound to the bricks. We can perform [f]getxattr in
another way as well, where we find the good_mask from the lock that is already
granted and wind the operation on any one of the good bricks and unwind the
answer after adjusting size/blocks to the parent xlator. Since we are taking
into account good_mask, the reply we get will either be before or after a
possible on-going operation. Using this method, the operation doesn't need to
depend on completion of on-going operations which could be taking long time (In
case of some slow disks and writes are in progress etc). Thus we reduce the
time to serve [f]getxattr requests.
I changed [f]getxattr to dispatch-one and added extra logic in
ec_link_has_lock_conflict() to not have any conflicts for fops with
EC_MINIMUM_ONE as fop->minimum to achieve the effect described above.
Modified scripts to make sure READ fop is received in EC to trigger heals.
Updates gluster/glusterfs#368
Change-Id: I3b4ebf89181c336b7b8d5471b0454f016cdaf296
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r-- | libglusterfs/src/glusterfs.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index 4dee7f00ce..75c12dc6d3 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -72,6 +72,9 @@ #define FNM_EXTMATCH 0 #endif +/*gets max-offset on all architectures correctly*/ +#define GF_OFF_MAX ((1ULL << (sizeof(off_t) * 8 - 1)) - 1ULL) + #define GLUSTERD_MAX_SNAP_NAME 255 #define GLUSTERFS_SOCKET_LISTEN_BACKLOG 10 #define ZR_MOUNTPOINT_OPT "mountpoint" |