<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/nbd.h, branch v3.14.29</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.29</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.14.29'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-07-03T23:08:05Z</updated>
<entry>
<title>nbd: correct disconnect behavior</title>
<updated>2013-07-03T23:08:05Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2013-07-03T22:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c378f70adbc1bbecd9e6db145019f14b2f688c7c'/>
<id>urn:sha1:c378f70adbc1bbecd9e6db145019f14b2f688c7c</id>
<content type='text'>
Currently, when a disconnect is requested by the user (via NBD_DISCONNECT
ioctl) the return from NBD_DO_IT is undefined (it is usually one of
several error codes).  This means that nbd-client does not know if a
manual disconnect was performed or whether a network error occurred.
Because of this, nbd-client's persist mode (which tries to reconnect after
error, but not after manual disconnect) does not always work correctly.

This change fixes this by causing NBD_DO_IT to always return 0 if a user
requests a disconnect.  This means that nbd-client can correctly either
persist the connection (if an error occurred) or disconnect (if the user
requested it).

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Acked-by: Rob Landley &lt;rob@landley.net&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>UAPI: (Scripted) Disintegrate include/linux</title>
<updated>2012-10-13T09:46:48Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-10-13T09:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=607ca46e97a1b6594b29647d98a32d545c24bdff'/>
<id>urn:sha1:607ca46e97a1b6594b29647d98a32d545c24bdff</id>
<content type='text'>
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>nbd: handle discard requests</title>
<updated>2012-10-05T18:05:24Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2012-10-05T00:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a336d29870f8a1f8e5f10d9f1aa95531c4edeabe'/>
<id>urn:sha1:a336d29870f8a1f8e5f10d9f1aa95531c4edeabe</id>
<content type='text'>
Add discard support to nbd.  If the nbd-server supports discard, it will
send NBD_FLAG_SEND_TRIM to the client.  The client will then set the flag
in the kernel via NBD_SET_FLAGS, which tells the kernel to enable discards
for the device (QUEUE_FLAG_DISCARD).

If discard support is enabled, then when the nbd client system receives a
discard request, this will be passed along to the nbd-server.  When the
discard request is received by the nbd-server, it will perform:

	fallocate(.. FALLOC_FL_PUNCH_HOLE ..)

To punch a hole in the backend storage, which is no longer needed.

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>nbd: add set flags ioctl</title>
<updated>2012-10-05T18:05:23Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2012-10-05T00:16:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2f012508880f8037590372c24ca6e8b6af8fffb6'/>
<id>urn:sha1:2f012508880f8037590372c24ca6e8b6af8fffb6</id>
<content type='text'>
Add a set-flags ioctl, allowing various option flags to be set on an nbd
device.  This allows the nbd-client to set the device flags (to enable
read-only mode, or enable discard support, etc.).

Flags are typically specified by the nbd-server.  During the negotiation
phase of the nbd connection, the server sends its flags to the client.
The client then uses NBD_SET_FLAGS to inform the kernel of the options.

Also included is a one-line fix to debug output for the set-timeout ioctl.

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>header: fix broken headers for user space</title>
<updated>2010-08-23T04:15:39Z</updated>
<author>
<name>Changli Gao</name>
<email>xiaosuo@gmail.com</email>
</author>
<published>2010-08-22T17:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=09cd2b99c6cdd1e14e84c1febca2fb91e9f4e5ba'/>
<id>urn:sha1:09cd2b99c6cdd1e14e84c1febca2fb91e9f4e5ba</id>
<content type='text'>
__packed is only defined in kernel space, so we should use
__attribute__((packed)) for the code shared between kernel and user space.

Two __attribute() annotations are replaced with __attribute__() too.

Signed-off-by: Changli Gao &lt;xiaosuo@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: use __packed annotation</title>
<updated>2010-06-03T10:21:52Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-06-03T10:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bc10502dba37d3b210efd9f3867212298f13b78e'/>
<id>urn:sha1:bc10502dba37d3b210efd9f3867212298f13b78e</id>
<content type='text'>
cleanup patch.

Use new __packed annotation in net/ and include/
(except netfilter)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>nbd: delete superfluous test for __GNUC__</title>
<updated>2008-04-29T15:06:24Z</updated>
<author>
<name>Robert P. J. Day</name>
<email>rpjday@crashcourse.ca</email>
</author>
<published>2008-04-29T08:02:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=098ef1c0ea7b1b3ff9d89364af5ebc5b672cf932'/>
<id>urn:sha1:098ef1c0ea7b1b3ff9d89364af5ebc5b672cf932</id>
<content type='text'>
Since &lt;linux/compiler.h&gt; already tests for __GNUC__, there's no point in nbd.h
repeating that test.

Signed-off-by: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Cc: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>NBD: allow nbd to be used locally</title>
<updated>2008-04-29T15:06:23Z</updated>
<author>
<name>Laurent Vivier</name>
<email>Laurent.Vivier@bull.net</email>
</author>
<published>2008-04-29T08:02:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=48cf6061b30205b29b306bf9bc22dd6f0b091461'/>
<id>urn:sha1:48cf6061b30205b29b306bf9bc22dd6f0b091461</id>
<content type='text'>
This patch allows Network Block Device to be mounted locally (nbd-client to
nbd-server over 127.0.0.1).

It creates a kthread to avoid the deadlock described in NBD tools
documentation.  So, if nbd-client hangs waiting for pages, the kblockd thread
can continue its work and free pages.

I have tested the patch to verify that it avoids the hang that always occurs
when writing to a localhost nbd connection.  I have also tested to verify that
no performance degradation results from the additional thread and queue.

Patch originally from Laurent Vivier.

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Laurent Vivier &lt;Laurent.Vivier@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>NBD: remove limit on max number of nbd devices</title>
<updated>2008-02-08T17:22:41Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2008-02-08T12:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=20a8143eaa3300a58326156eaf43e03db0fd2cb6'/>
<id>urn:sha1:20a8143eaa3300a58326156eaf43e03db0fd2cb6</id>
<content type='text'>
Remove the arbitrary 128 device limit for NBD.  nbds_max can now be set to
any number.  In certain scenarios where devices are used sparsely we have
run into the 128 device limit.

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>NBD: allow hung network I/O to be cancelled</title>
<updated>2007-10-17T15:42:55Z</updated>
<author>
<name>Paul Clements</name>
<email>paul.clements@steeleye.com</email>
</author>
<published>2007-10-17T06:27:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7fdfd4065c264bddd2d9277470a6a99d34e01bef'/>
<id>urn:sha1:7fdfd4065c264bddd2d9277470a6a99d34e01bef</id>
<content type='text'>
Allow NBD I/O to be cancelled when a network outage occurs.  Previously, I/O
would just hang, and if enough I/O was hung in nbd, the system (at least
user-level) would completely hang until a TCP timeout (default, 15 minutes)
occurred.

The patch introduces a new ioctl NBD_SET_TIMEOUT that allows a transmit
timeout value (in seconds) to be specified.  Any network send that exceeds the
timeout will be cancelled and the nbd connection will be shut down.  I've
tested with various timeout values and 6 seconds seems to be a good choice for
the timeout.  If the NBD_SET_TIMEOUT ioctl is not called, you get the old (I/O
hang) behavior.

Signed-off-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
