<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/performance/nl-cache/src/nl-cache.c, branch v4.1.3</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>xlators/performance: Add pass-through option</title>
<updated>2018-04-11T10:53:48+00:00</updated>
<author>
<name>Varsha Rao</name>
<email>varao@redhat.com</email>
</author>
<published>2018-03-16T08:53:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=909e2cdf06fbd7b4161fff402fc6ef7b5e189c21'/>
<id>909e2cdf06fbd7b4161fff402fc6ef7b5e189c21</id>
<content type='text'>
Add pass-through option in performance traslators. Set the option in
GF_OPTION_INIT() and GF_OPTION_RECONF()

Updates: #304

Change-Id: If1537450147d154905831e36f7162a32866d7ad6
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add pass-through option in performance traslators. Set the option in
GF_OPTION_INIT() and GF_OPTION_RECONF()

Updates: #304

Change-Id: If1537450147d154905831e36f7162a32866d7ad6
Signed-off-by: Varsha Rao &lt;varao@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Provide statistics to the monitor</title>
<updated>2018-03-24T05:38:26+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2018-03-13T12:21:29+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e043938e2895e4072a3c60b4a0063ef66d34f7b3'/>
<id>e043938e2895e4072a3c60b4a0063ef66d34f7b3</id>
<content type='text'>
Updates: #429

Change-Id: Ic2e64422055f1838d5d453643c739ef1e9319cfe
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Updates: #429

Change-Id: Ic2e64422055f1838d5d453643c739ef1e9319cfe
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Fix coverity issue RESOURCE_LEAK</title>
<updated>2018-03-06T05:04:06+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2018-02-19T15:18:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=e8446ef31234b44f29bb9a77081023927ef1404d'/>
<id>e8446ef31234b44f29bb9a77081023927ef1404d</id>
<content type='text'>
Change-Id: Ic552f31853e1886b8c76d45c8c66251f1fd6f97f
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic552f31853e1886b8c76d45c8c66251f1fd6f97f
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Change the options to be gd2 compatible</title>
<updated>2018-02-26T02:29:08+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2018-02-20T06:08:44+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=55d804a62e5c01a566d96a414d649b93bc12345c'/>
<id>55d804a62e5c01a566d96a414d649b93bc12345c</id>
<content type='text'>
Change-Id: Ib9d233df41b85c845643e3e6eb2d680e01859a43
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ib9d233df41b85c845643e3e6eb2d680e01859a43
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs/atomic: Improved atomic support</title>
<updated>2017-11-14T05:22:00+00:00</updated>
<author>
<name>Xavier Hernandez</name>
<email>jahernan@redhat.com</email>
</author>
<published>2017-11-07T12:45:03+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3f8d118e48f11f448f35aca0c48ad40e0fd34f5b'/>
<id>3f8d118e48f11f448f35aca0c48ad40e0fd34f5b</id>
<content type='text'>
This patch solves a detection problem in configure.ac that prevented
that compilation detects builtin __atomic or __sync functions.

It also adds more atomic types and support for other atomic functions.

An special case has been added to support 64-bit atomics on 32-bit
systems. The solution is to fallback to the mutex solution only for
64-bit atomics, but smaller atomic types will still take advantage
of builtins if available.

Change-Id: I6b9afc7cd6e66b28a33278715583552872278801
BUG: 1510397
Signed-off-by: Xavier Hernandez &lt;jahernan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch solves a detection problem in configure.ac that prevented
that compilation detects builtin __atomic or __sync functions.

It also adds more atomic types and support for other atomic functions.

An special case has been added to support 64-bit atomics on 32-bit
systems. The solution is to fallback to the mutex solution only for
64-bit atomics, but smaller atomic types will still take advantage
of builtins if available.

Change-Id: I6b9afc7cd6e66b28a33278715583552872278801
BUG: 1510397
Signed-off-by: Xavier Hernandez &lt;jahernan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Fix a possible crash and stale cache</title>
<updated>2017-06-13T05:01:17+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2017-05-26T10:15:57+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7674584fa53944a4e982e217798f31a3d1ef313b'/>
<id>7674584fa53944a4e982e217798f31a3d1ef313b</id>
<content type='text'>
Issue1:
Consider the followinf sequence of operations:
   ...
   nlc_ctx = nlc_ctx_get (inode i1)
   ....... -&gt; nlc_clear_cache (i1) gets called as a part of nlc_invalidate
                                   or any other callers
              ...
              GF_FREE (ii nlc_ctx)
   LOCK (nlc_ctx-&gt;lock);  -&gt;  This will result in crash as the ctx
                              got freed in nlc_clear_cache.

