page.c (7eef4091a653c243a87e5375c54504cc03bec4d8) page.c (7a65004bbaa6a21a0438aac9c64814e46084dc3f)
1/*
2 * page.c - buffer/page management specific to NILFS
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

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

287}
288
289/**
290 * nilfs_copy_page -- copy the page with buffers
291 * @dst: destination page
292 * @src: source page
293 * @copy_dirty: flag whether to copy dirty states on the page's buffer heads.
294 *
1/*
2 * page.c - buffer/page management specific to NILFS
3 *
4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or

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

287}
288
289/**
290 * nilfs_copy_page -- copy the page with buffers
291 * @dst: destination page
292 * @src: source page
293 * @copy_dirty: flag whether to copy dirty states on the page's buffer heads.
294 *
295 * This fuction is for both data pages and btnode pages. The dirty flag
295 * This function is for both data pages and btnode pages. The dirty flag
296 * should be treated by caller. The page must not be under i/o.
297 * Both src and dst page must be locked
298 */
299static void nilfs_copy_page(struct page *dst, struct page *src, int copy_dirty)
300{
301 struct buffer_head *dbh, *dbufs, *sbh, *sbufs;
302 unsigned long mask = NILFS_BUFFER_INHERENT_BITS;
303

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

383 cond_resched();
384
385 if (likely(!err))
386 goto repeat;
387 return err;
388}
389
390/**
296 * should be treated by caller. The page must not be under i/o.
297 * Both src and dst page must be locked
298 */
299static void nilfs_copy_page(struct page *dst, struct page *src, int copy_dirty)
300{
301 struct buffer_head *dbh, *dbufs, *sbh, *sbufs;
302 unsigned long mask = NILFS_BUFFER_INHERENT_BITS;
303

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

383 cond_resched();
384
385 if (likely(!err))
386 goto repeat;
387 return err;
388}
389
390/**
391 * nilfs_copy_back_pages -- copy back pages to orignal cache from shadow cache
391 * nilfs_copy_back_pages -- copy back pages to original cache from shadow cache
392 * @dmap: destination page cache
393 * @smap: source page cache
394 *
395 * No pages must no be added to the cache during this process.
396 * This must be ensured by the caller.
397 */
398void nilfs_copy_back_pages(struct address_space *dmap,
399 struct address_space *smap)

--- 142 unchanged lines hidden ---
392 * @dmap: destination page cache
393 * @smap: source page cache
394 *
395 * No pages must no be added to the cache during this process.
396 * This must be ensured by the caller.
397 */
398void nilfs_copy_back_pages(struct address_space *dmap,
399 struct address_space *smap)

--- 142 unchanged lines hidden ---