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

From: Stephen Rothwell
Date: Thu Nov 15 2018 - 21:19:28 EST


Hi all,

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

block/blk.h

between commit:

1adfc5e4136f ("block: make sure discard bio is aligned with logical block size")

from Linus' tree (precedes v4.20-rc2) and commit:

079076b3416e ("block: remove deadline __deadline manipulation helpers")

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 block/blk.h
index 0089fefdf771,027a0ccc175e..000000000000
--- a/block/blk.h
+++ b/block/blk.h
@@@ -380,31 -233,6 +233,16 @@@ static inline void req_set_nomerge(stru
q->last_merge = NULL;
}

- /*
- * Steal a bit from this field for legacy IO path atomic IO marking. Note that
- * setting the deadline clears the bottom bit, potentially clearing the
- * completed bit. The user has to be OK with this (current ones are fine).
- */
- static inline void blk_rq_set_deadline(struct request *rq, unsigned long time)
- {
- rq->__deadline = time & ~0x1UL;
- }
-
- static inline unsigned long blk_rq_deadline(struct request *rq)
- {
- return rq->__deadline & ~0x1UL;
- }
-
+/*
+ * The max size one bio can handle is UINT_MAX becasue bvec_iter.bi_size
+ * is defined as 'unsigned int', meantime it has to aligned to with logical
+ * block size which is the minimum accepted unit by hardware.
+ */
+static inline unsigned int bio_allowed_max_sectors(struct request_queue *q)
+{
+ return round_down(UINT_MAX, queue_logical_block_size(q)) >> 9;
+}
+
/*
* Internal io_context interface
*/

Attachment: pgpmljGP4yss3.pgp
Description: OpenPGP digital signature