Issue2:
   lookup on dir1/file1 result in ENOENT
   add cache to dir1 at time T1
   ....
   CHILD_DOWN at T2
   lookup on dir1/file2 result in ENOENT
   add cache to dir1, but the cache time is still T1
   lookup on dir1/file2 - should have been served from cache
                          but the cache time is T1 &lt; T2, hence
                          cache is considered as invalid.
So, after CHILD_DOWN the right thing would be to clear the cache
and restart caching on that inode.

Solution:
Do not free nlc_ctx in nlc_clear_cache, but only in inode_forget()
The fix for both issue1 and 2 is interleaved hence sending it as
single patch.

Change-Id: I83d8ed36c049a93567c6d7e63d045dc14ccbb397
BUG: 1458539
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17453
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue1:
Consider the followinf sequence of operations:
   ...
   nlc_ctx = nlc_ctx_get (inode i1)
   ....... -&gt; nlc_clear_cache (i1) gets called as a part of nlc_invalidate
                                   or any other callers
              ...
              GF_FREE (ii nlc_ctx)
   LOCK (nlc_ctx-&gt;lock);  -&gt;  This will result in crash as the ctx
                              got freed in nlc_clear_cache.

Issue2:
   lookup on dir1/file1 result in ENOENT
   add cache to dir1 at time T1
   ....
   CHILD_DOWN at T2
   lookup on dir1/file2 result in ENOENT
   add cache to dir1, but the cache time is still T1
   lookup on dir1/file2 - should have been served from cache
                          but the cache time is T1 &lt; T2, hence
                          cache is considered as invalid.
So, after CHILD_DOWN the right thing would be to clear the cache
and restart caching on that inode.

Solution:
Do not free nlc_ctx in nlc_clear_cache, but only in inode_forget()
The fix for both issue1 and 2 is interleaved hence sending it as
single patch.

Change-Id: I83d8ed36c049a93567c6d7e63d045dc14ccbb397
BUG: 1458539
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17453
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Remove null check validation for frame-&gt;local in lookup cbk</title>
<updated>2017-05-30T15:34:51+00:00</updated>
<author>
<name>Ravishankar N</name>
<email>ravishankar@redhat.com</email>
</author>
<published>2017-05-30T04:48:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=ec86167d09bcbb763e31b73fb3d688efaa5444d7'/>
<id>ec86167d09bcbb763e31b73fb3d688efaa5444d7</id>
<content type='text'>
For nameless lookups, nl-cache does not init frame local, so the cbk
throws up messages like these flooding the logs, especially whenenver
gfid lookup on '/' is done (i.e. loc.path="/" and loc.gfid=1).

[2017-05-30 04:35:31.628443] E [nl-cache.c:201:nlc_lookup_cbk]
(--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/io-cache.so(+0x3d81)
[0x7f0883005d81]
--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/quick-read.so(+0x3127)
[0x7f0882dfb127]
--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/nl-cache.so(+0x4cd3)
[0x7f08829e0cd3] ) 0-distrep-nl-cache: invalid argument: local [Invalid
argument]

Fixed it.

Change-Id: I21cb44a9d2a324617e43f46fed83c9a0942d3a0b
BUG: 1456653
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17417
Tested-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For nameless lookups, nl-cache does not init frame local, so the cbk
throws up messages like these flooding the logs, especially whenenver
gfid lookup on '/' is done (i.e. loc.path="/" and loc.gfid=1).

[2017-05-30 04:35:31.628443] E [nl-cache.c:201:nlc_lookup_cbk]
(--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/io-cache.so(+0x3d81)
[0x7f0883005d81]
--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/quick-read.so(+0x3127)
[0x7f0882dfb127]
--&gt;/usr/lib64/glusterfs/3.8.4/xlator/performance/nl-cache.so(+0x4cd3)
[0x7f08829e0cd3] ) 0-distrep-nl-cache: invalid argument: local [Invalid
argument]

Fixed it.

Change-Id: I21cb44a9d2a324617e43f46fed83c9a0942d3a0b
BUG: 1456653
Signed-off-by: Ravishankar N &lt;ravishankar@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17417
Tested-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Poornima G &lt;pgurusid@redhat.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: In case of nameless operations do not cache</title>
<updated>2017-05-22T12:39:59+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2017-05-16T13:55:20+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=284cd8851bfe60984d2f11b5c52fe3204ff43b06'/>
<id>284cd8851bfe60984d2f11b5c52fe3204ff43b06</id>
<content type='text'>
Issue:
In nameless lookup/other fops, parent inode will be NULL, when we try
to add the cache to the NULL inode, it causes a crash.

Hence handle the scenario of nameless fops, and do not cache/serve
the nameless fops.

