Btrfs: cleanup extent_clear_unlock_delalloc flags

extent_clear_unlock_delalloc has a growing set of ugly parameters
that is very difficult to read and maintain.

This switches to a flag field and well named flag defines.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2009-10-08 11:27:10 -04:00
parent 1cdda9b81a
commit a791e35e12
3 changed files with 51 additions and 37 deletions

View File

@@ -25,6 +25,15 @@
#define EXTENT_BUFFER_BLOCKING 1
#define EXTENT_BUFFER_DIRTY 2
/* these are flags for extent_clear_unlock_delalloc */
#define EXTENT_CLEAR_UNLOCK_PAGE 0x1
#define EXTENT_CLEAR_UNLOCK 0x2
#define EXTENT_CLEAR_DELALLOC 0x4
#define EXTENT_CLEAR_DIRTY 0x8
#define EXTENT_SET_WRITEBACK 0x10
#define EXTENT_END_WRITEBACK 0x20
#define EXTENT_SET_PRIVATE2 0x40
/*
* page->private values. Every page that is controlled by the extent
* map has page->private set to one.
@@ -288,10 +297,5 @@ int extent_range_uptodate(struct extent_io_tree *tree,
int extent_clear_unlock_delalloc(struct inode *inode,
struct extent_io_tree *tree,
u64 start, u64 end, struct page *locked_page,
int unlock_page,
int clear_unlock,
int clear_delalloc, int clear_dirty,
int set_writeback,
int end_writeback,
int set_private2);
unsigned long op);
#endif