blk.h (51d798cdb5c219000fe76a3ffbcaa846b689ba80) blk.h (b6dc6198ebe855d70e6f68d279c4015fe5d73e7b)
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef BLK_INTERNAL_H
3#define BLK_INTERNAL_H
4
5#include <linux/blk-crypto.h>
6#include <linux/memblock.h> /* for max_pfn/max_low_pfn */
7#include <xen/xen.h>
8#include "blk-crypto-internal.h"

--- 331 unchanged lines hidden (view full) ---

340static inline void req_set_nomerge(struct request_queue *q, struct request *req)
341{
342 req->cmd_flags |= REQ_NOMERGE;
343 if (req == q->last_merge)
344 q->last_merge = NULL;
345}
346
347/*
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef BLK_INTERNAL_H
3#define BLK_INTERNAL_H
4
5#include <linux/blk-crypto.h>
6#include <linux/memblock.h> /* for max_pfn/max_low_pfn */
7#include <xen/xen.h>
8#include "blk-crypto-internal.h"

--- 331 unchanged lines hidden (view full) ---

340static inline void req_set_nomerge(struct request_queue *q, struct request *req)
341{
342 req->cmd_flags |= REQ_NOMERGE;
343 if (req == q->last_merge)
344 q->last_merge = NULL;
345}
346
347/*
348 * The max size one bio can handle is UINT_MAX becasue bvec_iter.bi_size
349 * is defined as 'unsigned int', meantime it has to aligned to with logical
350 * block size which is the minimum accepted unit by hardware.
351 */
352static inline unsigned int bio_allowed_max_sectors(struct request_queue *q)
353{
354 return round_down(UINT_MAX, queue_logical_block_size(q)) >> 9;
355}
356
357/*
358 * Internal io_context interface
359 */
360struct io_cq *ioc_find_get_icq(struct request_queue *q);
361struct io_cq *ioc_lookup_icq(struct request_queue *q);
362#ifdef CONFIG_BLK_ICQ
363void ioc_clear_queue(struct request_queue *q);
364#else
365static inline void ioc_clear_queue(struct request_queue *q)

--- 138 unchanged lines hidden ---
348 * Internal io_context interface
349 */
350struct io_cq *ioc_find_get_icq(struct request_queue *q);
351struct io_cq *ioc_lookup_icq(struct request_queue *q);
352#ifdef CONFIG_BLK_ICQ
353void ioc_clear_queue(struct request_queue *q);
354#else
355static inline void ioc_clear_queue(struct request_queue *q)

--- 138 unchanged lines hidden ---