Change-Id: I3b90f882ac89e6aaf3419db89e6f890797f37700
BUG: 1451588
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17316
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:
In nameless lookup/other fops, parent inode will be NULL, when we try
to add the cache to the NULL inode, it causes a crash.

Hence handle the scenario of nameless fops, and do not cache/serve
the nameless fops.

Change-Id: I3b90f882ac89e6aaf3419db89e6f890797f37700
BUG: 1451588
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17316
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: Remove the max limit for nl-cache-limit and nl-cache-timeout</title>
<updated>2017-05-15T12:18:08+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2017-05-12T04:57:28+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=64f41b962b643b966e376a10a16671c569bf6299'/>
<id>64f41b962b643b966e376a10a16671c569bf6299</id>
<content type='text'>
The max limit is better unset when arbitrary. Otherwise in the future
if max has to be changed, it can break backward compatility.

Change-Id: I4337a3789a2d0d5cc8e2bf687a22536c97608461
BUG: 1442569
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17261
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The max limit is better unset when arbitrary. Otherwise in the future
if max has to be changed, it can break backward compatility.

Change-Id: I4337a3789a2d0d5cc8e2bf687a22536c97608461
BUG: 1442569
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17261
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nl-cache: free nlc_conf_t in fini()</title>
<updated>2017-05-02T15:25:08+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2017-04-21T16:36:58+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d7e9dcfad228f385ad64526b1f06b55e98b06964'/>
<id>d7e9dcfad228f385ad64526b1f06b55e98b06964</id>
<content type='text'>
The (xlator_t*)-&gt;private structure in negative-lookup-cache is allocated
in the init() function of the xlator, but never free'd. Valgrind
detected this as:

    656 bytes in 1 blocks are definitely lost in loss record X of Y
       at 0x..+ calloc (/builddir/build/BUILD/valgrind-3.11.0/coregrind/m_replacemalloc/vg_replace_malloc.c:711)
       by 0x.. __gf_calloc (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/mem-pool.c:117)
       by 0x.. init (/usr/src/debug/glusterfs-3.11dev/xlators/performance/nl-cache/src/nl-cache.c:669)
       by 0x.. __xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:472)
       by 0x.. xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:498)
       by 0x.. glusterfs_graph_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:321)
       by 0x.. glusterfs_graph_activate (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:693)
       by 0x.. glfs_process_volfp (/usr/src/debug/glusterfs-3.11dev/api/src/glfs-mgmt.c:79)
       by 0x.. glfs_volumes_init (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:160)
       by 0x.. glfs_init_common (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:868)
       by 0x.. glfs_init@@GFAPI_3.4.0 (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:913)
       by 0x.. main (/root/gluster-debug/gfapi-load-volfile/gfapi-load-volfile.c:54)

When the xlators is unloaded, it should free the resources it allocated.
This can easily be done in the fini() function.

Change-Id: I079e78cc207145bc542e2282fc4cf2bb4dadc28a
BUG: 1442569
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17143
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The (xlator_t*)-&gt;private structure in negative-lookup-cache is allocated
in the init() function of the xlator, but never free'd. Valgrind
detected this as:

    656 bytes in 1 blocks are definitely lost in loss record X of Y
       at 0x..+ calloc (/builddir/build/BUILD/valgrind-3.11.0/coregrind/m_replacemalloc/vg_replace_malloc.c:711)
       by 0x.. __gf_calloc (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/mem-pool.c:117)
       by 0x.. init (/usr/src/debug/glusterfs-3.11dev/xlators/performance/nl-cache/src/nl-cache.c:669)
       by 0x.. __xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:472)
       by 0x.. xlator_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/xlator.c:498)
       by 0x.. glusterfs_graph_init (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:321)
       by 0x.. glusterfs_graph_activate (/usr/src/debug/glusterfs-3.11dev/libglusterfs/src/graph.c:693)
       by 0x.. glfs_process_volfp (/usr/src/debug/glusterfs-3.11dev/api/src/glfs-mgmt.c:79)
       by 0x.. glfs_volumes_init (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:160)
       by 0x.. glfs_init_common (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:868)
       by 0x.. glfs_init@@GFAPI_3.4.0 (/usr/src/debug/glusterfs-3.11dev/api/src/glfs.c:913)
       by 0x.. main (/root/gluster-debug/gfapi-load-volfile/gfapi-load-volfile.c:54)

When the xlators is unloaded, it should free the resources it allocated.
This can easily be done in the fini() function.

Change-Id: I079e78cc207145bc542e2282fc4cf2bb4dadc28a
BUG: 1442569
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: https://review.gluster.org/17143
Smoke: Gluster Build System &lt;jenkins@build.gluster.org&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Jeff Darcy &lt;jeff@pl.atyp.us&gt;
</pre>
</div>
</content>
</entry>
</feed>
