<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/source3/locking, branch talloc-2.3.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>smbd: Increase a debug level</title>
<updated>2019-07-17T11:27:20+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-07-09T18:04:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=79e3b1c71f59591c54e87299984e50d2ffb00b6b'/>
<id>79e3b1c71f59591c54e87299984e50d2ffb00b6b</id>
<content type='text'>
This is not a real error, it happens when the share mode record is not
around.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Uri Simchoni &lt;uri@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is not a real error, it happens when the share mode record is not
around.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Uri Simchoni &lt;uri@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Make find_share_mode_entry() static to locking.c</title>
<updated>2019-07-08T16:22:37+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-07-03T09:25:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9f0820f9ef2ba1cf5ab8f72a5826689f9453bc69'/>
<id>9f0820f9ef2ba1cf5ab8f72a5826689f9453bc69</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Don't store num_read_oplocks in brlock.tdb</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-30T17:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=8bae5d82e2a101d37f5572e1d174b37816576840'/>
<id>8bae5d82e2a101d37f5572e1d174b37816576840</id>
<content type='text'>
This removes a kludgy implementation that worked around a locking
hierarchy problem: Setting a byte range lock had to contend the level2
oplocks, which are stored in locking.tdb/leases.tdb. We could not
access locking.tdb in the brlock.tdb code, as brlock.tdb might have
been locked first without locking.tdb, violating the locking hierarchy
locking.tdb-&gt;brlock.tdb. Now that that problem is gone (see the commit
wrapping do_lock() in share_mode_do_locked()), we can remove this
kludge.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes a kludgy implementation that worked around a locking
hierarchy problem: Setting a byte range lock had to contend the level2
oplocks, which are stored in locking.tdb/leases.tdb. We could not
access locking.tdb in the brlock.tdb code, as brlock.tdb might have
been locked first without locking.tdb, violating the locking hierarchy
locking.tdb-&gt;brlock.tdb. Now that that problem is gone (see the commit
wrapping do_lock() in share_mode_do_locked()), we can remove this
kludge.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Set SHARE_MODE_HAS_READ_LEASE when downgrading an oplock</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-30T17:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0e34096caea40ef2d17aa229b5344818aa5a4baf'/>
<id>0e34096caea40ef2d17aa229b5344818aa5a4baf</id>
<content type='text'>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Add file_has_read_lease()</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-30T06:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0d4c4e045ec8a56289cb18b229b9a40104113608'/>
<id>0d4c4e045ec8a56289cb18b229b9a40104113608</id>
<content type='text'>
This caches share_mode_data-&gt;flags in the fsp, cache flush happening
on tdb_seqnum change.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This caches share_mode_data-&gt;flags in the fsp, cache flush happening
on tdb_seqnum change.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Add flags to the beginning of share_mode_data</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-28T05:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=01428c55dd0440976a0a319823cf7bc6113f508a'/>
<id>01428c55dd0440976a0a319823cf7bc6113f508a</id>
<content type='text'>
They are put at the beginning for easy parsing without reading the
full struct. First step to remove the number of read oplocks/leases
from brlock.tdb, where it does not belong.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They are put at the beginning for easy parsing without reading the
full struct. First step to remove the number of read oplocks/leases
from brlock.tdb, where it does not belong.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Send do_lock() through share_mode_do_locked()</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-07-01T13:56:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=c5659f7b05289d23efe0288702157c6b5442ed3d'/>
<id>c5659f7b05289d23efe0288702157c6b5442ed3d</id>
<content type='text'>
We need to maintain the locking hierarchy locking.tdb-&gt;brlock.tdb at
all times. vfs_fruit directly calls do_lock(), which might fail to
maintain the locking hierarchy: In brlock.c we call
contend_level2_oplocks_begin(), which will soon look at the
locking.tdb record.

