Commit f1c77c55 authored by David Sterba's avatar David Sterba

btrfs: cleanup types storing REQ_*

Unify types of local variables and parameters that store various
REQ_* values to unsigned int.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent abe60ba4
...@@ -2756,7 +2756,8 @@ static int merge_bio(struct extent_io_tree *tree, struct page *page, ...@@ -2756,7 +2756,8 @@ static int merge_bio(struct extent_io_tree *tree, struct page *page,
} }
static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree, static int submit_extent_page(unsigned int op, unsigned int op_flags,
struct extent_io_tree *tree,
struct writeback_control *wbc, struct writeback_control *wbc,
struct page *page, sector_t sector, struct page *page, sector_t sector,
size_t size, unsigned long offset, size_t size, unsigned long offset,
...@@ -2877,7 +2878,7 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -2877,7 +2878,7 @@ static int __do_readpage(struct extent_io_tree *tree,
get_extent_t *get_extent, get_extent_t *get_extent,
struct extent_map **em_cached, struct extent_map **em_cached,
struct bio **bio, int mirror_num, struct bio **bio, int mirror_num,
unsigned long *bio_flags, int read_flags, unsigned long *bio_flags, unsigned int read_flags,
u64 *prev_em_start) u64 *prev_em_start)
{ {
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
...@@ -3163,7 +3164,8 @@ static int __extent_read_full_page(struct extent_io_tree *tree, ...@@ -3163,7 +3164,8 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
struct page *page, struct page *page,
get_extent_t *get_extent, get_extent_t *get_extent,
struct bio **bio, int mirror_num, struct bio **bio, int mirror_num,
unsigned long *bio_flags, int read_flags) unsigned long *bio_flags,
unsigned int read_flags)
{ {
struct inode *inode = page->mapping->host; struct inode *inode = page->mapping->host;
struct btrfs_ordered_extent *ordered; struct btrfs_ordered_extent *ordered;
...@@ -3310,7 +3312,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode, ...@@ -3310,7 +3312,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
struct extent_page_data *epd, struct extent_page_data *epd,
loff_t i_size, loff_t i_size,
unsigned long nr_written, unsigned long nr_written,
int write_flags, int *nr_ret) unsigned int write_flags, int *nr_ret)
{ {
struct extent_io_tree *tree = epd->tree; struct extent_io_tree *tree = epd->tree;
u64 start = page_offset(page); u64 start = page_offset(page);
...@@ -3464,7 +3466,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -3464,7 +3466,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
size_t pg_offset = 0; size_t pg_offset = 0;
loff_t i_size = i_size_read(inode); loff_t i_size = i_size_read(inode);
unsigned long end_index = i_size >> PAGE_SHIFT; unsigned long end_index = i_size >> PAGE_SHIFT;
int write_flags = 0; unsigned int write_flags = 0;
unsigned long nr_written = 0; unsigned long nr_written = 0;
if (wbc->sync_mode == WB_SYNC_ALL) if (wbc->sync_mode == WB_SYNC_ALL)
...@@ -3714,7 +3716,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb, ...@@ -3714,7 +3716,7 @@ static noinline_for_stack int write_one_eb(struct extent_buffer *eb,
unsigned long i, num_pages; unsigned long i, num_pages;
unsigned long bio_flags = 0; unsigned long bio_flags = 0;
unsigned long start, end; unsigned long start, end;
int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META; unsigned int write_flags = (epd->sync_io ? REQ_SYNC : 0) | REQ_META;
int ret = 0; int ret = 0;
clear_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags); clear_bit(EXTENT_BUFFER_WRITE_ERR, &eb->bflags);
......
...@@ -8019,7 +8019,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio, ...@@ -8019,7 +8019,7 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree; struct extent_io_tree *failure_tree = &BTRFS_I(inode)->io_failure_tree;
struct bio *bio; struct bio *bio;
int isector; int isector;
int read_mode = 0; unsigned int read_mode = 0;
int segs; int segs;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment