buffer.c (3d67f2d7c0fb28b0eb6a6aa100b190526a971ad9) buffer.c (f98393a64ca1392130724c3acb4e3f325801d2b6)
1/*
2 * linux/fs/buffer.c
3 *
4 * Copyright (C) 1991, 1992, 2002 Linus Torvalds
5 */
6
7/*
8 * Start bdflush() with kernel_thread not syscall - Paul Gortmaker, 12/95

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

328
329 For handling cache coherency with the blkdev pagecache the 'update' case
330 is been introduced. It is needed to re-read from disk any pinned
331 buffer. NOTE: re-reading from disk is destructive so we can do it only
332 when we assume nobody is changing the buffercache under our I/O and when
333 we think the disk contains more recent information than the buffercache.
334 The update == 1 pass marks the buffers we need to update, the update == 2
335 pass does the actual I/O. */
1/*
2 * linux/fs/buffer.c
3 *
4 * Copyright (C) 1991, 1992, 2002 Linus Torvalds
5 */
6
7/*
8 * Start bdflush() with kernel_thread not syscall - Paul Gortmaker, 12/95

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

328
329 For handling cache coherency with the blkdev pagecache the 'update' case
330 is been introduced. It is needed to re-read from disk any pinned
331 buffer. NOTE: re-reading from disk is destructive so we can do it only
332 when we assume nobody is changing the buffercache under our I/O and when
333 we think the disk contains more recent information than the buffercache.
334 The update == 1 pass marks the buffers we need to update, the update == 2
335 pass does the actual I/O. */
336void invalidate_bdev(struct block_device *bdev, int destroy_dirty_buffers)
336void invalidate_bdev(struct block_device *bdev)
337{
338 struct address_space *mapping = bdev->bd_inode->i_mapping;
339
340 if (mapping->nrpages == 0)
341 return;
342
343 invalidate_bh_lrus();
337{
338 struct address_space *mapping = bdev->bd_inode->i_mapping;
339
340 if (mapping->nrpages == 0)
341 return;
342
343 invalidate_bh_lrus();
344 /*
345 * FIXME: what about destroy_dirty_buffers?
346 * We really want to use invalidate_inode_pages2() for
347 * that, but not until that's cleaned up.
348 */
349 invalidate_mapping_pages(mapping, 0, -1);
350}
351
352/*
353 * Kick pdflush then try to free up some ZONE_NORMAL memory.
354 */
355static void free_more_memory(void)
356{

--- 2680 unchanged lines hidden ---
344 invalidate_mapping_pages(mapping, 0, -1);
345}
346
347/*
348 * Kick pdflush then try to free up some ZONE_NORMAL memory.
349 */
350static void free_more_memory(void)
351{

--- 2680 unchanged lines hidden ---