diff options
author | Christoph Hellwig <hch@lst.de> | 2018-07-24 15:04:12 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-07-24 23:39:27 +0300 |
commit | 24d5493f207ce0ce38df80ce86c907417e04594a (patch) | |
tree | 5b4239636db01bf3f2a173ae4f32228afc8ce873 /init/noinitramfs.c | |
parent | 76f17d8ba1cbc3d2786955b2f15e071da93527cd (diff) | |
download | linux-24d5493f207ce0ce38df80ce86c907417e04594a.tar.xz |
block: simplify bio_check_pages_dirty
bio_check_pages_dirty currently inviolates the invariant that bv_page of
a bio_vec inside bi_vcnt shouldn't be zero, and that is going to become
really annoying with multpath biovecs. Fortunately there isn't any
all that good reason for it - once we decide to defer freeing the bio
to a workqueue holding onto a few additional pages isn't really an
issue anymore. So just check if there is a clean page that needs
dirtying in the first path, and do a second pass to free them if there
was none, while the cache is still hot.
Also use the chance to micro-optimize bio_dirty_fn a bit by not saving
irq state - we know we are called from a workqueue.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'init/noinitramfs.c')
0 files changed, 0 insertions, 0 deletions