* NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty
@ 2017-01-14 23:31 Christoph Anton Mitterer
2017-01-15 1:03 ` Josef Bacik
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Anton Mitterer @ 2017-01-14 23:31 UTC (permalink / raw)
To: linux-block, nbd-general
[-- Attachment #1: Type: text/plain, Size: 870 bytes --]
Hi.
On advice from Alex Bligh I'd like to ping linux-block and nbd-general
about the issue described here:
https://github.com/NetworkBlockDevice/nbd/issues/44
What basically happens is, that with a recent kernel (Linux heisenberg
4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux),
when a device larger than something between 1 TiB and 2 TiB is exported
via nbd-server and connected to via nbd-client (which uses the kernel
driver, AFAIU) than the device size gets insanely large while reading
from /dev/nbd0 gives actually nothing.
The bug does not seem to happen when the kernel is not involved (we
tried using nbd-server and qemu-img as the client).
Don't think it makes all too much sense to copy & paste everything from
what was tried already for testing here, so please have a look at the
issue on github.
Best,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5930 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty
2017-01-14 23:31 NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty Christoph Anton Mitterer
@ 2017-01-15 1:03 ` Josef Bacik
2017-01-15 1:27 ` Christoph Anton Mitterer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Josef Bacik @ 2017-01-15 1:03 UTC (permalink / raw)
To: Christoph Anton Mitterer; +Cc: linux-block, nbd-general
On Sat, Jan 14, 2017 at 6:31 PM, Christoph Anton Mitterer
<calestyo@scientia.net> wrote:
> Hi.
>
> On advice from Alex Bligh I'd like to ping linux-block and nbd-general
> about the issue described here:
> https://github.com/NetworkBlockDevice/nbd/issues/44
>
> What basically happens is, that with a recent kernel (Linux heisenberg
> 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux),
> when a device larger than something between 1 TiB and 2 TiB is
> exported
> via nbd-server and connected to via nbd-client (which uses the kernel
> driver, AFAIU) than the device size gets insanely large while reading
> from /dev/nbd0 gives actually nothing.
>
>
> The bug does not seem to happen when the kernel is not involved (we
> tried using nbd-server and qemu-img as the client).
>
> Don't think it makes all too much sense to copy & paste everything
> from
> what was tried already for testing here, so please have a look at the
> issue on github.
Yeah I noticed this in testing, there's a bug with NBD since it's
inception where it uses a 32 bit number for keeping track of the size
of the device, I fixed it with
nbd: use loff_t for blocksize and nbd_set_size args
It'll be in 4.10. Thanks,
Josef
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty
2017-01-15 1:03 ` Josef Bacik
@ 2017-01-15 1:27 ` Christoph Anton Mitterer
2017-01-15 4:27 ` Christoph Anton Mitterer
2017-01-15 7:13 ` [Nbd] " Alex Bligh
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Anton Mitterer @ 2017-01-15 1:27 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-block, nbd-general
[-- Attachment #1: Type: text/plain, Size: 259 bytes --]
On Sat, 2017-01-14 at 20:03 -0500, Josef Bacik wrote:
> nbd: use loff_t for blocksize and nbd_set_size args
I'm just trying your patch, which does however not apply to 4.9.2 (but
I've adapted it)... will tell later if it worked for me.
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5930 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty
2017-01-15 1:03 ` Josef Bacik
2017-01-15 1:27 ` Christoph Anton Mitterer
@ 2017-01-15 4:27 ` Christoph Anton Mitterer
2017-01-15 7:13 ` [Nbd] " Alex Bligh
2 siblings, 0 replies; 5+ messages in thread
From: Christoph Anton Mitterer @ 2017-01-15 4:27 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-block, nbd-general
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
On Sat, 2017-01-14 at 20:03 -0500, Josef Bacik wrote:
> nbd: use loff_t for blocksize and nbd_set_size args
Tested it, and it seems to fix the issue :-)
Cheers,
Chris.
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5930 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Nbd] NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty
2017-01-15 1:03 ` Josef Bacik
2017-01-15 1:27 ` Christoph Anton Mitterer
2017-01-15 4:27 ` Christoph Anton Mitterer
@ 2017-01-15 7:13 ` Alex Bligh
2 siblings, 0 replies; 5+ messages in thread
From: Alex Bligh @ 2017-01-15 7:13 UTC (permalink / raw)
To: Josef Bacik
Cc: Alex Bligh, Christoph Anton Mitterer, linux-block,
nbd-general@lists.sourceforge.net
> On 15 Jan 2017, at 01:03, Josef Bacik <jbacik@fb.com> wrote:
>=20
> Yeah I noticed this in testing, there's a bug with NBD since it's=20
> inception where it uses a 32 bit number for keeping track of the size=20=
> of the device, I fixed it with
>=20
> nbd: use loff_t for blocksize and nbd_set_size args
>=20
> It'll be in 4.10. Thanks,
Interestingly enough, this is a regression, as the random 3.x kernel I =
tried did not show the issue.
Thanks for the fix Josef.
--=20
Alex Bligh
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-15 7:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-14 23:31 NBD: exported files over something around 1 TiB get an insane device size on the client side and are actually empty Christoph Anton Mitterer
2017-01-15 1:03 ` Josef Bacik
2017-01-15 1:27 ` Christoph Anton Mitterer
2017-01-15 4:27 ` Christoph Anton Mitterer
2017-01-15 7:13 ` [Nbd] " Alex Bligh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.