]> git.baikalelectronics.ru Git - kernel.git/commit
block: use blkdev_issue_discard in blk_ioctl_discard
authorChristoph Hellwig <hch@infradead.org>
Sat, 12 Sep 2009 05:35:43 +0000 (07:35 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 14 Sep 2009 06:24:53 +0000 (08:24 +0200)
commitbe3fa19e3bbe1903fc389c8438b7f50e14a8c4ef
treed129194669e0122113a5cc86003a4a7711450284
parent3970a9a21019d12dded2b366bec5858691361825
block: use blkdev_issue_discard in blk_ioctl_discard

blk_ioctl_discard duplicates large amounts of code from blkdev_issue_discard,
the only difference between the two is that blkdev_issue_discard needs to
send a barrier discard request and blk_ioctl_discard a non-barrier one,
and blk_ioctl_discard needs to wait on the request.  To facilitates this
add a flags argument to blkdev_issue_discard to control both aspects of the
behaviour.  This will be very useful later on for using the waiting
funcitonality for other callers.

Based on an earlier patch from Matthew Wilcox <matthew@wil.cx>.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/blk-barrier.c
block/ioctl.c
fs/btrfs/extent-tree.c
fs/gfs2/rgrp.c
include/linux/blkdev.h
mm/swapfile.c