Thread (28 messages) 28 messages, 5 authors, 2020-03-25

Re: [PATCH v2 03/11] block: Introduce REQ_OP_ZONE_APPEND

From: Johannes Thumshirn <hidden>
Date: 2020-03-25 16:24:11
Also in: linux-fsdevel, linux-scsi

On 24/03/2020 16:25, Johannes Thumshirn wrote:
+static inline bool bio_can_zone_append(struct bio *bio, unsigned len)
+{
+	struct request_queue *q = bio->bi_disk->queue;
+	unsigned int max_append_sectors = queue_max_zone_append_sectors(q);
+
+	if (WARN_ON_ONCE(!max_append_sectors))
+		return false;
+
+	if (((bio->bi_iter.bi_size + len) >> 9) > max_append_sectors)
+		return false;
+
+	if (bio->bi_vcnt >= q->limits.max_segments)
+		return false;
+
+	return true;
+}
That return values need to be reversed as well...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help