Repository navigation
Commit d0c8b25
Nicholas Bellinger
target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status
This patch allows IBLOCK to check block hints in request_queue->flush_flags
when reporting current backend device WriteCacheEnabled status to a remote
SCSI initiator port.
This is done via a se_subsystem_api->get_write_cache() call instead of a
backend se_device creation time flag, as we expect REQ_FLUSH bits to possibly
change from an underlying blk_queue_flush() by the SCSI disk driver, or
internal raw struct block_device driver usage.
Also go ahead and update iblock_execute_rw() bio I/O path code to use
REQ_FLUSH + REQ_FUA hints when determining WRITE_FUA usage, and make SPC
emulation code use a spc_check_dev_wce() helper to handle both types of
cases for virtual backend subsystem drivers.
(asias: Drop unnecessary comparsion operators)
Reported-by: majianpeng <majianpeng@gmail.com>
Cc: majianpeng <majianpeng@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>1 parent 1be2956 commit d0c8b25
4 files changed
Lines changed: 48 additions & 11 deletions
File tree
- drivers/target
- include/target
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
775 | 781 | | |
776 | 782 | | |
777 | 783 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| |||
654 | 655 | | |
655 | 656 | | |
656 | 657 | | |
657 | | - | |
| 658 | + | |
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
| 662 | + | |
| 663 | + | |
661 | 664 | | |
662 | | - | |
663 | | - | |
| 665 | + | |
| 666 | + | |
664 | 667 | | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
670 | 674 | | |
| 675 | + | |
671 | 676 | | |
672 | 677 | | |
673 | 678 | | |
| |||
774 | 779 | | |
775 | 780 | | |
776 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
777 | 791 | | |
778 | 792 | | |
779 | 793 | | |
| |||
790 | 804 | | |
791 | 805 | | |
792 | 806 | | |
| 807 | + | |
793 | 808 | | |
794 | 809 | | |
795 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
410 | 423 | | |
411 | 424 | | |
412 | 425 | | |
413 | 426 | | |
| 427 | + | |
| 428 | + | |
414 | 429 | | |
415 | 430 | | |
416 | 431 | | |
417 | 432 | | |
418 | 433 | | |
419 | | - | |
| 434 | + | |
420 | 435 | | |
421 | 436 | | |
422 | 437 | | |
| |||
766 | 781 | | |
767 | 782 | | |
768 | 783 | | |
769 | | - | |
| 784 | + | |
770 | 785 | | |
771 | 786 | | |
772 | 787 | | |
| |||
878 | 893 | | |
879 | 894 | | |
880 | 895 | | |
881 | | - | |
| 896 | + | |
882 | 897 | | |
883 | 898 | | |
884 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments