Skip to content

Commit 6296b96

Browse files
Mike Christieaxboe
authored andcommitted
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: Mike Christie <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 43b62ce commit 6296b96

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

block/blk-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ static void handle_bad_sector(struct bio *bio)
18531853
char b[BDEVNAME_SIZE];
18541854

18551855
printk(KERN_INFO "attempt to access beyond end of device\n");
1856-
printk(KERN_INFO "%s: rw=%ld, want=%Lu, limit=%Lu\n",
1856+
printk(KERN_INFO "%s: rw=%d, want=%Lu, limit=%Lu\n",
18571857
bdevname(bio->bi_bdev, b),
18581858
bio->bi_rw,
18591859
(unsigned long long)bio_end_sector(bio),

drivers/md/dm-flakey.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc)
266266
data[fc->corrupt_bio_byte - 1] = fc->corrupt_bio_value;
267267

268268
DMDEBUG("Corrupting data bio=%p by writing %u to byte %u "
269-
"(rw=%c bi_rw=%lu bi_sector=%llu cur_bytes=%u)\n",
269+
"(rw=%c bi_rw=%u bi_sector=%llu cur_bytes=%u)\n",
270270
bio, fc->corrupt_bio_value, fc->corrupt_bio_byte,
271271
(bio_data_dir(bio) == WRITE) ? 'w' : 'r', bio->bi_rw,
272272
(unsigned long long)bio->bi_iter.bi_sector, bio_bytes);

drivers/md/raid5.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
10011001
: raid5_end_read_request;
10021002
bi->bi_private = sh;
10031003

1004-
pr_debug("%s: for %llu schedule op %ld on disc %d\n",
1004+
pr_debug("%s: for %llu schedule op %d on disc %d\n",
10051005
__func__, (unsigned long long)sh->sector,
10061006
bi->bi_rw, i);
10071007
atomic_inc(&sh->count);
@@ -1052,7 +1052,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
10521052
rbi->bi_end_io = raid5_end_write_request;
10531053
rbi->bi_private = sh;
10541054

1055-
pr_debug("%s: for %llu schedule op %ld on "
1055+
pr_debug("%s: for %llu schedule op %d on "
10561056
"replacement disc %d\n",
10571057
__func__, (unsigned long long)sh->sector,
10581058
rbi->bi_rw, i);
@@ -1087,7 +1087,7 @@ static void ops_run_io(struct stripe_head *sh, struct stripe_head_state *s)
10871087
if (!rdev && !rrdev) {
10881088
if (op_is_write(op))
10891089
set_bit(STRIPE_DEGRADED, &sh->state);
1090-
pr_debug("skip op %ld on disc %d for sector %llu\n",
1090+
pr_debug("skip op %d on disc %d for sector %llu\n",
10911091
bi->bi_rw, i, (unsigned long long)sh->sector);
10921092
clear_bit(R5_LOCKED, &sh->dev[i].flags);
10931093
set_bit(STRIPE_HANDLE, &sh->state);

fs/btrfs/check-integrity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,7 +2943,7 @@ static void __btrfsic_submit_bio(struct bio *bio)
29432943
if (dev_state->state->print_mask &
29442944
BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH)
29452945
printk(KERN_INFO
2946-
"submit_bio(rw=%d,0x%lx, bi_vcnt=%u,"
2946+
"submit_bio(rw=%d,0x%x, bi_vcnt=%u,"
29472947
" bi_sector=%llu (bytenr %llu), bi_bdev=%p)\n",
29482948
bio_op(bio), bio->bi_rw, bio->bi_vcnt,
29492949
(unsigned long long)bio->bi_iter.bi_sector,
@@ -2986,7 +2986,7 @@ static void __btrfsic_submit_bio(struct bio *bio)
29862986
if (dev_state->state->print_mask &
29872987
BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH)
29882988
printk(KERN_INFO
2989-
"submit_bio(rw=%d,0x%lx FLUSH, bdev=%p)\n",
2989+
"submit_bio(rw=%d,0x%x FLUSH, bdev=%p)\n",
29902990
bio_op(bio), bio->bi_rw, bio->bi_bdev);
29912991
if (!dev_state->dummy_block_for_bio_bh_flush.is_iodone) {
29922992
if ((dev_state->state->print_mask &

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8184,7 +8184,7 @@ static void btrfs_end_dio_bio(struct bio *bio)
81848184

81858185
if (err)
81868186
btrfs_warn(BTRFS_I(dip->inode)->root->fs_info,
8187-
"direct IO failed ino %llu rw %d,%lu sector %#Lx len %u err no %d",
8187+
"direct IO failed ino %llu rw %d,%u sector %#Lx len %u err no %d",
81888188
btrfs_ino(dip->inode), bio_op(bio), bio->bi_rw,
81898189
(unsigned long long)bio->bi_iter.bi_sector,
81908190
bio->bi_iter.bi_size, err);

include/linux/blk_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct bio {
4848
struct block_device *bi_bdev;
4949
unsigned int bi_flags; /* status, command, etc */
5050
int bi_error;
51-
unsigned long bi_rw; /* READ/WRITE */
51+
unsigned int bi_rw; /* READ/WRITE */
5252
unsigned short bi_ioprio;
5353

5454
struct bvec_iter bi_iter;

0 commit comments

Comments
 (0)