public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] nbd: pass MSG_* flags to kernel_recvmsg()
@ 2011-05-27  6:00 Namhyung Kim
  2011-05-27  6:00 ` [PATCH 2/3] nbd: limit module parameters to a sane value Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Namhyung Kim @ 2011-05-27  6:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, Paul Clements

Unlike kernel_sendmsg(), kernel_recvmsg() requires passing flags explicitly
via last parameter instead of struct msghdr.msg_flags. Therefore calls to
sock_xmit(lo, 0, ..., MSG_WAITALL) have not been processed properly by tcp
layer wrt. the flag. Fix it.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Clements <Paul.Clements@steeleye.com>
---
 drivers/block/nbd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index e6fc716aca45..1df3bfe5225b 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -192,7 +192,8 @@ static int sock_xmit(struct nbd_device *lo, int send, void *buf, int size,
 			if (lo->xmit_timeout)
 				del_timer_sync(&ti);
 		} else
-			result = kernel_recvmsg(sock, &msg, &iov, 1, size, 0);
+			result = kernel_recvmsg(sock, &msg, &iov, 1, size,
+						msg.msg_flags);
 
 		if (signal_pending(current)) {
 			siginfo_t info;
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-06-06 10:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27  6:00 [PATCH 1/3] nbd: pass MSG_* flags to kernel_recvmsg() Namhyung Kim
2011-05-27  6:00 ` [PATCH 2/3] nbd: limit module parameters to a sane value Namhyung Kim
2011-05-27 12:41   ` Paul Clements
2011-06-06 10:29   ` Pavel Machek
2011-05-27  6:00 ` [PATCH 3/3] nbd: adjust 'max_part' according to part_shift Namhyung Kim
2011-05-27 12:59   ` Paul Clements
2011-05-27 12:33 ` [PATCH 1/3] nbd: pass MSG_* flags to kernel_recvmsg() Paul Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox