aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bufio.c
Commit message (Collapse)AuthorAge
* dm: use ACCESS_ONCE for sysfs valuesMikulas Patocka2012-10-12
| | | | | | | | | | Use the ACCESS_ONCE macro in dm-bufio and dm-verity where a variable can be modified asynchronously (through sysfs) and we want to prevent compiler optimizations that assume that the variable hasn't changed. (See Documentation/atomic_ops.txt.) Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
* dm bufio: use list_moveWei Yongjun2012-10-12
| | | | | | | | | | Use list_move() instead of list_del() + list_add(). spatch with a semantic match was used to find this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
* dm bufio: prefetchMikulas Patocka2012-03-28
| | | | | | | | | This patch introduces a new function dm_bufio_prefetch. It prefetches the specified range of blocks into dm-bufio cache without waiting for i/o completion. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
* dm-bufio.c: there's no need to include linux/version.hJesper Juhl2012-02-03
| | | | | | | | | As 'make versioncheck' points out, drivers/md/dm-bufio.c has no need to include linux/version.h, so this patch removes the unneeded include. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* device-mapper: dm-bufio.c needs to include module.hStephen Rothwell2011-11-07
| | | | | | | | | since it uses the module facilities. Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dm: add bufioMikulas Patocka2011-10-31
The dm-bufio interface allows you to do cached I/O on devices, holding recently-read blocks in memory and performing delayed writes. We don't use buffer cache or page cache already present in the kernel, because: * we need to handle block sizes larger than a page * we can't allocate memory to perform reads or we'd have deadlocks Currently, when a cache is required, we limit its size to a fraction of available memory. Usage can be viewed and changed in /sys/module/dm_bufio/parameters/ . The first user is thin provisioning, but more dm users are planned. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>