linux/drivers/block
Shaohua Li deb78b419d nullb: emulate cache
Software must flush disk cache to guarantee data safety. To check if
software correctly does disk cache flush, we must know the behavior of
disk. But physical disk behavior is uncontrollable. Even software
doesn't do the flush, the disk probably does the flush. This patch tries
to emulate a cache in the test disk.

All write will go to a cache first, when the cache is full, we then
flush some data to disk storage. A flush request will flush all data of
the cache to disk storage. A FUA write will write to memory store
directly and revalidate data in cache. If there is a power failure (by
writing to power attribute, 'echo 0 > disk_name/power'), we discard all
data in the cache, but preserve the data in disk storage. Later we can
power on the disk again as usual (write 1 to 'power' attribute), then we
can check data integrity and very if software does everything correctly.

A new attribute 'cache_size' (in MB) is added to configure cache size.

Based on original patch from Kyungchan Koh

Signed-off-by: Kyungchan Koh <kkc6196@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2017-08-23 08:54:11 -06:00
..
aoe block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
drbd block: pass in queue to inflight accounting 2017-08-09 13:09:16 -06:00
mtip32xx Merge branch 'nvme-4.13' of git://git.infradead.org/nvme into for-linus 2017-07-10 11:44:34 -06:00
paride block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
rsxx block: pass in queue to inflight accounting 2017-08-09 13:09:16 -06:00
xen-blkback xen-blkback: Avoid that gcc 7 warns about fall-through when building with W=1 2017-08-18 08:36:58 -06:00
zram block: pass in queue to inflight accounting 2017-08-09 13:09:16 -06:00
DAC960.c block: DAC960: shut up format-overflow warning 2017-07-29 09:00:03 -06:00
DAC960.h
Kconfig nullb: add configfs interface 2017-08-23 08:54:02 -06:00
Makefile block: remove the osdblk driver 2017-04-19 09:10:51 -06:00
amiflop.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ataflop.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
brd.c ARM: fix rd_size declaration 2017-07-10 16:32:34 -07:00
cciss.c cciss: initialize struct scsi_req 2017-07-06 12:23:51 -06:00
cciss.h SCSI misc on 20170220 2017-02-21 11:51:42 -08:00
cciss_cmd.h
cciss_scsi.c cciss: Remove kmalloc cast 2017-02-22 11:54:49 -07:00
cciss_scsi.h
cryptoloop.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
floppy.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-06 20:57:13 -07:00
loop.c loop: fix to a race condition due to the early registration of device 2017-08-15 12:49:20 -06:00
loop.h loop: support 4k physical blocksize 2017-06-08 08:40:00 -06:00
nbd.c nbd: change the default nbd partitions 2017-08-17 11:02:59 -06:00
null_blk.c nullb: emulate cache 2017-08-23 08:54:11 -06:00
pktcdvd.c driver core patches for 4.13-rc1 2017-07-03 20:27:48 -07:00
ps3disk.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
ps3vram.c blk: remove bio_set arg from blk_queue_split() 2017-06-18 12:40:59 -06:00
rbd.c rbd: use bio_clone_fast() instead of bio_clone() 2017-06-18 12:40:59 -06:00
rbd_types.h rbd: RBD_V{1,2}_DATA_FORMAT macros 2017-02-20 12:16:15 +01:00
skd_main.c skd: error pointer dereference in skd_cons_disk() 2017-08-23 08:36:45 -06:00
skd_s1120.h skd: Use __packed only when needed 2017-08-18 08:45:29 -06:00
smart1,2.h
sunvdc.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
swim.c block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
swim3.c block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
swim_asm.S
sx8.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00
umem.c blk: remove bio_set arg from blk_queue_split() 2017-06-18 12:40:59 -06:00
umem.h
virtio_blk.c virtio_blk: Use blk_rq_is_scsi() 2017-08-18 08:36:58 -06:00
xen-blkfront.c xen-blkfront: Avoid that gcc 7 warns about fall-through when building with W=1 2017-08-18 08:36:58 -06:00
xsysace.c block: don't set bounce limit in blk_init_queue 2017-06-27 12:13:45 -06:00
z2ram.c block: introduce new block status code type 2017-06-09 09:27:32 -06:00