On 06/24/2016 04:09 AM, Pranay Kr. Srivastava wrote:
> When a timeout occurs or a recv fails, then
> instead of abruplty killing nbd block device
s/abruplty/abruptly/
> wait for it's users to finish.
s/it's/its/
>
> This is more required when filesystem(s) like
> ext2 or ext3 don't expect thei
On 06/24/2016 03:29 AM, Markus Pargmann wrote:
> From: "Pranay Kr. Srivastava"
>
> When a timeout occurs or a recv fails, then instead of abruplty killing
s/abruplty/abruptly/
> nbd block device wait for it's users to finish.
s/it's/its/ (remember, "it's" is only usable where "it is" would als
spinlocked ranges should be small and not contain calls into huge
subfunctions. Fix my mistake and just get the pointer to the socket
instead of doing everything with spinlock held.
Reported-by: Mikulas Patocka
Signed-off-by: Markus Pargmann
Changelog:
Pranay Kr. Srivastava:
1) Use spin_lock i
This patch
1) uses spin_lock instead of irq version.
2) removes the goto statement in case a socket
is already assigned with simple if-else statement.
Signed-off-by: Pranay Kr. Srivastava
---
drivers/block/nbd.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --g
This patch series fixes the following
1) fix might_sleep warning on socket shutdown:
Fix sock_shutdown to avoid calling kernel_sock_shutdown
while holding spin_lock.
2) cleanup nbd_set_socket
Simple fixes to nbd_set_socket.
3) make nbd device wait for its users.
When a timeout or er
When a timeout occurs or a recv fails, then
instead of abruplty killing nbd block device
wait for it's users to finish.
This is more required when filesystem(s) like
ext2 or ext3 don't expect their buffer heads to
disappear while the filesystem is mounted.
Each open of a nbd device is refcounted,
Hey Markus,
On Fri, Jun 24, 2016 at 2:59 PM, Markus Pargmann wrote:
> From: "Pranay Kr. Srivastava"
>
> When a timeout occurs or a recv fails, then instead of abruplty killing
> nbd block device wait for it's users to finish.
>
> This is more required when filesystem(s) like ext2 or ext3 don't e
From: "Pranay Kr. Srivastava"
When a timeout occurs or a recv fails, then instead of abruplty killing
nbd block device wait for it's users to finish.
This is more required when filesystem(s) like ext2 or ext3 don't expect
their buffer heads to disappear while the filesystem is mounted.
Each ope
After NBD_DO_IT exited the block device may still be used. Make sure
that we handle intended disconnects differently and do not allow any
changed of the nbd device.
This patch should avoid that the nbd-client connects to a different server
and the users of the block device are suddenly reading/wri