diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-14 07:30:17 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-23 23:21:31 -0400 |
commit | f55918fa3202a646dad2404f7de008108edc5048 (patch) | |
tree | 6b39361985ad31ce9511763e504dfdf89e92412b /drivers/target/target_core_iblock.c | |
parent | df5fa691ce61aedd3e4dbcf960ee44f05b797d8b (diff) |
target: clean up the backend interface to caching parameters
Remove the dpo_emulated, fua_write_emulated, fua_read_emulated and
write_cache_emulated methods, and replace them with a simple bitfields in
se_subsystem_api in those cases where they ever returned one.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r-- | drivers/target/target_core_iblock.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index d9ad2a216eaa..41ad02b5fb87 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c | |||
@@ -351,34 +351,6 @@ static void iblock_emulate_sync_cache(struct se_task *task) | |||
351 | submit_bio(WRITE_FLUSH, bio); | 351 | submit_bio(WRITE_FLUSH, bio); |
352 | } | 352 | } |
353 | 353 | ||
354 | /* | ||
355 | * Tell TCM Core that we are capable of WriteCache emulation for | ||
356 | * an underlying struct se_device. | ||
357 | */ | ||
358 | static int iblock_emulated_write_cache(struct se_device *dev) | ||
359 | { | ||
360 | return 1; | ||
361 | } | ||
362 | |||
363 | static int iblock_emulated_dpo(struct se_device *dev) | ||
364 | { | ||
365 | return 0; | ||
366 | } | ||
367 | |||
368 | /* | ||
369 | * Tell TCM Core that we will be emulating Forced Unit Access (FUA) for WRITEs | ||
370 | * for TYPE_DISK. | ||
371 | */ | ||
372 | static int iblock_emulated_fua_write(struct se_device *dev) | ||
373 | { | ||
374 | return 1; | ||
375 | } | ||
376 | |||
377 | static int iblock_emulated_fua_read(struct se_device *dev) | ||
378 | { | ||
379 | return 0; | ||
380 | } | ||
381 | |||
382 | static int iblock_do_discard(struct se_device *dev, sector_t lba, u32 range) | 354 | static int iblock_do_discard(struct se_device *dev, sector_t lba, u32 range) |
383 | { | 355 | { |
384 | struct iblock_dev *ibd = dev->dev_ptr; | 356 | struct iblock_dev *ibd = dev->dev_ptr; |
@@ -679,15 +651,13 @@ static struct se_subsystem_api iblock_template = { | |||
679 | .name = "iblock", | 651 | .name = "iblock", |
680 | .owner = THIS_MODULE, | 652 | .owner = THIS_MODULE, |
681 | .transport_type = TRANSPORT_PLUGIN_VHBA_PDEV, | 653 | .transport_type = TRANSPORT_PLUGIN_VHBA_PDEV, |
654 | .write_cache_emulated = 1, | ||
655 | .fua_write_emulated = 1, | ||
682 | .attach_hba = iblock_attach_hba, | 656 | .attach_hba = iblock_attach_hba, |
683 | .detach_hba = iblock_detach_hba, | 657 | .detach_hba = iblock_detach_hba, |
684 | .allocate_virtdevice = iblock_allocate_virtdevice, | 658 | .allocate_virtdevice = iblock_allocate_virtdevice, |
685 | .create_virtdevice = iblock_create_virtdevice, | 659 | .create_virtdevice = iblock_create_virtdevice, |
686 | .free_device = iblock_free_device, | 660 | .free_device = iblock_free_device, |
687 | .dpo_emulated = iblock_emulated_dpo, | ||
688 | .fua_write_emulated = iblock_emulated_fua_write, | ||
689 | .fua_read_emulated = iblock_emulated_fua_read, | ||
690 | .write_cache_emulated = iblock_emulated_write_cache, | ||
691 | .alloc_task = iblock_alloc_task, | 661 | .alloc_task = iblock_alloc_task, |
692 | .do_task = iblock_do_task, | 662 | .do_task = iblock_do_task, |
693 | .do_discard = iblock_do_discard, | 663 | .do_discard = iblock_do_discard, |