Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1564593

linux-next: manual merge of the vfs tree with Linus' tree

From Stephen Rothwell <sfr@canb.auug.org.au>
Newsgroups linux.kernel
Subject linux-next: manual merge of the vfs tree with Linus' tree
Date 2017-01-23 00:40 +0100
Message-ID <t2zTP-7gP-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/block/nbd.c

between commit:

  d61b7f972dab ("nbd: only set MSG_MORE when we have more to send")

from Linus' tree and commit:

  c9f2b6aeb922 ("[nbd] pass iov_iter to nbd_xmit()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/block/nbd.c
index 9fd06eeb1a17,3c2dbe412c02..000000000000
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@@ -271,8 -256,10 +256,10 @@@ static int sock_xmit(struct nbd_device 
  static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index)
  {
  	struct request *req = blk_mq_rq_from_pdu(cmd);
 -	int result, flags;
 +	int result;
- 	struct nbd_request request;
+ 	struct nbd_request request = {.magic = htonl(NBD_REQUEST_MAGIC)};
+ 	struct kvec iov = {.iov_base = &request, .iov_len = sizeof(request)};
+ 	struct iov_iter from;
  	unsigned long size = blk_rq_bytes(req);
  	struct bio *bio;
  	u32 type;
@@@ -318,11 -306,14 +305,13 @@@
  
  		bio_for_each_segment(bvec, bio, iter) {
  			bool is_last = !next && bio_iter_last(bvec, iter);
 +			int flags = is_last ? 0 : MSG_MORE;
  
 -			if (is_last)
 -				flags = MSG_MORE;
  			dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
  				cmd, bvec.bv_len);
- 			result = sock_send_bvec(nbd, index, &bvec, flags);
+ 			iov_iter_bvec(&from, ITER_BVEC | WRITE,
+ 				      &bvec, 1, bvec.bv_len);
+ 			result = sock_xmit(nbd, index, 1, &from, flags);
  			if (result <= 0) {
  				dev_err(disk_to_dev(nbd->disk),
  					"Send data failed (result %d)\n",

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

linux-next: manual merge of the vfs tree with Linus' tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-01-23 00:40 +0100

csiph-web