<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/lockd/host.c, branch v3.4.16</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Lockd: shutdown NLM hosts in network namespace context</title>
<updated>2012-02-15T05:19:48+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2012-01-31T11:08:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3b64739fb928c34b13db6b5adcb0d3efb19e78be'/>
<id>3b64739fb928c34b13db6b5adcb0d3efb19e78be</id>
<content type='text'>
Lockd now managed in network namespace context. And this patch introduces
network namespace related NLM hosts shutdown in case of releasing per-net Lockd
resources.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Lockd now managed in network namespace context. And this patch introduces
network namespace related NLM hosts shutdown in case of releasing per-net Lockd
resources.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>LockD: make nlm hosts network namespace aware</title>
<updated>2012-02-15T05:19:48+00:00</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2012-01-31T11:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=66697bfd6aec0a9ca9331c1aa544ac20324a7561'/>
<id>66697bfd6aec0a9ca9331c1aa544ac20324a7561</id>
<content type='text'>
This object depends on RPC client, and thus on network namespace.
So let's make it's allocation and lookup in network namespace context.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This object depends on RPC client, and thus on network namespace.
So let's make it's allocation and lookup in network namespace context.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>SUNRPC: Replace svc_addr_u by sockaddr_storage</title>
<updated>2011-09-14T12:21:48+00:00</updated>
<author>
<name>Mi Jinlong</name>
<email>mijinlong@cn.fujitsu.com</email>
</author>
<published>2011-08-30T09:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=849a1cf13d4394d398d91752166e92e9ecd64f8d'/>
<id>849a1cf13d4394d398d91752166e92e9ecd64f8d</id>
<content type='text'>
For IPv6 local address, lockd can not callback to client for
missing scope id when binding address at inet6_bind:

 324       if (addr_type &amp; IPV6_ADDR_LINKLOCAL) {
 325               if (addr_len &gt;= sizeof(struct sockaddr_in6) &amp;&amp;
 326                   addr-&gt;sin6_scope_id) {
 327                       /* Override any existing binding, if another one
 328                        * is supplied by user.
 329                        */
 330                       sk-&gt;sk_bound_dev_if = addr-&gt;sin6_scope_id;
 331               }
 332
 333               /* Binding to link-local address requires an interface */
 334               if (!sk-&gt;sk_bound_dev_if) {
 335                       err = -EINVAL;
 336                       goto out_unlock;
 337               }

Replacing svc_addr_u by sockaddr_storage, let rqstp-&gt;rq_daddr contains more info
besides address.

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Reviewed-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Mi Jinlong &lt;mijinlong@cn.fujitsu.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For IPv6 local address, lockd can not callback to client for
missing scope id when binding address at inet6_bind:

 324       if (addr_type &amp; IPV6_ADDR_LINKLOCAL) {
 325               if (addr_len &gt;= sizeof(struct sockaddr_in6) &amp;&amp;
 326                   addr-&gt;sin6_scope_id) {
 327                       /* Override any existing binding, if another one
 328                        * is supplied by user.
 329                        */
 330                       sk-&gt;sk_bound_dev_if = addr-&gt;sin6_scope_id;
 331               }
 332
 333               /* Binding to link-local address requires an interface */
 334               if (!sk-&gt;sk_bound_dev_if) {
 335                       err = -EINVAL;
 336                       goto out_unlock;
 337               }

Replacing svc_addr_u by sockaddr_storage, let rqstp-&gt;rq_daddr contains more info
besides address.

Reviewed-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Reviewed-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Mi Jinlong &lt;mijinlong@cn.fujitsu.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!"</title>
<updated>2011-01-25T20:24:47+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2011-01-24T20:50:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80c30e8de4f81851b1f712bcc596e11d53bc76f1'/>
<id>80c30e8de4f81851b1f712bcc596e11d53bc76f1</id>
<content type='text'>
Nick Bowler &lt;nbowler@elliptictech.com&gt; reports:

&gt; We were just having some NFS server troubles, and my client machine
&gt; running 2.6.38-rc1+ (specifically, commit 2b1caf6ed7b888c95) crashed
&gt; hard (syslog output appended to this mail).
&gt;
&gt; I'm not sure what the exact timeline was or how to reproduce this,
&gt; but the server was rebooted during all this.  Since I've never seen
&gt; this happen before, it is possibly a regression from previous kernel
&gt; releases.  However, I recently updated my nfs-utils (on the client) to
&gt; version 1.2.3, so that might be related as well.

  [ BUG output redacted ]

When done searching, the for_each_host loop in next_host_state() falls
through and returns the final host on the host chain without bumping
it's reference count.

Since the host's ref count is only one at that point, releasing the
host in nlm_host_rebooted() attempts to destroy the host prematurely,
and therefore hits a BUG().

Likely, the original intent of the for_each_host behavior in
next_host_state() was to handle the case when the host chain is empty.
Searching the chain and finding no suitable host to return needs to be
handled as well.

Defensively restructure next_host_state() always to return NULL when
the loop falls through.

Introduced by commit b10e30f6 "lockd: reorganize nlm_host_rebooted".

Cc: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nick Bowler &lt;nbowler@elliptictech.com&gt; reports:

&gt; We were just having some NFS server troubles, and my client machine
&gt; running 2.6.38-rc1+ (specifically, commit 2b1caf6ed7b888c95) crashed
&gt; hard (syslog output appended to this mail).
&gt;
&gt; I'm not sure what the exact timeline was or how to reproduce this,
&gt; but the server was rebooted during all this.  Since I've never seen
&gt; this happen before, it is possibly a regression from previous kernel
&gt; releases.  However, I recently updated my nfs-utils (on the client) to
&gt; version 1.2.3, so that might be related as well.

  [ BUG output redacted ]

When done searching, the for_each_host loop in next_host_state() falls
through and returns the final host on the host chain without bumping
it's reference count.

Since the host's ref count is only one at that point, releasing the
host in nlm_host_rebooted() attempts to destroy the host prematurely,
and therefore hits a BUG().

Likely, the original intent of the for_each_host behavior in
next_host_state() was to handle the case when the host chain is empty.
Searching the chain and finding no suitable host to return needs to be
handled as well.

Defensively restructure next_host_state() always to return NULL when
the loop falls through.

Introduced by commit b10e30f6 "lockd: reorganize nlm_host_rebooted".

Cc: J. Bruce Fields &lt;bfields@fieldses.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: double unlock in next_host_state()</title>
<updated>2011-01-04T18:10:37+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-01-02T20:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=51f128ea1c9224c1e3cf6c6a1498431d97699668'/>
<id>51f128ea1c9224c1e3cf6c6a1498431d97699668</id>
<content type='text'>
We unlock again after we goto out.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We unlock again after we goto out.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: Remove src_sap and src_len from nlm_lookup_host_info struct</title>
<updated>2010-12-16T17:37:27+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-14T15:06:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=79691836603541e81a3793970826ac4a75429572'/>
<id>79691836603541e81a3793970826ac4a75429572</id>
<content type='text'>
Clean up.

The contents of the src_sap field is not used in nlm_alloc_host().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up.

The contents of the src_sap field is not used in nlm_alloc_host().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: Remove nlm_lookup_host()</title>
<updated>2010-12-16T17:37:27+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-14T15:06:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2025889828bb14b56d9aa4c1a785bd9847ccdc4b'/>
<id>2025889828bb14b56d9aa4c1a785bd9847ccdc4b</id>
<content type='text'>
Clean up.

Remove the now unused helper nlm_lookup_host().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up.

Remove the now unused helper nlm_lookup_host().

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: Make nrhosts an unsigned long</title>
<updated>2010-12-16T17:37:27+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-14T15:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fcc072c783491ca465e4d1e74da7dbb48dbf7a31'/>
<id>fcc072c783491ca465e4d1e74da7dbb48dbf7a31</id>
<content type='text'>
Clean up.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: Rename nlm_hosts</title>
<updated>2010-12-16T17:37:27+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-14T15:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d2df0484bb38f2e0d9754b00597d4a6d1cf666d0'/>
<id>d2df0484bb38f2e0d9754b00597d4a6d1cf666d0</id>
<content type='text'>
Clean up.

nlm_hosts now contains only server-side entries.  Rename it to match
convention of client side cache.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up.

nlm_hosts now contains only server-side entries.  Rename it to match
convention of client side cache.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lockd: Clean up nlmsvc_lookup_host()</title>
<updated>2010-12-16T17:37:26+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2010-12-14T15:06:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=67216b94d498f5880d8bba2a6b841880739dd524'/>
<id>67216b94d498f5880d8bba2a6b841880739dd524</id>
<content type='text'>
Clean up.

Change nlmsvc_lookup_host() to be purpose-built for server-side
nlm_host management.  This replaces the generic nlm_lookup_host()
helper function, just like on the client side.  The lookup logic is
specialized for server host lookups.

The server side cache also gets its own specialized equivalent of the
nlm_release_host() function.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up.

Change nlmsvc_lookup_host() to be purpose-built for server-side
nlm_host management.  This replaces the generic nlm_lookup_host()
helper function, just like on the client side.  The lookup logic is
specialized for server host lookups.

The server side cache also gets its own specialized equivalent of the
nlm_release_host() function.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
