volumes.c (9134d02bc0af4a8747d448d1f811ec5f8eb96df6) volumes.c (1f98a13f623e0ef666690a18c1250335fc6d7ef1)
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 246 unchanged lines hidden (view full) ---

255 waitqueue_active(&fs_info->async_submit_wait))
256 wake_up(&fs_info->async_submit_wait);
257
258 BUG_ON(atomic_read(&cur->bi_cnt) == 0);
259 submit_bio(cur->bi_rw, cur);
260 num_run++;
261 batch_run++;
262
1/*
2 * Copyright (C) 2007 Oracle. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 246 unchanged lines hidden (view full) ---

255 waitqueue_active(&fs_info->async_submit_wait))
256 wake_up(&fs_info->async_submit_wait);
257
258 BUG_ON(atomic_read(&cur->bi_cnt) == 0);
259 submit_bio(cur->bi_rw, cur);
260 num_run++;
261 batch_run++;
262
263 if (bio_sync(cur))
263 if (bio_rw_flagged(cur, BIO_RW_SYNCIO))
264 num_sync_run++;
265
266 if (need_resched()) {
267 if (num_sync_run) {
268 blk_run_backing_dev(bdi, NULL);
269 num_sync_run = 0;
270 }
271 cond_resched();

--- 2626 unchanged lines hidden (view full) ---

2898 * on a queue for later
2899 */
2900 atomic_inc(&root->fs_info->nr_async_bios);
2901 WARN_ON(bio->bi_next);
2902 bio->bi_next = NULL;
2903 bio->bi_rw |= rw;
2904
2905 spin_lock(&device->io_lock);
264 num_sync_run++;
265
266 if (need_resched()) {
267 if (num_sync_run) {
268 blk_run_backing_dev(bdi, NULL);
269 num_sync_run = 0;
270 }
271 cond_resched();

--- 2626 unchanged lines hidden (view full) ---

2898 * on a queue for later
2899 */
2900 atomic_inc(&root->fs_info->nr_async_bios);
2901 WARN_ON(bio->bi_next);
2902 bio->bi_next = NULL;
2903 bio->bi_rw |= rw;
2904
2905 spin_lock(&device->io_lock);
2906 if (bio_sync(bio))
2906 if (bio_rw_flagged(bio, BIO_RW_SYNCIO))
2907 pending_bios = &device->pending_sync_bios;
2908 else
2909 pending_bios = &device->pending_bios;
2910
2911 if (pending_bios->tail)
2912 pending_bios->tail->bi_next = bio;
2913
2914 pending_bios->tail = bio;

--- 464 unchanged lines hidden ---
2907 pending_bios = &device->pending_sync_bios;
2908 else
2909 pending_bios = &device->pending_bios;
2910
2911 if (pending_bios->tail)
2912 pending_bios->tail->bi_next = bio;
2913
2914 pending_bios->tail = bio;

--- 464 unchanged lines hidden ---