1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Buffer/page management specific to NILFS
5 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation.
7 * Written by Ryusuke Konishi and Seiji Kihara.
13 #include <linux/buffer_head.h>
17 * Extended buffer state bits
20 BH_NILFS_Allocated = BH_PrivateStart,
27 BUFFER_FNS(NILFS_Node, nilfs_node) /* nilfs node buffers */
28 BUFFER_FNS(NILFS_Volatile, nilfs_volatile)
29 BUFFER_FNS(NILFS_Checked, nilfs_checked) /* buffer is verified */
30 BUFFER_FNS(NILFS_Redirected, nilfs_redirected) /* redirected to a copy */
33 void __nilfs_clear_folio_dirty(struct folio *);
35 struct buffer_head *nilfs_grab_buffer(struct inode *, struct address_space *,
36 unsigned long, unsigned long);
37 void nilfs_forget_buffer(struct buffer_head *);
38 void nilfs_copy_buffer(struct buffer_head *, struct buffer_head *);
39 bool nilfs_folio_buffers_clean(struct folio *);
40 void nilfs_folio_bug(struct folio *);
42 int nilfs_copy_dirty_pages(struct address_space *, struct address_space *);
43 void nilfs_copy_back_pages(struct address_space *, struct address_space *);
44 void nilfs_clear_folio_dirty(struct folio *, bool);
45 void nilfs_clear_dirty_pages(struct address_space *, bool);
46 unsigned int nilfs_page_count_clean_buffers(struct page *, unsigned int,
48 unsigned long nilfs_find_uncommitted_extent(struct inode *inode,
52 #define NILFS_FOLIO_BUG(folio, m, a...) \
53 do { nilfs_folio_bug(folio); BUG(); } while (0)
55 #endif /* _NILFS_PAGE_H */