<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/xlators/mount, branch v7.7</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>fuse: occasional logging for fuse device 'weird' write errors</title>
<updated>2020-07-13T06:40:11+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2020-05-08T21:01:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=328f909ca81274843fba76e82f96712998d02b66'/>
<id>328f909ca81274843fba76e82f96712998d02b66</id>
<content type='text'>
This change is a followup to
I510158843e4b1d482bdc496c2e97b1860dc1ba93.

In referred change we pushed log messages about 'weird'
write errors to fuse device out of sight, by reporting
them at Debug loglevel instead of Error (where
'weird' means errno is not POSIX compliant but having
meaningful semantics for FUSE protocol).

This solved the issue of spurious error reporting.
And so far so good: these messages don't indicate
an error condition by themselves. However, when they
come in high repetitions, that indicates a suboptimal
condition which should be reported.[1]

Therefore now we shall emit a Warning if a certain
errno occurs a certain number of times[2] as the
outcome of a write to the fuse device.

___
[1] typically ENOENTs and ENOTDIRs accumulate
when glusterfs' inode invalidation lags behind
the kernel's internal inode garbage collection
(in this case above errnos mean that the inode
which we requested to be invalidated is not found
in kernel). This can be mitigated with the
invalidate-limit command line / mount option,
cf. bz#1732717.

[2] 256, as of the current implementation.

Change-Id: I8cc7fe104da43a88875f93b0db49d5677cc16045
Updates: #1000
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change is a followup to
I510158843e4b1d482bdc496c2e97b1860dc1ba93.

In referred change we pushed log messages about 'weird'
write errors to fuse device out of sight, by reporting
them at Debug loglevel instead of Error (where
'weird' means errno is not POSIX compliant but having
meaningful semantics for FUSE protocol).

This solved the issue of spurious error reporting.
And so far so good: these messages don't indicate
an error condition by themselves. However, when they
come in high repetitions, that indicates a suboptimal
condition which should be reported.[1]

Therefore now we shall emit a Warning if a certain
errno occurs a certain number of times[2] as the
outcome of a write to the fuse device.

___
[1] typically ENOENTs and ENOTDIRs accumulate
when glusterfs' inode invalidation lags behind
the kernel's internal inode garbage collection
(in this case above errnos mean that the inode
which we requested to be invalidated is not found
in kernel). This can be mitigated with the
invalidate-limit command line / mount option,
cf. bz#1732717.

[2] 256, as of the current implementation.

Change-Id: I8cc7fe104da43a88875f93b0db49d5677cc16045
Updates: #1000
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>open-behind: rewrite of internal logic</title>
<updated>2020-06-15T10:53:24+00:00</updated>
<author>
<name>Xavi Hernandez</name>
<email>xhernandez@redhat.com</email>
</author>
<published>2020-05-12T21:54:54+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=dcbf54581717d10cf82cdce9bc08415ba1e1d19b'/>
<id>dcbf54581717d10cf82cdce9bc08415ba1e1d19b</id>
<content type='text'>
There was a critical flaw in the previous implementation of open-behind.

When an open is done in the background, it's necessary to take a
reference on the fd_t object because once we "fake" the open answer,
the fd could be destroyed. However as long as there's a reference,
the release function won't be called. So, if the application closes
the file descriptor without having actually opened it, there will
always remain at least 1 reference, causing a leak.

To avoid this problem, the previous implementation didn't take a
reference on the fd_t, so there were races where the fd could be
destroyed while it was still in use.

To fix this, I've implemented a new xlator cbk that gets called from
fuse when the application closes a file descriptor.

The whole logic of handling background opens have been simplified and
it's more efficient now. Only if the fop needs to be delayed until an
open completes, a stub is created. Otherwise no memory allocations are
needed.

Correctly handling the close request while the open is still pending
has added a bit of complexity, but overall normal operation is simpler.

Change-Id: I6376a5491368e0e1c283cc452849032636261592
Fixes: #1225
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was a critical flaw in the previous implementation of open-behind.

When an open is done in the background, it's necessary to take a
reference on the fd_t object because once we "fake" the open answer,
the fd could be destroyed. However as long as there's a reference,
the release function won't be called. So, if the application closes
the file descriptor without having actually opened it, there will
always remain at least 1 reference, causing a leak.

To avoid this problem, the previous implementation didn't take a
reference on the fd_t, so there were races where the fd could be
destroyed while it was still in use.

To fix this, I've implemented a new xlator cbk that gets called from
fuse when the application closes a file descriptor.

The whole logic of handling background opens have been simplified and
it's more efficient now. Only if the fop needs to be delayed until an
open completes, a stub is created. Otherwise no memory allocations are
needed.

Correctly handling the close request while the open is still pending
has added a bit of complexity, but overall normal operation is simpler.

Change-Id: I6376a5491368e0e1c283cc452849032636261592
Fixes: #1225
Signed-off-by: Xavi Hernandez &lt;xhernandez@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: degrade logging of write failure to fuse device</title>
<updated>2020-05-05T11:47:31+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2020-01-07T18:43:05+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=41f0dbd6d9176bc65b5a39287ba490f734f39035'/>
<id>41f0dbd6d9176bc65b5a39287ba490f734f39035</id>
<content type='text'>
Problem:

