+10
-3
fs/fs-writeback.c
+10
-3
fs/fs-writeback.c
···
1380
1380
* Write a portion of b_io inodes which belong to @sb.
1381
1381
*
1382
1382
* Return the number of pages and/or inodes written.
1383
+
*
1384
+
* NOTE! This is called with wb->list_lock held, and will
1385
+
* unlock and relock that for each inode it ends up doing
1386
+
* IO for.
1383
1387
*/
1384
1388
static long writeback_sb_inodes(struct super_block *sb,
1385
1389
struct bdi_writeback *wb,
···
1402
1398
unsigned long start_time = jiffies;
1403
1399
long write_chunk;
1404
1400
long wrote = 0; /* count both pages and inodes */
1405
-
struct blk_plug plug;
1406
1401
1407
-
blk_start_plug(&plug);
1408
1402
while (!list_empty(&wb->b_io)) {
1409
1403
struct inode *inode = wb_inode(wb->b_io.prev);
1410
1404
···
1500
1498
break;
1501
1499
}
1502
1500
}
1503
-
blk_finish_plug(&plug);
1504
1501
return wrote;
1505
1502
}
1506
1503
···
1546
1545
.range_cyclic = 1,
1547
1546
.reason = reason,
1548
1547
};
1548
+
struct blk_plug plug;
1549
1549
1550
+
blk_start_plug(&plug);
1550
1551
spin_lock(&wb->list_lock);
1551
1552
if (list_empty(&wb->b_io))
1552
1553
queue_io(wb, &work);
1553
1554
__writeback_inodes_wb(wb, &work);
1554
1555
spin_unlock(&wb->list_lock);
1556
+
blk_finish_plug(&plug);
1555
1557
1556
1558
return nr_pages - work.nr_pages;
1557
1559
}
···
1582
1578
unsigned long oldest_jif;
1583
1579
struct inode *inode;
1584
1580
long progress;
1581
+
struct blk_plug plug;
1585
1582
1586
1583
oldest_jif = jiffies;
1587
1584
work->older_than_this = &oldest_jif;
1588
1585
1586
+
blk_start_plug(&plug);
1589
1587
spin_lock(&wb->list_lock);
1590
1588
for (;;) {
1591
1589
/*
···
1667
1661
}
1668
1662
}
1669
1663
spin_unlock(&wb->list_lock);
1664
+
blk_finish_plug(&plug);
1670
1665
1671
1666
return nr_pages - work->nr_pages;
1672
1667
}