linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jens Axboe <axboe@kernel.dk>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: Re: linux-next: manual merge of the block tree with the vfs tree
Date: Wed, 22 Feb 2017 09:14:14 +1100	[thread overview]
Message-ID: <20170222091414.2b85f4be@canb.auug.org.au> (raw)
In-Reply-To: <20170202134407.4403ad3a@canb.auug.org.au>

Hi all,

On Thu, 2 Feb 2017 13:44:07 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the block tree got a conflict in:
> 
>   drivers/block/nbd.c
> 
> between commit:
> 
>   c9f2b6aeb922 ("[nbd] pass iov_iter to nbd_xmit()")
> 
> from the vfs tree and commit:
> 
>   09fc54ccc427 ("nbd: move request validity checking into nbd_send_cmd")
>   aebf526b53ae ("block: fold cmd_type into the REQ_OP_ space")
> 
> from the block 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 48132b0530fe,0be84a3cb6d7..000000000000
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@@ -265,17 -275,32 +262,32 @@@ static int nbd_send_cmd(struct nbd_devi
>   	u32 type;
>   	u32 tag = blk_mq_unique_tag(req);
>   
>  +	iov_iter_kvec(&from, WRITE | ITER_KVEC, &iov, 1, sizeof(request));
>  +
> - 	if (req_op(req) == REQ_OP_DISCARD)
> + 	switch (req_op(req)) {
> + 	case REQ_OP_DISCARD:
>   		type = NBD_CMD_TRIM;
> - 	else if (req_op(req) == REQ_OP_FLUSH)
> + 		break;
> + 	case REQ_OP_FLUSH:
>   		type = NBD_CMD_FLUSH;
> - 	else if (rq_data_dir(req) == WRITE)
> + 		break;
> + 	case REQ_OP_WRITE:
>   		type = NBD_CMD_WRITE;
> - 	else
> + 		break;
> + 	case REQ_OP_READ:
>   		type = NBD_CMD_READ;
> + 		break;
> + 	default:
> + 		return -EIO;
> + 	}
> + 
> + 	if (rq_data_dir(req) == WRITE &&
> + 	    (nbd->flags & NBD_FLAG_READ_ONLY)) {
> + 		dev_err_ratelimited(disk_to_dev(nbd->disk),
> + 				    "Write on read-only\n");
> + 		return -EIO;
> + 	}
>   
>  -	memset(&request, 0, sizeof(request));
>  -	request.magic = htonl(NBD_REQUEST_MAGIC);
>   	request.type = htonl(type);
>   	if (type != NBD_CMD_FLUSH) {
>   		request.from = cpu_to_be64((u64)blk_rq_pos(req) << 9);

This is now a conflict between the vfs tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

  reply	other threads:[~2017-02-21 22:14 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02  2:44 linux-next: manual merge of the block tree with the vfs tree Stephen Rothwell
2017-02-21 22:14 ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-11-28  0:20 Stephen Rothwell
2022-07-15  3:09 Stephen Rothwell
2022-07-14  2:08 Stephen Rothwell
2022-07-14 16:36 ` Jens Axboe
2022-07-15  0:52   ` Al Viro
2022-07-15  1:04     ` Al Viro
2022-07-18  2:59       ` Stephen Rothwell
2022-07-18  4:58         ` Al Viro
2022-07-19 16:52           ` Jens Axboe
2022-07-20  2:45             ` Al Viro
2022-07-20  3:00               ` Jens Axboe
2022-07-11  3:57 Stephen Rothwell
2022-07-11  3:38 Stephen Rothwell
2022-05-23  2:28 Stephen Rothwell
2022-05-23  2:58 ` Jens Axboe
2022-05-23 22:54 ` Stephen Rothwell
2021-01-27  3:24 Stephen Rothwell
2019-12-20  1:36 Stephen Rothwell
2019-12-20  5:34 ` Jens Axboe
2020-01-20  1:40   ` Stephen Rothwell
2020-01-20  2:45     ` Jens Axboe
2020-01-20  2:57       ` Jens Axboe
2018-05-29  4:37 Stephen Rothwell
2018-05-29  4:33 Stephen Rothwell
2018-05-29  8:12 ` Christoph Hellwig
2018-05-29 14:22   ` Jens Axboe
2018-05-29 21:40     ` Stephen Rothwell
2018-05-29 22:17       ` Jens Axboe
2016-12-12  1:31 Stephen Rothwell
2016-12-12  1:44 ` Al Viro
2016-12-12  2:00 ` Ming Lei
2015-02-09  3:55 Stephen Rothwell
2015-01-27  3:57 Stephen Rothwell
2015-01-27  4:00 ` Jens Axboe
2015-01-27  4:54   ` Al Viro
2015-01-28 17:11     ` Christoph Hellwig
2015-01-29  5:15       ` Al Viro
2015-02-01  5:56         ` Al Viro
2015-02-02  8:06           ` Christoph Hellwig
2013-04-04  2:16 Stephen Rothwell
2010-05-18  3:04 Stephen Rothwell
2010-05-18 15:37 ` H Hartley Sweeten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170222091414.2b85f4be@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).