For the SMB1 and SMB2 callers we already have the share mode locked,
we might want to watch that record for unlocks. For those callers
share_mode_do_locked() is practically free to call, we share the
underlying db_record.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to maintain the locking hierarchy locking.tdb-&gt;brlock.tdb at
all times. vfs_fruit directly calls do_lock(), which might fail to
maintain the locking hierarchy: In brlock.c we call
contend_level2_oplocks_begin(), which will soon look at the
locking.tdb record.

For the SMB1 and SMB2 callers we already have the share mode locked,
we might want to watch that record for unlocks. For those callers
share_mode_do_locked() is practically free to call, we share the
underlying db_record.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Add share_mode_do_locked()</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-27T15:23:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=44a77e6a5f9cb8c051648eb8f6759aadf3596544'/>
<id>44a77e6a5f9cb8c051648eb8f6759aadf3596544</id>
<content type='text'>
This is made for efficient locking of share mode records in
locking.tdb. Right now we already need that when accessing leases.tdb,
and soon it will be required for brlock.tdb as well. It does not give
direct access to the parsed share mode entry, but the record is
available for dbwrap_watched_wakeup() within downgrade_lease().

It can be freely nested with get_share_mode_lock calls, the record
will be shared and proper nesting should be checked.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is made for efficient locking of share mode records in
locking.tdb. Right now we already need that when accessing leases.tdb,
and soon it will be required for brlock.tdb as well. It does not give
direct access to the parsed share mode entry, but the record is
available for dbwrap_watched_wakeup() within downgrade_lease().

It can be freely nested with get_share_mode_lock calls, the record
will be shared and proper nesting should be checked.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Introduce static_share_mode_record</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-27T14:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=0be81cda56788864f4a08aaa7e99746a6f61b1f1'/>
<id>0be81cda56788864f4a08aaa7e99746a6f61b1f1</id>
<content type='text'>
The next commit will introduce share_mode_do_locked(), which allocates
a share mode record on the stack. We have to expect nested
get_share_mode_lock() calls from within share_mode_do_locked() for
which we need to share a db_record.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The next commit will introduce share_mode_do_locked(), which allocates
a share mode record on the stack. We have to expect nested
get_share_mode_lock() calls from within share_mode_do_locked() for
which we need to share a db_record.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>smbd: Simplify share_mode_lock.c</title>
<updated>2019-07-04T14:03:29+00:00</updated>
<author>
<name>Volker Lendecke</name>
<email>vl@samba.org</email>
</author>
<published>2019-06-27T12:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=aabc97ebc92f6b0977910a3125182e44ac4fdec9'/>
<id>aabc97ebc92f6b0977910a3125182e44ac4fdec9</id>
<content type='text'>
Do explicit refcounting instead of talloc_reference(). A later patch
will introduce a share_mode_do_locked() routine that can be nested
arbitrarily with get_share_mode_lock(). To do sanity checks for proper
nesting, share_mode_do_locked needs to be aware of the reference
counts for "static_share_mode_lock".

Why is share_mode_memcache_delete() gone? In parse_share_modes() we
already move the data out of the cache, share_mode_lock_destructor()
we don't even bother re-adding the share_mode_data to the cache if
it does not have share entries, because the next opener will invent a
new seqnum anyway.

Also: Less talloc_reference(), less lines of code.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do explicit refcounting instead of talloc_reference(). A later patch
will introduce a share_mode_do_locked() routine that can be nested
arbitrarily with get_share_mode_lock(). To do sanity checks for proper
nesting, share_mode_do_locked needs to be aware of the reference
counts for "static_share_mode_lock".

Why is share_mode_memcache_delete() gone? In parse_share_modes() we
already move the data out of the cache, share_mode_lock_destructor()
we don't even bother re-adding the share_mode_data to the cache if
it does not have share entries, because the next opener will invent a
new seqnum anyway.

Also: Less talloc_reference(), less lines of code.

Signed-off-by: Volker Lendecke &lt;vl@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
