block.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM block
  4. #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_BLOCK_H
  6. #include <linux/blktrace_api.h>
  7. #include <linux/blkdev.h>
  8. #include <linux/buffer_head.h>
  9. #include <linux/tracepoint.h>
  10. #define RWBS_LEN 8
  11. DECLARE_EVENT_CLASS(block_buffer,
  12. TP_PROTO(struct buffer_head *bh),
  13. TP_ARGS(bh),
  14. TP_STRUCT__entry (
  15. __field( dev_t, dev )
  16. __field( sector_t, sector )
  17. __field( size_t, size )
  18. ),
  19. TP_fast_assign(
  20. __entry->dev = bh->b_bdev->bd_dev;
  21. __entry->sector = bh->b_blocknr;
  22. __entry->size = bh->b_size;
  23. ),
  24. TP_printk("%d,%d sector=%llu size=%zu",
  25. MAJOR(__entry->dev), MINOR(__entry->dev),
  26. (unsigned long long)__entry->sector, __entry->size
  27. )
  28. );
  29. /**
  30. * block_touch_buffer - mark a buffer accessed
  31. * @bh: buffer_head being touched
  32. *
  33. * Called from touch_buffer().
  34. */
  35. DEFINE_EVENT(block_buffer, block_touch_buffer,
  36. TP_PROTO(struct buffer_head *bh),
  37. TP_ARGS(bh)
  38. );
  39. /**
  40. * block_dirty_buffer - mark a buffer dirty
  41. * @bh: buffer_head being dirtied
  42. *
  43. * Called from mark_buffer_dirty().
  44. */
  45. DEFINE_EVENT(block_buffer, block_dirty_buffer,
  46. TP_PROTO(struct buffer_head *bh),
  47. TP_ARGS(bh)
  48. );
  49. /**
  50. * block_rq_requeue - place block IO request back on a queue
  51. * @q: queue holding operation
  52. * @rq: block IO operation request
  53. *
  54. * The block operation request @rq is being placed back into queue
  55. * @q. For some reason the request was not completed and needs to be
  56. * put back in the queue.
  57. */
  58. TRACE_EVENT(block_rq_requeue,
  59. TP_PROTO(struct request_queue *q, struct request *rq),
  60. TP_ARGS(q, rq),
  61. TP_STRUCT__entry(
  62. __field( dev_t, dev )
  63. __field( sector_t, sector )
  64. __field( unsigned int, nr_sector )
  65. __array( char, rwbs, RWBS_LEN )
  66. __dynamic_array( char, cmd, 1 )
  67. ),
  68. TP_fast_assign(
  69. __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
  70. __entry->sector = blk_rq_trace_sector(rq);
  71. __entry->nr_sector = blk_rq_trace_nr_sectors(rq);
  72. blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
  73. __get_str(cmd)[0] = '\0';
  74. ),
  75. TP_printk("%d,%d %s (%s) %llu + %u [%d]",
  76. MAJOR(__entry->dev), MINOR(__entry->dev),
  77. __entry->rwbs, __get_str(cmd),
  78. (unsigned long long)__entry->sector,
  79. __entry->nr_sector, 0)
  80. );
  81. /**
  82. * block_rq_complete - block IO operation completed by device driver
  83. * @rq: block operations request
  84. * @error: status code
  85. * @nr_bytes: number of completed bytes
  86. *
  87. * The block_rq_complete tracepoint event indicates that some portion
  88. * of operation request has been completed by the device driver. If
  89. * the @rq->bio is %NULL, then there is absolutely no additional work to
  90. * do for the request. If @rq->bio is non-NULL then there is
  91. * additional work required to complete the request.
  92. */
  93. TRACE_EVENT(block_rq_complete,
  94. TP_PROTO(struct request *rq, int error, unsigned int nr_bytes),
  95. TP_ARGS(rq, error, nr_bytes),
  96. TP_STRUCT__entry(
  97. __field( dev_t, dev )
  98. __field( sector_t, sector )
  99. __field( unsigned int, nr_sector )
  100. __field( int, error )
  101. __array( char, rwbs, RWBS_LEN )
  102. __dynamic_array( char, cmd, 1 )
  103. ),
  104. TP_fast_assign(
  105. __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
  106. __entry->sector = blk_rq_pos(rq);
  107. __entry->nr_sector = nr_bytes >> 9;
  108. __entry->error = error;
  109. blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes);
  110. __get_str(cmd)[0] = '\0';
  111. ),
  112. TP_printk("%d,%d %s (%s) %llu + %u [%d]",
  113. MAJOR(__entry->dev), MINOR(__entry->dev),
  114. __entry->rwbs, __get_str(cmd),
  115. (unsigned long long)__entry->sector,
  116. __entry->nr_sector, __entry->error)
  117. );
  118. DECLARE_EVENT_CLASS(block_rq,
  119. TP_PROTO(struct request_queue *q, struct request *rq),
  120. TP_ARGS(q, rq),
  121. TP_STRUCT__entry(
  122. __field( dev_t, dev )
  123. __field( sector_t, sector )
  124. __field( unsigned int, nr_sector )
  125. __field( unsigned int, bytes )
  126. __array( char, rwbs, RWBS_LEN )
  127. __array( char, comm, TASK_COMM_LEN )
  128. __dynamic_array( char, cmd, 1 )
  129. ),
  130. TP_fast_assign(
  131. __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0;
  132. __entry->sector = blk_rq_trace_sector(rq);
  133. __entry->nr_sector = blk_rq_trace_nr_sectors(rq);
  134. __entry->bytes = blk_rq_bytes(rq);
  135. blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
  136. __get_str(cmd)[0] = '\0';
  137. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  138. ),
  139. TP_printk("%d,%d %s %u (%s) %llu + %u [%s]",
  140. MAJOR(__entry->dev), MINOR(__entry->dev),
  141. __entry->rwbs, __entry->bytes, __get_str(cmd),
  142. (unsigned long long)__entry->sector,
  143. __entry->nr_sector, __entry->comm)
  144. );
  145. /**
  146. * block_rq_insert - insert block operation request into queue
  147. * @q: target queue
  148. * @rq: block IO operation request
  149. *
  150. * Called immediately before block operation request @rq is inserted
  151. * into queue @q. The fields in the operation request @rq struct can
  152. * be examined to determine which device and sectors the pending
  153. * operation would access.
  154. */
  155. DEFINE_EVENT(block_rq, block_rq_insert,
  156. TP_PROTO(struct request_queue *q, struct request *rq),
  157. TP_ARGS(q, rq)
  158. );
  159. /**
  160. * block_rq_issue - issue pending block IO request operation to device driver
  161. * @q: queue holding operation
  162. * @rq: block IO operation operation request
  163. *
  164. * Called when block operation request @rq from queue @q is sent to a
  165. * device driver for processing.
  166. */
  167. DEFINE_EVENT(block_rq, block_rq_issue,
  168. TP_PROTO(struct request_queue *q, struct request *rq),
  169. TP_ARGS(q, rq)
  170. );
  171. /**
  172. * block_bio_bounce - used bounce buffer when processing block operation
  173. * @q: queue holding the block operation
  174. * @bio: block operation
  175. *
  176. * A bounce buffer was used to handle the block operation @bio in @q.
  177. * This occurs when hardware limitations prevent a direct transfer of
  178. * data between the @bio data memory area and the IO device. Use of a
  179. * bounce buffer requires extra copying of data and decreases
  180. * performance.
  181. */
  182. TRACE_EVENT(block_bio_bounce,
  183. TP_PROTO(struct request_queue *q, struct bio *bio),
  184. TP_ARGS(q, bio),
  185. TP_STRUCT__entry(
  186. __field( dev_t, dev )
  187. __field( sector_t, sector )
  188. __field( unsigned int, nr_sector )
  189. __array( char, rwbs, RWBS_LEN )
  190. __array( char, comm, TASK_COMM_LEN )
  191. ),
  192. TP_fast_assign(
  193. __entry->dev = bio_dev(bio);
  194. __entry->sector = bio->bi_iter.bi_sector;
  195. __entry->nr_sector = bio_sectors(bio);
  196. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  197. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  198. ),
  199. TP_printk("%d,%d %s %llu + %u [%s]",
  200. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  201. (unsigned long long)__entry->sector,
  202. __entry->nr_sector, __entry->comm)
  203. );
  204. /**
  205. * block_bio_complete - completed all work on the block operation
  206. * @q: queue holding the block operation
  207. * @bio: block operation completed
  208. * @error: io error value
  209. *
  210. * This tracepoint indicates there is no further work to do on this
  211. * block IO operation @bio.
  212. */
  213. TRACE_EVENT(block_bio_complete,
  214. TP_PROTO(struct request_queue *q, struct bio *bio, int error),
  215. TP_ARGS(q, bio, error),
  216. TP_STRUCT__entry(
  217. __field( dev_t, dev )
  218. __field( sector_t, sector )
  219. __field( unsigned, nr_sector )
  220. __field( int, error )
  221. __array( char, rwbs, RWBS_LEN)
  222. ),
  223. TP_fast_assign(
  224. __entry->dev = bio_dev(bio);
  225. __entry->sector = bio->bi_iter.bi_sector;
  226. __entry->nr_sector = bio_sectors(bio);
  227. __entry->error = error;
  228. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  229. ),
  230. TP_printk("%d,%d %s %llu + %u [%d]",
  231. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  232. (unsigned long long)__entry->sector,
  233. __entry->nr_sector, __entry->error)
  234. );
  235. DECLARE_EVENT_CLASS(block_bio_merge,
  236. TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
  237. TP_ARGS(q, rq, bio),
  238. TP_STRUCT__entry(
  239. __field( dev_t, dev )
  240. __field( sector_t, sector )
  241. __field( unsigned int, nr_sector )
  242. __array( char, rwbs, RWBS_LEN )
  243. __array( char, comm, TASK_COMM_LEN )
  244. ),
  245. TP_fast_assign(
  246. __entry->dev = bio_dev(bio);
  247. __entry->sector = bio->bi_iter.bi_sector;
  248. __entry->nr_sector = bio_sectors(bio);
  249. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  250. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  251. ),
  252. TP_printk("%d,%d %s %llu + %u [%s]",
  253. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  254. (unsigned long long)__entry->sector,
  255. __entry->nr_sector, __entry->comm)
  256. );
  257. /**
  258. * block_bio_backmerge - merging block operation to the end of an existing operation
  259. * @q: queue holding operation
  260. * @rq: request bio is being merged into
  261. * @bio: new block operation to merge
  262. *
  263. * Merging block request @bio to the end of an existing block request
  264. * in queue @q.
  265. */
  266. DEFINE_EVENT(block_bio_merge, block_bio_backmerge,
  267. TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
  268. TP_ARGS(q, rq, bio)
  269. );
  270. /**
  271. * block_bio_frontmerge - merging block operation to the beginning of an existing operation
  272. * @q: queue holding operation
  273. * @rq: request bio is being merged into
  274. * @bio: new block operation to merge
  275. *
  276. * Merging block IO operation @bio to the beginning of an existing block
  277. * operation in queue @q.
  278. */
  279. DEFINE_EVENT(block_bio_merge, block_bio_frontmerge,
  280. TP_PROTO(struct request_queue *q, struct request *rq, struct bio *bio),
  281. TP_ARGS(q, rq, bio)
  282. );
  283. /**
  284. * block_bio_queue - putting new block IO operation in queue
  285. * @q: queue holding operation
  286. * @bio: new block operation
  287. *
  288. * About to place the block IO operation @bio into queue @q.
  289. */
  290. TRACE_EVENT(block_bio_queue,
  291. TP_PROTO(struct request_queue *q, struct bio *bio),
  292. TP_ARGS(q, bio),
  293. TP_STRUCT__entry(
  294. __field( dev_t, dev )
  295. __field( sector_t, sector )
  296. __field( unsigned int, nr_sector )
  297. __array( char, rwbs, RWBS_LEN )
  298. __array( char, comm, TASK_COMM_LEN )
  299. ),
  300. TP_fast_assign(
  301. __entry->dev = bio_dev(bio);
  302. __entry->sector = bio->bi_iter.bi_sector;
  303. __entry->nr_sector = bio_sectors(bio);
  304. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  305. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  306. ),
  307. TP_printk("%d,%d %s %llu + %u [%s]",
  308. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  309. (unsigned long long)__entry->sector,
  310. __entry->nr_sector, __entry->comm)
  311. );
  312. DECLARE_EVENT_CLASS(block_get_rq,
  313. TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
  314. TP_ARGS(q, bio, rw),
  315. TP_STRUCT__entry(
  316. __field( dev_t, dev )
  317. __field( sector_t, sector )
  318. __field( unsigned int, nr_sector )
  319. __array( char, rwbs, RWBS_LEN )
  320. __array( char, comm, TASK_COMM_LEN )
  321. ),
  322. TP_fast_assign(
  323. __entry->dev = bio ? bio_dev(bio) : 0;
  324. __entry->sector = bio ? bio->bi_iter.bi_sector : 0;
  325. __entry->nr_sector = bio ? bio_sectors(bio) : 0;
  326. blk_fill_rwbs(__entry->rwbs,
  327. bio ? bio->bi_opf : 0, __entry->nr_sector);
  328. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  329. ),
  330. TP_printk("%d,%d %s %llu + %u [%s]",
  331. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  332. (unsigned long long)__entry->sector,
  333. __entry->nr_sector, __entry->comm)
  334. );
  335. /**
  336. * block_getrq - get a free request entry in queue for block IO operations
  337. * @q: queue for operations
  338. * @bio: pending block IO operation (can be %NULL)
  339. * @rw: low bit indicates a read (%0) or a write (%1)
  340. *
  341. * A request struct for queue @q has been allocated to handle the
  342. * block IO operation @bio.
  343. */
  344. DEFINE_EVENT(block_get_rq, block_getrq,
  345. TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
  346. TP_ARGS(q, bio, rw)
  347. );
  348. /**
  349. * block_sleeprq - waiting to get a free request entry in queue for block IO operation
  350. * @q: queue for operation
  351. * @bio: pending block IO operation (can be %NULL)
  352. * @rw: low bit indicates a read (%0) or a write (%1)
  353. *
  354. * In the case where a request struct cannot be provided for queue @q
  355. * the process needs to wait for an request struct to become
  356. * available. This tracepoint event is generated each time the
  357. * process goes to sleep waiting for request struct become available.
  358. */
  359. DEFINE_EVENT(block_get_rq, block_sleeprq,
  360. TP_PROTO(struct request_queue *q, struct bio *bio, int rw),
  361. TP_ARGS(q, bio, rw)
  362. );
  363. /**
  364. * block_plug - keep operations requests in request queue
  365. * @q: request queue to plug
  366. *
  367. * Plug the request queue @q. Do not allow block operation requests
  368. * to be sent to the device driver. Instead, accumulate requests in
  369. * the queue to improve throughput performance of the block device.
  370. */
  371. TRACE_EVENT(block_plug,
  372. TP_PROTO(struct request_queue *q),
  373. TP_ARGS(q),
  374. TP_STRUCT__entry(
  375. __array( char, comm, TASK_COMM_LEN )
  376. ),
  377. TP_fast_assign(
  378. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  379. ),
  380. TP_printk("[%s]", __entry->comm)
  381. );
  382. DECLARE_EVENT_CLASS(block_unplug,
  383. TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
  384. TP_ARGS(q, depth, explicit),
  385. TP_STRUCT__entry(
  386. __field( int, nr_rq )
  387. __array( char, comm, TASK_COMM_LEN )
  388. ),
  389. TP_fast_assign(
  390. __entry->nr_rq = depth;
  391. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  392. ),
  393. TP_printk("[%s] %d", __entry->comm, __entry->nr_rq)
  394. );
  395. /**
  396. * block_unplug - release of operations requests in request queue
  397. * @q: request queue to unplug
  398. * @depth: number of requests just added to the queue
  399. * @explicit: whether this was an explicit unplug, or one from schedule()
  400. *
  401. * Unplug request queue @q because device driver is scheduled to work
  402. * on elements in the request queue.
  403. */
  404. DEFINE_EVENT(block_unplug, block_unplug,
  405. TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
  406. TP_ARGS(q, depth, explicit)
  407. );
  408. /**
  409. * block_split - split a single bio struct into two bio structs
  410. * @q: queue containing the bio
  411. * @bio: block operation being split
  412. * @new_sector: The starting sector for the new bio
  413. *
  414. * The bio request @bio in request queue @q needs to be split into two
  415. * bio requests. The newly created @bio request starts at
  416. * @new_sector. This split may be required due to hardware limitation
  417. * such as operation crossing device boundaries in a RAID system.
  418. */
  419. TRACE_EVENT(block_split,
  420. TP_PROTO(struct request_queue *q, struct bio *bio,
  421. unsigned int new_sector),
  422. TP_ARGS(q, bio, new_sector),
  423. TP_STRUCT__entry(
  424. __field( dev_t, dev )
  425. __field( sector_t, sector )
  426. __field( sector_t, new_sector )
  427. __array( char, rwbs, RWBS_LEN )
  428. __array( char, comm, TASK_COMM_LEN )
  429. ),
  430. TP_fast_assign(
  431. __entry->dev = bio_dev(bio);
  432. __entry->sector = bio->bi_iter.bi_sector;
  433. __entry->new_sector = new_sector;
  434. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  435. memcpy(__entry->comm, current->comm, TASK_COMM_LEN);
  436. ),
  437. TP_printk("%d,%d %s %llu / %llu [%s]",
  438. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  439. (unsigned long long)__entry->sector,
  440. (unsigned long long)__entry->new_sector,
  441. __entry->comm)
  442. );
  443. /**
  444. * block_bio_remap - map request for a logical device to the raw device
  445. * @q: queue holding the operation
  446. * @bio: revised operation
  447. * @dev: device for the operation
  448. * @from: original sector for the operation
  449. *
  450. * An operation for a logical device has been mapped to the
  451. * raw block device.
  452. */
  453. TRACE_EVENT(block_bio_remap,
  454. TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev,
  455. sector_t from),
  456. TP_ARGS(q, bio, dev, from),
  457. TP_STRUCT__entry(
  458. __field( dev_t, dev )
  459. __field( sector_t, sector )
  460. __field( unsigned int, nr_sector )
  461. __field( dev_t, old_dev )
  462. __field( sector_t, old_sector )
  463. __array( char, rwbs, RWBS_LEN)
  464. ),
  465. TP_fast_assign(
  466. __entry->dev = bio_dev(bio);
  467. __entry->sector = bio->bi_iter.bi_sector;
  468. __entry->nr_sector = bio_sectors(bio);
  469. __entry->old_dev = dev;
  470. __entry->old_sector = from;
  471. blk_fill_rwbs(__entry->rwbs, bio->bi_opf, bio->bi_iter.bi_size);
  472. ),
  473. TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu",
  474. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  475. (unsigned long long)__entry->sector,
  476. __entry->nr_sector,
  477. MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
  478. (unsigned long long)__entry->old_sector)
  479. );
  480. /**
  481. * block_rq_remap - map request for a block operation request
  482. * @q: queue holding the operation
  483. * @rq: block IO operation request
  484. * @dev: device for the operation
  485. * @from: original sector for the operation
  486. *
  487. * The block operation request @rq in @q has been remapped. The block
  488. * operation request @rq holds the current information and @from hold
  489. * the original sector.
  490. */
  491. TRACE_EVENT(block_rq_remap,
  492. TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev,
  493. sector_t from),
  494. TP_ARGS(q, rq, dev, from),
  495. TP_STRUCT__entry(
  496. __field( dev_t, dev )
  497. __field( sector_t, sector )
  498. __field( unsigned int, nr_sector )
  499. __field( dev_t, old_dev )
  500. __field( sector_t, old_sector )
  501. __field( unsigned int, nr_bios )
  502. __array( char, rwbs, RWBS_LEN)
  503. ),
  504. TP_fast_assign(
  505. __entry->dev = disk_devt(rq->rq_disk);
  506. __entry->sector = blk_rq_pos(rq);
  507. __entry->nr_sector = blk_rq_sectors(rq);
  508. __entry->old_dev = dev;
  509. __entry->old_sector = from;
  510. __entry->nr_bios = blk_rq_count_bios(rq);
  511. blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq));
  512. ),
  513. TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu %u",
  514. MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs,
  515. (unsigned long long)__entry->sector,
  516. __entry->nr_sector,
  517. MAJOR(__entry->old_dev), MINOR(__entry->old_dev),
  518. (unsigned long long)__entry->old_sector, __entry->nr_bios)
  519. );
  520. #endif /* _TRACE_BLOCK_H */
  521. /* This part must be outside protection */
  522. #include <trace/define_trace.h>