@@ -177,7 +177,8 @@ struct request {
* Three pointers are available for the IO schedulers, if they need
* more they have to dynamically allocate it. Flush requests are
* never put on the IO scheduler. So let the flush fields share
- * space with the elevator data.
+ * space with the elevator data. Private request are never put on
+ * IO scheduler, and not be a flush request.
*/
union {
struct {
@@ -190,6 +191,9 @@ struct request {
struct list_head list;
rq_end_io_fn *saved_end_io;
} flush;
+
+ /* used for private request only */
+ unsigned long private_rq_data;
};
struct gendisk *rq_disk;
Reuse one union shared by elevator and flush request for data of private request. Private request won't enter IO scheduler and never be a flush request, so reuse the space for data of private request. This field is added to pass driver private info for private request only. Cc: James Smart <james.smart@broadcom.com> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Ming Lei <ming.lei@redhat.com> --- include/linux/blkdev.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)