page.h (bc030d6cb9532877c1c5a3f5e7123344fa24a285) page.h (622daaff0a8975fb5c5b95f24f3234550ba32e92)
1/*
2 * page.h - 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

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

61int nilfs_copy_dirty_pages(struct address_space *, struct address_space *);
62void nilfs_copy_back_pages(struct address_space *, struct address_space *);
63void nilfs_clear_dirty_pages(struct address_space *);
64void nilfs_mapping_init_once(struct address_space *mapping);
65void nilfs_mapping_init(struct address_space *mapping,
66 struct backing_dev_info *bdi,
67 const struct address_space_operations *aops);
68unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned);
1/*
2 * page.h - 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

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

61int nilfs_copy_dirty_pages(struct address_space *, struct address_space *);
62void nilfs_copy_back_pages(struct address_space *, struct address_space *);
63void nilfs_clear_dirty_pages(struct address_space *);
64void nilfs_mapping_init_once(struct address_space *mapping);
65void nilfs_mapping_init(struct address_space *mapping,
66 struct backing_dev_info *bdi,
67 const struct address_space_operations *aops);
68unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned);
69unsigned long nilfs_find_uncommitted_extent(struct inode *inode,
70 sector_t start_blk,
71 sector_t *blkoff);
69
70#define NILFS_PAGE_BUG(page, m, a...) \
71 do { nilfs_page_bug(page); BUG(); } while (0)
72
73static inline struct buffer_head *
74nilfs_page_get_nth_block(struct page *page, unsigned int count)
75{
76 struct buffer_head *bh = page_buffers(page);
77
78 while (count-- > 0)
79 bh = bh->b_this_page;
80 get_bh(bh);
81 return bh;
82}
83
84#endif /* _NILFS_PAGE_H */
72
73#define NILFS_PAGE_BUG(page, m, a...) \
74 do { nilfs_page_bug(page); BUG(); } while (0)
75
76static inline struct buffer_head *
77nilfs_page_get_nth_block(struct page *page, unsigned int count)
78{
79 struct buffer_head *bh = page_buffers(page);
80
81 while (count-- > 0)
82 bh = bh->b_this_page;
83 get_bh(bh);
84 return bh;
85}
86
87#endif /* _NILFS_PAGE_H */