FUSE uses failures of communicating with /dev/fuse with various
errnos to indicate in-kernel conditions to userspace. Some of these
shouldn't be handled as an application error. Also the standard
POSIX errno description should not be shown as they are misleading
in this context.

Solution:

When writing to the fuse device, the caller of the respective
convenience routine can mask those errnos which don't qualify to
be an error for the application in that context, so then those
shall be reported at DEBUG level.

The possible non-standard errnos are reported with their
POSIX name instead of their description to avoid confusion.
(Eg. for ENOENT we don't log "no such file or directory",
we log indeed literal "ENOENT".)

Change-Id: I510158843e4b1d482bdc496c2e97b1860dc1ba93
&gt;updates: bz#1193929
updates: #1000
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
(cherry picked from commit 1166df1920dd9b2bd5fce53ab49d27117db40238)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:

FUSE uses failures of communicating with /dev/fuse with various
errnos to indicate in-kernel conditions to userspace. Some of these
shouldn't be handled as an application error. Also the standard
POSIX errno description should not be shown as they are misleading
in this context.

Solution:

When writing to the fuse device, the caller of the respective
convenience routine can mask those errnos which don't qualify to
be an error for the application in that context, so then those
shall be reported at DEBUG level.

The possible non-standard errnos are reported with their
POSIX name instead of their description to avoid confusion.
(Eg. for ENOENT we don't log "no such file or directory",
we log indeed literal "ENOENT".)

Change-Id: I510158843e4b1d482bdc496c2e97b1860dc1ba93
&gt;updates: bz#1193929
updates: #1000
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
(cherry picked from commit 1166df1920dd9b2bd5fce53ab49d27117db40238)
</pre>
</div>
</content>
</entry>
<entry>
<title>mount/fuse: Wait for 'mount' child to exit before dying</title>
<updated>2020-04-14T12:49:34+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2020-04-07T10:35:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=03f6c600b201d672a251df95cd8a11decf94e7ef'/>
<id>03f6c600b201d672a251df95cd8a11decf94e7ef</id>
<content type='text'>
Problem:
tests/bugs/protocol/bug-1433815-auth-allow.t fails
sometimes because of stale mount. This stale mount
comes into picture when parent process dies without
waiting for the child process which mounts fuse fs
to die

Fix:
Wait for mounting child process to die before dying.

Fixes: #1152
Change-Id: I8baee8720e88614fdb762ea822d5877973eef8dc
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem:
tests/bugs/protocol/bug-1433815-auth-allow.t fails
sometimes because of stale mount. This stale mount
comes into picture when parent process dies without
waiting for the child process which mounts fuse fs
to die

Fix:
Wait for mounting child process to die before dying.

Fixes: #1152
Change-Id: I8baee8720e88614fdb762ea822d5877973eef8dc
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse: add missing GF_FREE to fuse_interrupt</title>
<updated>2019-08-27T05:47:25+00:00</updated>
<author>
<name>Csaba Henk</name>
<email>csaba@redhat.com</email>
</author>
<published>2019-07-09T09:06:49+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f2123cc691c3ed16177b3c30468615127fb2086a'/>
<id>f2123cc691c3ed16177b3c30468615127fb2086a</id>
<content type='text'>
Change-Id: Id7e003e4a53d0a0057c1c84e1cd704c80a6cb015
Fixes: bz#1744874
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Id7e003e4a53d0a0057c1c84e1cd704c80a6cb015
Fixes: bz#1744874
Signed-off-by: Csaba Henk &lt;csaba@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>stack: Make sure to have unique call-stacks in all cases</title>
<updated>2019-05-30T15:54:33+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2019-05-27T06:13:26+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=14d9c6179715205fb6ac816d4621dd087f5afbb2'/>
<id>14d9c6179715205fb6ac816d4621dd087f5afbb2</id>
<content type='text'>
At the moment new stack doesn't populate frame-&gt;root-&gt;unique in all cases. This
makes it difficult to debug hung frames by examining successive state dumps.
Fuse and server xlators populate it whenever they can, but other xlators won't
be able to assign 'unique' when they need to create a new frame/stack because
they don't know what 'unique' fuse/server xlators already used. What we need is
for unique to be correct. If a stack with same unique is present in successive
statedumps, that means the same operation is still in progress. This makes
'finding hung frames' part of debugging hung frames easier.

fixes bz#1714098
Change-Id: I3e9a8f6b4111e260106c48a2ac3a41ef29361b9e
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At the moment new stack doesn't populate frame-&gt;root-&gt;unique in all cases. This
makes it difficult to debug hung frames by examining successive state dumps.
Fuse and server xlators populate it whenever they can, but other xlators won't
be able to assign 'unique' when they need to create a new frame/stack because
they don't know what 'unique' fuse/server xlators already used. What we need is
for unique to be correct. If a stack with same unique is present in successive
statedumps, that means the same operation is still in progress. This makes
'finding hung frames' part of debugging hung frames easier.

