From 59d43914ed7b96255271ad6b7b735344beffa3c0 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 9 Oct 2014 15:26:53 -0700 Subject: [PATCH] vfs: make guard_bh_eod() more generic This patchset implements readpages() operation for block device by using mpage_readpages() which can create multipage BIOs instead of BIOs for each page and reduce system CPU time consumption. This patch (of 3): guard_bh_eod() is used in submit_bh() to allow us to do IO even on the odd last sectors of a device, even if the block size is some multiple of the physical sector size. This makes guard_bh_eod() more generic and renames it guard_bio_eod() so that we can use it without struct buffer_head argument. The reason for this change is that using mpage_readpages() for block device requires to add this guard check in mpage code. Signed-off-by: Akinobu Mita Cc: Jens Axboe Cc: Alexander Viro Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed