<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/cluster/dht/src/switch.c, branch v4.1.8</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>dht: At places needed use STACK_WIND_COOKIE</title>
<updated>2017-01-09T18:37:02+00:00</updated>
<author>
<name>Poornima G</name>
<email>pgurusid@redhat.com</email>
</author>
<published>2016-12-06T09:13:10+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a988741713752c2ec04a0680224d8fa4d42dc203'/>
<id>a988741713752c2ec04a0680224d8fa4d42dc203</id>
<content type='text'>
Issue:
frame has a void * cookie pointer.
In case of STACK_WIND_COOKIE frame-&gt;cookie is assigned
to what is sent by the caller.
In case of STACK_WIND frame-&gt;cookie is assigned to point
point to the frame itself.

For ease of coding, at many places, the cookie in the cbk
is used to get the pointer to the next xl. This is
inconsistent when STACK_WIND_TAIL comes into picture.

Eg: dht_setxattr () {
    for (i = 0 ; i &lt; conf-&gt;subvolume_cnt ; i++) {
       STACK_WIND (..dht_checking_pathinfo_cbk,
                   conf-&gt;subvolumes[i] ..);
    }

    dht_checking_pathinfo_cbk (...void *cookie...) {
        prev = cookie;
        ...
        for (i = 0; i &lt; conf-&gt;subvolume_cnt; i++) {
            if (conf-&gt;subvolumes[i] == prev-&gt;this) {
                 ...
            }
        }
    }

    Consider the below graph:
    dht (parent)
    readdir-ahead  =&gt; Doesn't define setxattr and uses STACK_WIND_TAIL
    protocol-client

    With this graph, when dht_checking_pathinfo_cbk is called,
    cookie will have frame pointing to protocol-client.
    i.e. prev-&gt;this will be protocol-client. But dht was expecting
    it to be readdir-ahead as it has stored in conf-&gt;subvolumes[i]

Solution:
    Hence, as a thumb rule, if cbk is using cookie, then we explicitly
    call STACK_WIND_COOKIE.

Change-Id: I83aea1e24c809c5a91a0db7283e908e125471bd4
BUG: 1401812
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16039
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
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;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:
frame has a void * cookie pointer.
In case of STACK_WIND_COOKIE frame-&gt;cookie is assigned
to what is sent by the caller.
In case of STACK_WIND frame-&gt;cookie is assigned to point
point to the frame itself.

For ease of coding, at many places, the cookie in the cbk
is used to get the pointer to the next xl. This is
inconsistent when STACK_WIND_TAIL comes into picture.

Eg: dht_setxattr () {
    for (i = 0 ; i &lt; conf-&gt;subvolume_cnt ; i++) {
       STACK_WIND (..dht_checking_pathinfo_cbk,
                   conf-&gt;subvolumes[i] ..);
    }

    dht_checking_pathinfo_cbk (...void *cookie...) {
        prev = cookie;
        ...
        for (i = 0; i &lt; conf-&gt;subvolume_cnt; i++) {
            if (conf-&gt;subvolumes[i] == prev-&gt;this) {
                 ...
            }
        }
    }

    Consider the below graph:
    dht (parent)
    readdir-ahead  =&gt; Doesn't define setxattr and uses STACK_WIND_TAIL
    protocol-client

    With this graph, when dht_checking_pathinfo_cbk is called,
    cookie will have frame pointing to protocol-client.
    i.e. prev-&gt;this will be protocol-client. But dht was expecting
    it to be readdir-ahead as it has stored in conf-&gt;subvolumes[i]

Solution:
    Hence, as a thumb rule, if cbk is using cookie, then we explicitly
    call STACK_WIND_COOKIE.

Change-Id: I83aea1e24c809c5a91a0db7283e908e125471bd4
BUG: 1401812
Signed-off-by: Poornima G &lt;pgurusid@redhat.com&gt;
Reviewed-on: http://review.gluster.org/16039
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht: Adding log messages to the new logging framework</title>
<updated>2015-06-24T05:15:10+00:00</updated>
<author>
<name>arao</name>
<email>arao@redhat.com</email>
</author>
<published>2015-06-12T11:05:53+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=2b645af1d077957829c8ff6b8ab56353ba3913d6'/>
<id>2b645af1d077957829c8ff6b8ab56353ba3913d6</id>
<content type='text'>
Change-Id: Ib3bb61c5223f409c23c68100f3fe884918d2dc3f
BUG: 1194640
Signed-off-by: arao &lt;arao@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10021
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-by: Joseph Fernandes
Tested-by: Joseph Fernandes
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ib3bb61c5223f409c23c68100f3fe884918d2dc3f
BUG: 1194640
Signed-off-by: arao &lt;arao@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10021
Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-by: Joseph Fernandes
Tested-by: Joseph Fernandes
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
Tested-by: Raghavendra G &lt;rgowdapp@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>build: do not #include "config.h" in each file</title>
<updated>2015-05-29T12:43:17+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2015-05-18T14:26:02+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=8a9328e37b8c63d60583184dc8dab12f85810682'/>
<id>8a9328e37b8c63d60583184dc8dab12f85810682</id>
<content type='text'>
Instead of including config.h in each file, and have the additional
config.h included from the compiler commandline (-include option).

When a .c file tests for a certain #define, and config.h was not
included, incorrect assumtions were made. With this change, it can not
happen again.

BUG: 1222319
Change-Id: I4f9097b8740b81ecfe8b218d52ca50361f74cb64
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10808
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of including config.h in each file, and have the additional
config.h included from the compiler commandline (-include option).

When a .c file tests for a certain #define, and config.h was not
included, incorrect assumtions were made. With this change, it can not
happen again.

BUG: 1222319
Change-Id: I4f9097b8740b81ecfe8b218d52ca50361f74cb64
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
Reviewed-on: http://review.gluster.org/10808
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: NetBSD Build System
Reviewed-by: Kaleb KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-by: Pranith Kumar Karampuri &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Cluster/DHT: New logging framework</title>
<updated>2014-06-16T13:25:51+00:00</updated>
<author>
<name>Nithya Balachandran</name>
<email>nbalacha@redhat.com</email>
</author>
<published>2014-05-30T05:56:40+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=7382b66de76101d625ed888ec7b7f82fd7da56d3'/>
<id>7382b66de76101d625ed888ec7b7f82fd7da56d3</id>
<content type='text'>
Moved all relevant DHT gf_log calls to the new logging
framework.

Change-Id: I3af3cfe0416e332774a6c4ff6a091d006c400af2
BUG: 1075611
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7929
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moved all relevant DHT gf_log calls to the new logging
framework.

Change-Id: I3af3cfe0416e332774a6c4ff6a091d006c400af2
BUG: 1075611
Signed-off-by: Nithya Balachandran &lt;nbalacha@redhat.com&gt;
Reviewed-on: http://review.gluster.org/7929
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: goto statements may cause loop exit before memory is freed.</title>
<updated>2014-01-24T09:36:31+00:00</updated>
<author>
<name>Christopher R. Hertel</name>
<email>crh@redhat.com</email>
</author>
<published>2014-01-23T21:37:09+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4ac61e7354d0c79e235e1b3be269a989ee0a83e6'/>
<id>4ac61e7354d0c79e235e1b3be269a989ee0a83e6</id>
<content type='text'>
Memory is allocated at the top of the while loop via a call to
gf_strdup(), but there are several goto calls that exit the loop, and
the memory is not freed before each of those calls to goto.  This fix
moves the final call to GF_FREE() higher in the loop so that the memory
is correctly freed.

Two variables, dup_str and str_tmp1, point to portions of the allocated
memory.  Neither are used past the final call to GF_FREE( dup_str ).

BUG: 789278
CID: 1124780

Change-Id: Id24b80cdbfd8b8855c80fffec63d7fce98cbed4a
Signed-off-by: Christopher R. Hertel &lt;crh@redhat.com&gt;
Reviewed-on: http://review.gluster.org/6771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory is allocated at the top of the while loop via a call to
gf_strdup(), but there are several goto calls that exit the loop, and
the memory is not freed before each of those calls to goto.  This fix
moves the final call to GF_FREE() higher in the loop so that the memory
is correctly freed.

Two variables, dup_str and str_tmp1, point to portions of the allocated
memory.  Neither are used past the final call to GF_FREE( dup_str ).

BUG: 789278
CID: 1124780

Change-Id: Id24b80cdbfd8b8855c80fffec63d7fce98cbed4a
Signed-off-by: Christopher R. Hertel &lt;crh@redhat.com&gt;
Reviewed-on: http://review.gluster.org/6771
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: Ignore subvols with error in min-free-disk/inodes</title>
<updated>2013-07-10T08:56:38+00:00</updated>
<author>
<name>shishir gowda</name>
<email>sgowda@redhat.com</email>
</author>
<published>2013-07-08T13:18:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=63ed610617458ac4fd85cb83471df2222380f28a'/>
<id>63ed610617458ac4fd85cb83471df2222380f28a</id>
<content type='text'>
Currently when selecting a alternative subvolume when hashed
subvol has exceeded min-free-disk/inodes, we do not check if
layouts have errors (including decommissioning). This leads
to data being written to those subvolumes, and in case of
decommissioning, will lead to data loss.

Change-Id: Ie0c6cf4a29d7c53d8a6d8a8c1bd595cf58a0012a
BUG: 982919
Signed-off-by: shishir gowda &lt;sgowda@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5299
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently when selecting a alternative subvolume when hashed
subvol has exceeded min-free-disk/inodes, we do not check if
layouts have errors (including decommissioning). This leads
to data being written to those subvolumes, and in case of
decommissioning, will lead to data loss.

Change-Id: Ie0c6cf4a29d7c53d8a6d8a8c1bd595cf58a0012a
BUG: 982919
Signed-off-by: shishir gowda &lt;sgowda@redhat.com&gt;
Reviewed-on: http://review.gluster.org/5299
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht: make nufa/switch call dht's init/fini</title>
<updated>2013-04-03T22:16:24+00:00</updated>
<author>
<name>Jeff Darcy</name>
<email>jdarcy@redhat.com</email>
</author>
<published>2013-03-21T23:11:25+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0106fce7fed3dc8f38de3bf365182bdd782b5d9c'/>
<id>0106fce7fed3dc8f38de3bf365182bdd782b5d9c</id>
<content type='text'>
These functions keep changing as new functionality is added, so copying
and pasting the code is not a good solution.  This way ensures that all
fields get initialized properly no matter how much new stuff we throw in.

Change-Id: I9e9b043d2d305d31e80cf5689465555b70312756
BUG: 924488
Signed-off-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4710
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These functions keep changing as new functionality is added, so copying
and pasting the code is not a good solution.  This way ensures that all
fields get initialized properly no matter how much new stuff we throw in.

Change-Id: I9e9b043d2d305d31e80cf5689465555b70312756
BUG: 924488
Signed-off-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4710
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dht: make DHT xattr names configurable</title>
<updated>2013-03-21T22:04:31+00:00</updated>
<author>
<name>Jeff Darcy</name>
<email>jdarcy@redhat.com</email>
</author>
<published>2013-03-19T18:06:39+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=76bc5d1b2d25a4f25f4cf458e43ec3e19c3efae6'/>
<id>76bc5d1b2d25a4f25f4cf458e43ec3e19c3efae6</id>
<content type='text'>
This is necessary to support "DHT over DHT" configurations, so that the
upper and lower instances of DHT don't step all over each other.  Why
would we even consider such a thing?  Because it gives us the ability to
do data tiering and rack-aware placement, either by themselves or as
complements to other functionality such as erasure codes or
deduplication which save space but cost performance.  By setting up the
top-level DHT to place data into one of several lower-level DHT pools
based on policy instead of pure elastic hashing, we get better
performance for 90% of accesses and better storage efficiency for 90% of
data, all for relatively low effort.

Change-Id: I72e65c29edfc80babf39f7a2a00090f4588c4070
BUG: 924265
Signed-off-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4694
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is necessary to support "DHT over DHT" configurations, so that the
upper and lower instances of DHT don't step all over each other.  Why
would we even consider such a thing?  Because it gives us the ability to
do data tiering and rack-aware placement, either by themselves or as
complements to other functionality such as erasure codes or
deduplication which save space but cost performance.  By setting up the
top-level DHT to place data into one of several lower-level DHT pools
based on policy instead of pure elastic hashing, we get better
performance for 90% of accesses and better storage efficiency for 90% of
data, all for relatively low effort.

Change-Id: I72e65c29edfc80babf39f7a2a00090f4588c4070
BUG: 924265
Signed-off-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4694
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: stack wind with cookie</title>
<updated>2013-02-01T01:18:03+00:00</updated>
<author>
<name>Varun Shastry</name>
<email>vshastry@redhat.com</email>
</author>
<published>2013-01-16T08:58:19+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=315ee9c4e0bdc9f2b1cad21ebfac44f906597fb1'/>
<id>315ee9c4e0bdc9f2b1cad21ebfac44f906597fb1</id>
<content type='text'>
Default_fops uses stack_wind_tail. It winds without creating the frame leading
into wrong subvol return in the cookie. To avoid the problem caused by the
same, we're getting the subvol by passing the cookie.

Change-Id: I51ee79b22c89e4fb0b89e9a0bc3ac96c5b469f8f
BUG: 893338
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4388
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
Tested-by: Anand Avati &lt;avati@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Default_fops uses stack_wind_tail. It winds without creating the frame leading
into wrong subvol return in the cookie. To avoid the problem caused by the
same, we're getting the subvol by passing the cookie.

Change-Id: I51ee79b22c89e4fb0b89e9a0bc3ac96c5b469f8f
BUG: 893338
Signed-off-by: Varun Shastry &lt;vshastry@redhat.com&gt;
Reviewed-on: http://review.gluster.org/4388
Reviewed-by: Jeff Darcy &lt;jdarcy@redhat.com&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Anand Avati &lt;avati@redhat.com&gt;
Tested-by: Anand Avati &lt;avati@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libglusterfs: Implement float percentage</title>
<updated>2012-11-24T07:13:39+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pranithk@gluster.com</email>
</author>
<published>2012-11-06T06:49:47+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=76a4afec6e03d15cb442e819f6fe7b94d6f9f487'/>
<id>76a4afec6e03d15cb442e819f6fe7b94d6f9f487</id>
<content type='text'>
Change-Id: Ia7ea63471f0bbd74686873f5f6f183475880f1a0
BUG: 839595
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.org/4162
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ia7ea63471f0bbd74686873f5f6f183475880f1a0
BUG: 839595
Signed-off-by: Pranith Kumar K &lt;pranithk@gluster.com&gt;
Reviewed-on: http://review.gluster.org/4162
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Vijay Bellur &lt;vbellur@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
