Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363499
| From | Jens Axboe <axboe@fb.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/8] sd: inform block layer of write cache state |
| Date | 2016-03-23 16:30 +0100 |
| Message-ID | <rfSTo-5lq-27@gated-at.bofh.it> (permalink) |
| References | <rfSTn-5lq-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Jens Axboe <axboe@fb.com> --- drivers/scsi/sd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5a5457ac9cdb..049f424fb4ad 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -192,6 +192,7 @@ cache_type_store(struct device *dev, struct device_attribute *attr, sdkp->WCE = wce; sdkp->RCD = rcd; sd_set_flush_flag(sdkp); + blk_queue_write_cache(sdp->request_queue, wce != 0); return count; } @@ -2571,7 +2572,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer) sdkp->DPOFUA ? "supports DPO and FUA" : "doesn't support DPO or FUA"); - return; + goto done; } bad_sense: @@ -2596,6 +2597,8 @@ defaults: } sdkp->RCD = 0; sdkp->DPOFUA = 0; +done: + blk_queue_write_cache(sdp->request_queue, sdkp->WCE != 0); } /* -- 2.4.1.168.g1ea28e1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
(none) Jens Axboe <axboe@fb.com> - 2016-03-23 16:30 +0100
[PATCH 8/8] writeback: throttle buffered writeback Jens Axboe <axboe@fb.com> - 2016-03-23 16:30 +0100
[PATCH 6/8] sd: inform block layer of write cache state Jens Axboe <axboe@fb.com> - 2016-03-23 16:30 +0100
[PATCH 3/8] writeback: use WRITE_SYNC for reclaim or sync writeback Jens Axboe <axboe@fb.com> - 2016-03-23 16:30 +0100
[PATCHSET v2][RFC] Make background writeback not suck Jens Axboe <axboe@fb.com> - 2016-03-23 16:40 +0100
Re: [PATCHSET v2][RFC] Make background writeback not suck Jens Axboe <axboe@fb.com> - 2016-03-24 18:50 +0100
csiph-web