<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs, branch devel</title>
<subtitle>GlusterFS is a distributed file-system capable of scaling to several petabytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system.</subtitle>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/'/>
<entry>
<title>logging: fix a relock deadlock (#2332)</title>
<updated>2021-04-15T07:53:38+00:00</updated>
<author>
<name>chenglin130</name>
<email>35245387+chenglin130@users.noreply.github.com</email>
</author>
<published>2021-04-15T07:53:38+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=6dbb5e312a2fd9a59197bb4155d9fb69a8825239'/>
<id>6dbb5e312a2fd9a59197bb4155d9fb69a8825239</id>
<content type='text'>
In gf_log_inject_timer_event(), got lock log.log_buf_lock. Then,
under the lock, any call to gf_msg will hang the thread. Because
in _gf_msg_internal(), it will relock log.log_buf_lock.

Use a PTHREAD_MUTEX_RECURSIVE type instead of the default type for
this mutex to fix this deadlock.

Fixes: #2330
Signed-off-by: Cheng Lin cheng.lin130@zte.com.cn</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In gf_log_inject_timer_event(), got lock log.log_buf_lock. Then,
under the lock, any call to gf_msg will hang the thread. Because
in _gf_msg_internal(), it will relock log.log_buf_lock.

Use a PTHREAD_MUTEX_RECURSIVE type instead of the default type for
this mutex to fix this deadlock.

Fixes: #2330
Signed-off-by: Cheng Lin cheng.lin130@zte.com.cn</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some strlen() calls if using DICT_LIST_IMP (#2311)</title>
<updated>2021-04-06T06:37:19+00:00</updated>
<author>
<name>Rinku Kothiya</name>
<email>rkothiya@redhat.com</email>
</author>
<published>2021-04-06T06:37:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=0494b9cba5712c5e9d0231a570379c433743b457'/>
<id>0494b9cba5712c5e9d0231a570379c433743b457</id>
<content type='text'>
The code was optimized by avoiding some strlen()
calls if using DICT_LIST_IMP

fixes: #2294

Change-Id: Ic5e784edb9538feb1d1b441c8514c76ba5266832
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code was optimized by avoiding some strlen()
calls if using DICT_LIST_IMP

fixes: #2294

Change-Id: Ic5e784edb9538feb1d1b441c8514c76ba5266832
Signed-off-by: Rinku Kothiya &lt;rkothiya@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>list.h: remove offensive language, introduce _list_del() (#2132)</title>
<updated>2021-04-02T05:52:07+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2021-04-02T05:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=34f854ad2f5d53578d7a4543f837cf0fb0f1a76a'/>
<id>34f854ad2f5d53578d7a4543f837cf0fb0f1a76a</id>
<content type='text'>

1. Replace offensive variables with the values the Linux kernel uses.
2. Introduce an internal function - _list_del() that can be used
when list-&gt;next and list-&gt;prev are going to be assigned later on.

(too bad in the code we do not have enough uses of list_move() and
list_move() tail, btw. Would have contributed also to code readability)

* list.h: defined LIST_POSION1, LIST_POISION2 similar to Linux kernel
defines

Fixes: #2025
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

1. Replace offensive variables with the values the Linux kernel uses.
2. Introduce an internal function - _list_del() that can be used
when list-&gt;next and list-&gt;prev are going to be assigned later on.

(too bad in the code we do not have enough uses of list_move() and
list_move() tail, btw. Would have contributed also to code readability)

* list.h: defined LIST_POSION1, LIST_POISION2 similar to Linux kernel
defines

Fixes: #2025
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/dht: use readdir for fix-layout in rebalance (#2243)</title>
<updated>2021-03-22T04:49:27+00:00</updated>
<author>
<name>Pranith Kumar Karampuri</name>
<email>pranith.karampuri@phonepe.com</email>
</author>
<published>2021-03-22T04:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=ec189a499d85c2aad1d54e55e47df6b95ba02922'/>
<id>ec189a499d85c2aad1d54e55e47df6b95ba02922</id>
<content type='text'>
Problem:
On a cluster with 15 million files, when fix-layout was started, it was
not progressing at all. So we tried to do a os.walk() + os.stat() on the
backend filesystem directly. It took 2.5 days. We removed os.stat() and
re-ran it on another brick with similar data-set. It took 15 minutes. We
realized that readdirp is extremely costly compared to readdir if the
stat is not useful. fix-layout operation only needs to know that the
entry is a directory so that fix-layout operation can be triggered on
it. Most of the modern filesystems provide this information in readdir
operation. We don't need readdirp i.e. readdir+stat.

Fix:
Use readdir operation in fix-layout. Do readdir+stat/lookup for
filesystems that don't provide d_type in readdir operation.

fixes: #2241
Change-Id: I5fe2ecea25a399ad58e31a2e322caf69fc7f49eb
Signed-off-by: Pranith Kumar K &lt;pranith.karampuri@phonepe.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
On a cluster with 15 million files, when fix-layout was started, it was
not progressing at all. So we tried to do a os.walk() + os.stat() on the
backend filesystem directly. It took 2.5 days. We removed os.stat() and
re-ran it on another brick with similar data-set. It took 15 minutes. We
realized that readdirp is extremely costly compared to readdir if the
stat is not useful. fix-layout operation only needs to know that the
entry is a directory so that fix-layout operation can be triggered on
it. Most of the modern filesystems provide this information in readdir
operation. We don't need readdirp i.e. readdir+stat.

Fix:
Use readdir operation in fix-layout. Do readdir+stat/lookup for
filesystems that don't provide d_type in readdir operation.

fixes: #2241
Change-Id: I5fe2ecea25a399ad58e31a2e322caf69fc7f49eb
Signed-off-by: Pranith Kumar K &lt;pranith.karampuri@phonepe.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>dict: avoid hash calculation when hash_size=1 (link list imp) (#2171)</title>
<updated>2021-03-01T10:41:14+00:00</updated>
<author>
<name>Tamar Shacked</name>
<email>tshacked@redhat.com</email>
</author>
<published>2021-03-01T10:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=089f2c5737d06781c50e9dc327d66779f2234c35'/>
<id>089f2c5737d06781c50e9dc327d66779f2234c35</id>
<content type='text'>
* dict: avoid hash calculation when hash_size=1 (link list imp)

Currently dict_t always constructs with dict::hash_size = 1.
With this initializing the dict implemented as a link-list
and searching for a key is done by iteration using key comparison.
Therfore we can avoid the hash-calculation done each set()/get() in this case.

Fixes: #2013

Change-Id: Id93286a8036064d43142bc2b2f8d5a3be4e97fc4
Signed-off-by: Tamar Shacked &lt;tshacked@redhat.com&gt;

* dict: avoid hash calculation when hash_size=1 (list imp)

Currently dict_t always constructs with dict::hash_size = 1.
With this initializing the dict implemented as a link-list
and searching for a key is done by iteration using key comparison.
Therfore we can avoid the hash-calculation done each set()/get() in this case.

Fix:
using new macro to delimit and avoid blocks related to hash imp

Fixes: #2013

Change-Id: I31180b434a6e9e7bbb456c7ad888c147c4ce3308
Signed-off-by: Tamar Shacked &lt;tshacked@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* dict: avoid hash calculation when hash_size=1 (link list imp)

Currently dict_t always constructs with dict::hash_size = 1.
With this initializing the dict implemented as a link-list
and searching for a key is done by iteration using key comparison.
Therfore we can avoid the hash-calculation done each set()/get() in this case.

Fixes: #2013

Change-Id: Id93286a8036064d43142bc2b2f8d5a3be4e97fc4
Signed-off-by: Tamar Shacked &lt;tshacked@redhat.com&gt;

* dict: avoid hash calculation when hash_size=1 (list imp)

Currently dict_t always constructs with dict::hash_size = 1.
With this initializing the dict implemented as a link-list
and searching for a key is done by iteration using key comparison.
Therfore we can avoid the hash-calculation done each set()/get() in this case.

Fix:
using new macro to delimit and avoid blocks related to hash imp

Fixes: #2013

Change-Id: I31180b434a6e9e7bbb456c7ad888c147c4ce3308
Signed-off-by: Tamar Shacked &lt;tshacked@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: add an option to specify the mount display name (#1989)</title>
<updated>2021-02-22T18:06:53+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amar@kadalu.io</email>
</author>
<published>2021-02-22T18:06:53+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=14c578e9f3be7afbb5d088f0fe4921b67a969ea7'/>
<id>14c578e9f3be7afbb5d088f0fe4921b67a969ea7</id>
<content type='text'>
* fuse: add an option to specify the mount display name

There are two things this PR is fixing.
1. When a mount is specified with volfile (-f) option, today, you can't make it out its from glusterfs as only volfile is added as 'fsname', so we add it as 'glusterfs:/&lt;volname&gt;'.
2. Provide an options for admins who wants to show the source of mount other than default (useful when one is not providing 'mount.glusterfs', but using their own scripts.

Updates: #1000
Change-Id: I19e78f309a33807dc5f1d1608a300d93c9996a2f
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* fuse: add an option to specify the mount display name

There are two things this PR is fixing.
1. When a mount is specified with volfile (-f) option, today, you can't make it out its from glusterfs as only volfile is added as 'fsname', so we add it as 'glusterfs:/&lt;volname&gt;'.
2. Provide an options for admins who wants to show the source of mount other than default (useful when one is not providing 'mount.glusterfs', but using their own scripts.

Updates: #1000
Change-Id: I19e78f309a33807dc5f1d1608a300d93c9996a2f
Signed-off-by: Amar Tumballi &lt;amar@kadalu.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iobuf: use lists instead of iobufs in iobuf_arena struct (#2097)</title>
<updated>2021-02-16T11:56:14+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2021-02-16T11:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=1f8247c54c47bb24b862786c80e5ce865683b8ec'/>
<id>1f8247c54c47bb24b862786c80e5ce865683b8ec</id>
<content type='text'>
We only need passive and active lists, there's no need for a full
iobuf variable.

Also ensured passive_list is before active_list, as it's always accessed
first.

Note: this almost brings us to using 2 cachelines only for that structure.
We can easily make other variables smaller (page_size could be 4 bytes) and fit
exactly 2 cache lines.

Fixes: #2096
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only need passive and active lists, there's no need for a full
iobuf variable.

Also ensured passive_list is before active_list, as it's always accessed
first.

Note: this almost brings us to using 2 cachelines only for that structure.
We can easily make other variables smaller (page_size could be 4 bytes) and fit
exactly 2 cache lines.

Fixes: #2096
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>posix: fix chmod error on symlinks (#2155)</title>
<updated>2021-02-11T15:11:19+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@users.noreply.github.com</email>
</author>
<published>2021-02-11T15:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=af5c2cb320068bd154caf54f063fa1787ae19995'/>
<id>af5c2cb320068bd154caf54f063fa1787ae19995</id>
<content type='text'>
After glibc 2.32, lchmod() is returning EOPNOTSUPP instead of ENOSYS when
called on symlinks. The man page says that the returned code is ENOTSUP.
They are the same in linux, but this patch correctly handles all errors.

Fixes: #2154
Change-Id: Ib3bb3d86d421cba3d7ec8d66b6beb131ef6e0925
Signed-off-by: Xavi Hernandez xhernandez@redhat.com</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After glibc 2.32, lchmod() is returning EOPNOTSUPP instead of ENOSYS when
called on symlinks. The man page says that the returned code is ENOTSUP.
They are the same in linux, but this patch correctly handles all errors.

Fixes: #2154
Change-Id: Ib3bb3d86d421cba3d7ec8d66b6beb131ef6e0925
Signed-off-by: Xavi Hernandez xhernandez@redhat.com</pre>
</div>
</content>
</entry>
<entry>
<title>Glustereventsd Default port change (#2091)</title>
<updated>2021-02-10T08:13:48+00:00</updated>
<author>
<name>schaffung</name>
<email>ssivakum@redhat.com</email>
</author>
<published>2021-02-10T08:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=2572f096b2e6477e49009550d68e761e67676cc4'/>
<id>2572f096b2e6477e49009550d68e761e67676cc4</id>
<content type='text'>
Issue : The default port of glustereventsd is currently 24009
which is preventing glustereventsd from binding to the UDP port
due to selinux policies.

Fix: Changing the default port to be bound by chanding it to something
in the ephemeral range.

Fixes: #2080
Change-Id: Ibdc87f83f82f69660dca95d6d14b226e10d8bd33
Signed-off-by: srijan-sivakumar &lt;ssivakum@redhat.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue : The default port of glustereventsd is currently 24009
which is preventing glustereventsd from binding to the UDP port
due to selinux policies.

Fix: Changing the default port to be bound by chanding it to something
in the ephemeral range.

Fixes: #2080
Change-Id: Ibdc87f83f82f69660dca95d6d14b226e10d8bd33
Signed-off-by: srijan-sivakumar &lt;ssivakum@redhat.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>stack.h/c: remove unused variable and reorder struct</title>
<updated>2021-02-08T12:51:47+00:00</updated>
<author>
<name>Yaniv Kaul</name>
<email>ykaul@redhat.com</email>
</author>
<published>2021-02-05T11:15:23+00:00</published>
<link rel='alternate' type='text/html' href='https://fedorapeople.org/cgit/anoopcs/public_git/glusterfs.git/commit/?id=b818cdde534743fccca5cd91b4a7298e2d0d601e'/>
<id>b818cdde534743fccca5cd91b4a7298e2d0d601e</id>
<content type='text'>
- Removed unused ref_count variable
- Reordered the struct to get related variables closer together.
- Changed 'complete' from a '_Bool' to a 'int32_t'

Before:
```
struct _call_frame {
        call_stack_t *             root;                 /*     0     8 */
        call_frame_t *             parent;               /*     8     8 */
        struct list_head           frames;               /*    16    16 */
        void *                     local;                /*    32     8 */
        xlator_t *                 this;                 /*    40     8 */
        ret_fn_t                   ret;                  /*    48     8 */
        int32_t                    ref_count;            /*    56     4 */

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 1 boundary (64 bytes) --- */
        gf_lock_t                  lock;                 /*    64    40 */
        void *                     cookie;               /*   104     8 */
        _Bool                      complete;             /*   112     1 */

        /* XXX 3 bytes hole, try to pack */

        glusterfs_fop_t            op;                   /*   116     4 */
        struct timespec            begin;                /*   120    16 */
        /* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */
        struct timespec            end;                  /*   136    16 */
        const char  *              wind_from;            /*   152     8 */
        const char  *              wind_to;              /*   160     8 */
        const char  *              unwind_from;          /*   168     8 */
        const char  *              unwind_to;            /*   176     8 */

        /* size: 184, cachelines: 3, members: 17 */
        /* sum members: 177, holes: 2, sum holes: 7 */
        /* last cacheline: 56 bytes */
```

After:
```
struct _call_frame {
        call_stack_t *             root;                 /*     0     8 */
        call_frame_t *             parent;               /*     8     8 */
        struct list_head           frames;               /*    16    16 */
        struct timespec            begin;                /*    32    16 */
        struct timespec            end;                  /*    48    16 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        void *                     local;                /*    64     8 */
        gf_lock_t                  lock;                 /*    72    40 */
        void *                     cookie;               /*   112     8 */
        xlator_t *                 this;                 /*   120     8 */
        /* --- cacheline 2 boundary (128 bytes) --- */
        ret_fn_t                   ret;                  /*   128     8 */
        glusterfs_fop_t            op;                   /*   136     4 */
        int32_t                    complete;             /*   140     4 */
        const char  *              wind_from;            /*   144     8 */
        const char  *              wind_to;              /*   152     8 */
        const char  *              unwind_from;          /*   160     8 */
        const char  *              unwind_to;            /*   168     8 */

        /* size: 176, cachelines: 3, members: 16 */
        /* last cacheline: 48 bytes */
```

Fixes: #2130
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Removed unused ref_count variable
- Reordered the struct to get related variables closer together.
- Changed 'complete' from a '_Bool' to a 'int32_t'

Before:
```
struct _call_frame {
        call_stack_t *             root;                 /*     0     8 */
        call_frame_t *             parent;               /*     8     8 */
        struct list_head           frames;               /*    16    16 */
        void *                     local;                /*    32     8 */
        xlator_t *                 this;                 /*    40     8 */
        ret_fn_t                   ret;                  /*    48     8 */
        int32_t                    ref_count;            /*    56     4 */

        /* XXX 4 bytes hole, try to pack */

        /* --- cacheline 1 boundary (64 bytes) --- */
        gf_lock_t                  lock;                 /*    64    40 */
        void *                     cookie;               /*   104     8 */
        _Bool                      complete;             /*   112     1 */

        /* XXX 3 bytes hole, try to pack */

        glusterfs_fop_t            op;                   /*   116     4 */
        struct timespec            begin;                /*   120    16 */
        /* --- cacheline 2 boundary (128 bytes) was 8 bytes ago --- */
        struct timespec            end;                  /*   136    16 */
        const char  *              wind_from;            /*   152     8 */
        const char  *              wind_to;              /*   160     8 */
        const char  *              unwind_from;          /*   168     8 */
        const char  *              unwind_to;            /*   176     8 */

        /* size: 184, cachelines: 3, members: 17 */
        /* sum members: 177, holes: 2, sum holes: 7 */
        /* last cacheline: 56 bytes */
```

After:
```
struct _call_frame {
        call_stack_t *             root;                 /*     0     8 */
        call_frame_t *             parent;               /*     8     8 */
        struct list_head           frames;               /*    16    16 */
        struct timespec            begin;                /*    32    16 */
        struct timespec            end;                  /*    48    16 */
        /* --- cacheline 1 boundary (64 bytes) --- */
        void *                     local;                /*    64     8 */
        gf_lock_t                  lock;                 /*    72    40 */
        void *                     cookie;               /*   112     8 */
        xlator_t *                 this;                 /*   120     8 */
        /* --- cacheline 2 boundary (128 bytes) --- */
        ret_fn_t                   ret;                  /*   128     8 */
        glusterfs_fop_t            op;                   /*   136     4 */
        int32_t                    complete;             /*   140     4 */
        const char  *              wind_from;            /*   144     8 */
        const char  *              wind_to;              /*   152     8 */
        const char  *              unwind_from;          /*   160     8 */
        const char  *              unwind_to;            /*   168     8 */

        /* size: 176, cachelines: 3, members: 16 */
        /* last cacheline: 48 bytes */
```

Fixes: #2130
Signed-off-by: Yaniv Kaul &lt;ykaul@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
