]> git.baikalelectronics.ru Git - kernel.git/commit
sd: notify block layer when using temporary change to cache_type
authorVaughan Cao <vaughan.cao@oracle.com>
Tue, 3 Jun 2014 09:37:30 +0000 (17:37 +0800)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jul 2014 20:07:31 +0000 (22:07 +0200)
commit4556eab4c9c49542e34b54c11e261af10512a624
treebe186c470b27cfa9af56d464423cb3655bdacf1a
parentfa8baf3229c34bb41107e1998e0f5758f31a5134
sd: notify block layer when using temporary change to cache_type

This is a fix for commit c6cd57e6a3136bc88b70c3a1482ca2eef553d552

  "sd: fix array cache flushing bug causing performance problems"

We must notify the block layer via q->flush_flags after a temporary change
of the cache_type to write through.  Without this, a SYNCHRONIZE CACHE
command will still be generated.  This patch factors out a helper that
can be called from sd_revalidate_disk and cache_type_store.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/sd.c