Commit 6296b960 authored by Mike Christie's avatar Mike Christie Committed by Jens Axboe

block, drivers, fs: shrink bi_rw from long to int

We don't need bi_rw to be so large on 64 bit archs, so
reduce it to unsigned int.
Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 43b62ce3
...@@ -1853,7 +1853,7 @@ static void handle_bad_sector(struct bio *bio) ...@@ -1853,7 +1853,7 @@ static void handle_bad_sector(struct bio *bio)
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
printk(KERN_INFO "attempt to access beyond end of device\n"); printk(KERN_INFO "attempt to access beyond end of device\n");
printk(KERN_INFO "%s: rw=%ld, want=%Lu, limit=%Lu\n", printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
bdevname(bio->bi_bdev, b), bdevname(bio->bi_bdev, b),
bio->bi_rw, bio->bi_rw,
(unsigned long long)bio_end_sector(bio), (unsigned long long)bio_end_sector(bio),
......
...@@ -266,7 +266,7 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc) ...@@ -266,7 +266,7 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
data[fc->corrupt_bio_byte - 1] = fc->corrupt_bio_value; data[fc->corrupt_bio_byte - 1] = fc->corrupt_bio_value;
DMDEBUG("Corrupting data bio=%p by writing %u to byte %u " DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
"(rw=%c bi_rw=%lu bi_sector=%llu cur_bytes=%u)\n", "(rw=%c bi_rw=%u bi_sector=%llu cur_bytes=%u)\n",
bio, fc->corrupt_bio_value, fc->corrupt_bio_byte, bio, fc->corrupt_bio_value, fc->corrupt_bio_byte,
(bio_data_dir(bio) == WRITE) ? 'w' : 'r', bio->bi_rw, (bio_data_dir(bio) == WRITE) ? 'w' : 'r', bio->bi_rw,
(unsigned long long)bio->bi_iter.bi_sector, bio_bytes); (unsigned long long)bio->bi_iter.bi_sector, bio_bytes);
......
...@@ -1001,7 +1001,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) ...@@ -1001,7 +1001,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
: raid5_end_read_request; : raid5_end_read_request;
bi->bi_private = sh; bi->bi_private = sh;
pr_debug("%s: for %llu schedule op %ld on disc %d\n", pr_debug("%s: for %llu schedule op %d on disc %d\n",
__func__, (unsigned long long)sh->sector, __func__, (unsigned long long)sh->sector,
bi->bi_rw, i); bi->bi_rw, i);
atomic_inc(&sh->count); atomic_inc(&sh->count);
...@@ -1052,7 +1052,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) ...@@ -1052,7 +1052,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
rbi->bi_end_io = raid5_end_write_request; rbi->bi_end_io = raid5_end_write_request;
rbi->bi_private = sh; rbi->bi_private = sh;
pr_debug("%s: for %llu schedule op %ld on " pr_debug("%s: for %llu schedule op %d on "
"replacement disc %d\n", "replacement disc %d\n",
__func__, (unsigned long long)sh->sector, __func__, (unsigned long long)sh->sector,
rbi->bi_rw, i); rbi->bi_rw, i);
...@@ -1087,7 +1087,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s) ...@@ -1087,7 +1087,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
if (!rdev && !rrdev) { if (!rdev && !rrdev) {
if (op_is_write(op)) if (op_is_write(op))
set_bit(STRIPE_DEGRADED, &sh->state); set_bit(STRIPE_DEGRADED, &sh->state);
pr_debug("skip op %ld on disc %d for sector %llu\n", pr_debug("skip op %d on disc %d for sector %llu\n",
bi->bi_rw, i, (unsigned long long)sh->sector); bi->bi_rw, i, (unsigned long long)sh->sector);
clear_bit(R5_LOCKED, &sh->dev[i].flags); clear_bit(R5_LOCKED, &sh->dev[i].flags);
set_bit(STRIPE_HANDLE, &sh->state); set_bit(STRIPE_HANDLE, &sh->state);
......
...@@ -2943,7 +2943,7 @@ static void __btrfsic_submit_bio(struct bio *bio) ...@@ -2943,7 +2943,7 @@ static void __btrfsic_submit_bio(struct bio *bio)
if (dev_state->state->print_mask & if (dev_state->state->print_mask &
BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH) BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH)
printk(KERN_INFO printk(KERN_INFO
"submit_bio(rw=%d,0x%lx, bi_vcnt=%u," "submit_bio(rw=%d,0x%x, bi_vcnt=%u,"
" bi_sector=%llu (bytenr %llu), bi_bdev=%p)\n", " bi_sector=%llu (bytenr %llu), bi_bdev=%p)\n",
bio_op(bio), bio->bi_rw, bio->bi_vcnt, bio_op(bio), bio->bi_rw, bio->bi_vcnt,
(unsigned long long)bio->bi_iter.bi_sector, (unsigned long long)bio->bi_iter.bi_sector,
...@@ -2986,7 +2986,7 @@ static void __btrfsic_submit_bio(struct bio *bio) ...@@ -2986,7 +2986,7 @@ static void __btrfsic_submit_bio(struct bio *bio)
if (dev_state->state->print_mask & if (dev_state->state->print_mask &
BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH) BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH)
printk(KERN_INFO printk(KERN_INFO
"submit_bio(rw=%d,0x%lx FLUSH, bdev=%p)\n", "submit_bio(rw=%d,0x%x FLUSH, bdev=%p)\n",
bio_op(bio), bio->bi_rw, bio->bi_bdev); bio_op(bio), bio->bi_rw, bio->bi_bdev);
if (!dev_state->dummy_block_for_bio_bh_flush.is_iodone) { if (!dev_state->dummy_block_for_bio_bh_flush.is_iodone) {
if ((dev_state->state->print_mask & if ((dev_state->state->print_mask &
......
...@@ -8184,7 +8184,7 @@ static void btrfs_end_dio_bio(struct bio *bio) ...@@ -8184,7 +8184,7 @@ static void btrfs_end_dio_bio(struct bio *bio)
if (err) if (err)
btrfs_warn(BTRFS_I(dip->inode)->root->fs_info, btrfs_warn(BTRFS_I(dip->inode)->root->fs_info,
"direct IO failed ino %llu rw %d,%lu sector %#Lx len %u err no %d", "direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d",
btrfs_ino(dip->inode), bio_op(bio), bio->bi_rw, btrfs_ino(dip->inode), bio_op(bio), bio->bi_rw,
(unsigned long long)bio->bi_iter.bi_sector, (unsigned long long)bio->bi_iter.bi_sector,
bio->bi_iter.bi_size, err); bio->bi_iter.bi_size, err);
......
...@@ -48,7 +48,7 @@ struct bio { ...@@ -48,7 +48,7 @@ struct bio {
struct block_device *bi_bdev; struct block_device *bi_bdev;
unsigned int bi_flags; /* status, command, etc */ unsigned int bi_flags; /* status, command, etc */
int bi_error; int bi_error;
unsigned long bi_rw; /* READ/WRITE */ unsigned int bi_rw; /* READ/WRITE */
unsigned short bi_ioprio; unsigned short bi_ioprio;
struct bvec_iter bi_iter; struct bvec_iter bi_iter;
......
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