git.codelabs.ch
/
muen
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-4.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[muen/linux.git]
/
fs
/
btrfs
/
volumes.c
diff --git
a/fs/btrfs/volumes.c
b/fs/btrfs/volumes.c
index 6a72f88f77b60c422fb9481e5f0b77316ba20179..b39737568c223c208d92b2f4ab73ac0263ad3ff4 100644
(file)
--- a/
fs/btrfs/volumes.c
+++ b/
fs/btrfs/volumes.c
@@
-2324,7
+2324,7
@@
int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path
int seeding_dev = 0;
int ret = 0;
int seeding_dev = 0;
int ret = 0;
- if (
(sb->s_flags & MS_RDONLY
) && !fs_info->fs_devices->seeding)
+ if (
sb_rdonly(sb
) && !fs_info->fs_devices->seeding)
return -EROFS;
bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL,
return -EROFS;
bdev = blkdev_get_by_path(device_path, FMODE_WRITE | FMODE_EXCL,
@@
-4053,7
+4053,7
@@
int btrfs_pause_balance(struct btrfs_fs_info *fs_info)
int btrfs_cancel_balance(struct btrfs_fs_info *fs_info)
{
int btrfs_cancel_balance(struct btrfs_fs_info *fs_info)
{
- if (
fs_info->sb->s_flags & MS_RDONLY
)
+ if (
sb_rdonly(fs_info->sb)
)
return -EROFS;
mutex_lock(&fs_info->balance_mutex);
return -EROFS;
mutex_lock(&fs_info->balance_mutex);
@@
-6125,7
+6125,7
@@
static void submit_stripe_bio(struct btrfs_bio *bbio, struct bio *bio,
rcu_read_unlock();
}
#endif
rcu_read_unlock();
}
#endif
- bio
->bi_bdev = dev->bdev
;
+ bio
_set_dev(bio, dev->bdev)
;
btrfs_bio_counter_inc_noblocked(fs_info);
btrfs_bio_counter_inc_noblocked(fs_info);
@@
-6149,8
+6149,8
@@
static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
}
}
}
}
-
in
t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
- int mirror_num, int async_submit)
+
blk_status_
t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
+
int mirror_num, int async_submit)
{
struct btrfs_device *dev;
struct bio *first_bio = bio;
{
struct btrfs_device *dev;
struct bio *first_bio = bio;
@@
-6170,7
+6170,7
@@
int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
&map_length, &bbio, mirror_num, 1);
if (ret) {
btrfs_bio_counter_dec(fs_info);
&map_length, &bbio, mirror_num, 1);
if (ret) {
btrfs_bio_counter_dec(fs_info);
- return
ret
;
+ return
errno_to_blk_status(ret)
;
}
total_devs = bbio->num_stripes;
}
total_devs = bbio->num_stripes;
@@
-6193,7
+6193,7
@@
int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
}
btrfs_bio_counter_dec(fs_info);
}
btrfs_bio_counter_dec(fs_info);
- return
ret
;
+ return
errno_to_blk_status(ret)
;
}
if (map_length < length) {
}
if (map_length < length) {
@@
-6220,7
+6220,7
@@
int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
dev_nr, async_submit);
}
btrfs_bio_counter_dec(fs_info);
dev_nr, async_submit);
}
btrfs_bio_counter_dec(fs_info);
- return
0
;
+ return
BLK_STS_OK
;
}
struct btrfs_device *btrfs_find_device(struct btrfs_fs_info *fs_info, u64 devid,
}
struct btrfs_device *btrfs_find_device(struct btrfs_fs_info *fs_info, u64 devid,