fixes bz#1714098
Change-Id: I3e9a8f6b4111e260106c48a2ac3a41ef29361b9e
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount.glusterfs: change the error message</title>
<updated>2019-03-29T07:24:50+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2019-03-13T03:21:31+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c3fb394137769429a296a41160be8284e10d1412'/>
<id>c3fb394137769429a296a41160be8284e10d1412</id>
<content type='text'>
In scenarios where a mount fails before creating log file, doesn't
make sense to give message to 'check log file'. See below:

```
ERROR: failed to create logfile "/var/log/glusterfs/mnt.log" (No space left on device)
ERROR: failed to open logfile /var/log/glusterfs/mnt.log
Mount failed. Please check the log file for more details.
```

Fixes: bz#1688068
Change-Id: I1d837caa4f9bc9f1a37780783e95007e01ae4e3f
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In scenarios where a mount fails before creating log file, doesn't
make sense to give message to 'check log file'. See below:

```
ERROR: failed to create logfile "/var/log/glusterfs/mnt.log" (No space left on device)
ERROR: failed to open logfile /var/log/glusterfs/mnt.log
Mount failed. Please check the log file for more details.
```

Fixes: bz#1688068
Change-Id: I1d837caa4f9bc9f1a37780783e95007e01ae4e3f
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse : fix high sev coverity issue</title>
<updated>2019-03-21T09:07:50+00:00</updated>
<author>
<name>Sunny Kumar</name>
<email>sunkumar@redhat.com</email>
</author>
<published>2019-03-19T17:21:14+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a7c746577249af6326907e280843e1f4c0231bb0'/>
<id>a7c746577249af6326907e280843e1f4c0231bb0</id>
<content type='text'>
This patch fixed coverity issue in fuse-bridge.c.

CID : 1398630 : Resource leak
CID : 1399757 : Uninitialized pointer read

updates: bz#789278

Change-Id: I69f8591400ee56a5d215eeac443a8e3d7777db27
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixed coverity issue in fuse-bridge.c.

CID : 1398630 : Resource leak
CID : 1399757 : Uninitialized pointer read

updates: bz#789278

Change-Id: I69f8591400ee56a5d215eeac443a8e3d7777db27
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mount/fuse: Fix spelling mistake</title>
<updated>2019-03-15T15:19:20+00:00</updated>
<author>
<name>Pranith Kumar K</name>
<email>pkarampu@redhat.com</email>
</author>
<published>2019-02-26T08:57:33+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4d98b55eadf46beb35de88e6584c694ec75cd49d'/>
<id>4d98b55eadf46beb35de88e6584c694ec75cd49d</id>
<content type='text'>
updates bz#1193929
Change-Id: I55ffa8f086ad9570f2526d91c196d7de9ffe6add
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
updates bz#1193929
Change-Id: I55ffa8f086ad9570f2526d91c196d7de9ffe6add
Signed-off-by: Pranith Kumar K &lt;pkarampu@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fuse : fix memory leak</title>
<updated>2019-02-25T07:06:13+00:00</updated>
<author>
<name>Sunny Kumar</name>
<email>sunkumar@redhat.com</email>
</author>
<published>2019-02-20T09:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b2081cd8856a725c89c4d97b1399c589780b467a'/>
<id>b2081cd8856a725c89c4d97b1399c589780b467a</id>
<content type='text'>
This patch fixes memory leak reported by ASan.

Tracebacks:

ERROR: LeakSanitizer: detected memory leaks

Direct leak of 712 byte(s) in 1 object(s) allocated from:
    #0 0x7f35139dc848 in __interceptor_malloc (/lib64/libasan.so.5+0xef848)
    #1 0x7f35136efb29 in __gf_malloc ../libglusterfs/src/mem-pool.c:136
    #2 0x7f3510591ce9 in fuse_thread_proc ../xlators/mount/fuse/src/fuse-bridge.c:5929
    #3 0x7f351336d58d in start_thread (/lib64/libpthread.so.0+0x858d)

SUMMARY: AddressSanitizer: 712 byte(s) leaked in 1 allocation(s).

updates: bz#1633930
Change-Id: Ie5b4da6b338d8e5fc770c5b2da1238e3462468ac
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes memory leak reported by ASan.

Tracebacks:

ERROR: LeakSanitizer: detected memory leaks

Direct leak of 712 byte(s) in 1 object(s) allocated from:
    #0 0x7f35139dc848 in __interceptor_malloc (/lib64/libasan.so.5+0xef848)
    #1 0x7f35136efb29 in __gf_malloc ../libglusterfs/src/mem-pool.c:136
    #2 0x7f3510591ce9 in fuse_thread_proc ../xlators/mount/fuse/src/fuse-bridge.c:5929
    #3 0x7f351336d58d in start_thread (/lib64/libpthread.so.0+0x858d)

SUMMARY: AddressSanitizer: 712 byte(s) leaked in 1 allocation(s).

updates: bz#1633930
Change-Id: Ie5b4da6b338d8e5fc770c5b2da1238e3462468ac
Signed-off-by: Sunny Kumar &lt;sunkumar@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
