diff options
| author | Pranith Kumar K <pkarampu@redhat.com> | 2013-05-22 15:18:19 +0530 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2013-06-10 13:04:21 -0700 | 
| commit | 2fda7a9de2edd624a03558d9a9a580e5639fef1f (patch) | |
| tree | f1d13045cabeee7bd07be0110f1a58ed6a9838c4 /libglusterfs/src/fd.c | |
| parent | bb0bbfecd609fff1a3890775b3119a552aba0e18 (diff) | |
cluster/afr: Perform delayed changelog wakeups for anon fdv3.4.0beta3
Problem:
Nfs xlator never does open on a file for performing writes,
afr does not perform changelog wakeup for this fd so operations
which do metadata operations as soon as the data operations are
completed perceive a delay od 'post-op-delay-secs'.
Fix:
Perform changelog wakeup on anon-fd if the fd with same pid is
not present in inode-list.
Note:
This approach is a short-term fix. A proper fix needs a new domain
for taking metadata locks so that data/metadata locks don't compete
with each other.
BUG: 966018
Change-Id: Ia9188a253e7943801b665e1b9205e2f551952d87
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/5067
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/fd.c')
| -rw-r--r-- | libglusterfs/src/fd.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index 2f4afc5e87a..36cc4d0561f 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -780,6 +780,23 @@ fd_anonymous (inode_t *inode)          return fd;  } +fd_t* +fd_lookup_anonymous (inode_t *inode) +{ +        fd_t *fd = NULL; + +        if (!inode) { +                gf_log_callingfn ("fd", GF_LOG_WARNING, "!inode"); +                return NULL; +        } + +        LOCK (&inode->lock); +        { +                fd = __fd_lookup_anonymous (inode); +        } +        UNLOCK (&inode->lock); +        return fd; +}  gf_boolean_t  fd_is_anonymous (fd_t *fd)  | 
