aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2014-04-01 18:24:18 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-07-10 12:35:22 -0400
commit193cb00ce377fd672526b5ad065c4de52f429ea1 (patch)
tree64c946517263e933ab772c9b18fc5dcdae1c19bb /drivers/block/drbd
parentf5b90b6bf0cf29a85ceaa8ce334b17814cd5d39b (diff)
drbd: drop spurious parameters from _drbd_md_sync_page_io
size is always 4096, page is always device->md_io.page. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_actlog.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index e9fbcafaccdc..d26a3fa63688 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -137,10 +137,11 @@ void wait_until_done_or_force_detached(struct drbd_device *device, struct drbd_b
137 137
138static int _drbd_md_sync_page_io(struct drbd_device *device, 138static int _drbd_md_sync_page_io(struct drbd_device *device,
139 struct drbd_backing_dev *bdev, 139 struct drbd_backing_dev *bdev,
140 struct page *page, sector_t sector, 140 sector_t sector, int rw)
141 int rw, int size)
142{ 141{
143 struct bio *bio; 142 struct bio *bio;
143 /* we do all our meta data IO in aligned 4k blocks. */
144 const int size = 4096;
144 int err; 145 int err;
145 146
146 device->md_io.done = 0; 147 device->md_io.done = 0;
@@ -154,7 +155,7 @@ static int _drbd_md_sync_page_io(struct drbd_device *device,
154 bio->bi_bdev = bdev->md_bdev; 155 bio->bi_bdev = bdev->md_bdev;
155 bio->bi_iter.bi_sector = sector; 156 bio->bi_iter.bi_sector = sector;
156 err = -EIO; 157 err = -EIO;
157 if (bio_add_page(bio, page, size, 0) != size) 158 if (bio_add_page(bio, device->md_io.page, size, 0) != size)
158 goto out; 159 goto out;
159 bio->bi_private = device; 160 bio->bi_private = device;
160 bio->bi_end_io = drbd_md_io_complete; 161 bio->bi_end_io = drbd_md_io_complete;
@@ -190,8 +191,6 @@ int drbd_md_sync_page_io(struct drbd_device *device, struct drbd_backing_dev *bd
190 sector_t sector, int rw) 191 sector_t sector, int rw)
191{ 192{
192 int err; 193 int err;
193 struct page *iop = device->md_io.page;
194
195 D_ASSERT(device, atomic_read(&device->md_io.in_use) == 1); 194 D_ASSERT(device, atomic_read(&device->md_io.in_use) == 1);
196 195
197 BUG_ON(!bdev->md_bdev); 196 BUG_ON(!bdev->md_bdev);
@@ -207,8 +206,7 @@ int drbd_md_sync_page_io(struct drbd_device *device, struct drbd_backing_dev *bd
207 current->comm, current->pid, __func__, 206 current->comm, current->pid, __func__,
208 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ"); 207 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ");
209 208
210 /* we do all our meta data IO in aligned 4k blocks. */ 209 err = _drbd_md_sync_page_io(device, bdev, sector, rw);
211 err = _drbd_md_sync_page_io(device, bdev, iop, sector, rw, 4096);
212 if (err) { 210 if (err) {
213 drbd_err(device, "drbd_md_sync_page_io(,%llus,%s) failed with error %d\n", 211 drbd_err(device, "drbd_md_sync_page_io(,%llus,%s) failed with error %d\n",
214 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ", err); 212 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ", err);