mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 20:48:49 +08:00
block-5.9-2020-08-28
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAl9JYHoQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpjMMD/9pp/oWPRv2pRXf7JBdQUh7zznIg84Uzv6c 6Bkfq3eGRk/Rvv21kqbI5gZOnp3/se4M3DNBph89/6Q3idlHAot9UCIAVtsQ2+I6 p/kNKMMkzIguxP0B6pb9aQTjuvSxUOuxNgGVDU8akPktjDj7Gv/gxIQVchAHqXob GL1vpBK/fvjiDHrXCCFVldCsm98P3FT7DzRvXkGXVW7Hg5KHuUVgCZtzeDMaB/dx YeGenGm5ZCOLvM1N+jgmF89XSqUmrWlZz8iqFVGJfHRf0G0QwDc2mpdNusnZdXDr sf1oG+uXszTTcK/w7/MPaHJyj6s7cKJOsXEnNUjU4VloOZvuemk3W8+t5qQ/+S/C usPuUa+QhiqoDLa7YyYgNSO6lx70s+S58TLAEgRbU7SHq/g8huOBQ3YT0MYuhX9C ZVGZfa2Yb+zWoQVFPqJcClCNjqzLihSo4qZnGSXiY7aDYM088mzLWnnFLkQ+axUq lecWHGOkF5ComTePQV31YCHx9uPtRZzyRJ+bENbFIcQc/CztpARGbADAaphZjSmV LXqHJyyNHlIo5IVITQm/qbdU9SdWS8bGNoYkB9Fa53sSWt6NIRfvXyWPE1OuyJ7C ICaXyMvo+pM5nXo28BnPwO30tfN5byqnvb7P0g3l7j3Ej/ujkhGPmWDyvj27cnve nrKgMZ9bXw== =UytK -----END PGP SIGNATURE----- Merge tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - nbd timeout fix (Hou) - device size fix for loop LOOP_CONFIGURE (Martijn) - MD pull from Song with raid5 stripe size fix (Yufen) * tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block: md/raid5: make sure stripe_size as power of two loop: Set correct device size when using LOOP_CONFIGURE nbd: restore default timeout when setting it to zero
This commit is contained in:
commit
4d41ead6ea
@ -1114,8 +1114,6 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
|
||||
mapping = file->f_mapping;
|
||||
inode = mapping->host;
|
||||
|
||||
size = get_loop_size(lo, file);
|
||||
|
||||
if ((config->info.lo_flags & ~LOOP_CONFIGURE_SETTABLE_FLAGS) != 0) {
|
||||
error = -EINVAL;
|
||||
goto out_unlock;
|
||||
@ -1165,6 +1163,8 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
|
||||
loop_update_rotational(lo);
|
||||
loop_update_dio(lo);
|
||||
loop_sysfs_init(lo);
|
||||
|
||||
size = get_loop_size(lo, file);
|
||||
loop_set_size(lo, size);
|
||||
|
||||
set_blocksize(bdev, S_ISBLK(inode->i_mode) ?
|
||||
|
@ -1363,6 +1363,8 @@ static void nbd_set_cmd_timeout(struct nbd_device *nbd, u64 timeout)
|
||||
nbd->tag_set.timeout = timeout * HZ;
|
||||
if (timeout)
|
||||
blk_queue_rq_timeout(nbd->disk->queue, timeout * HZ);
|
||||
else
|
||||
blk_queue_rq_timeout(nbd->disk->queue, 30 * HZ);
|
||||
}
|
||||
|
||||
/* Must be called with config_lock held */
|
||||
|
@ -6514,9 +6514,12 @@ raid5_store_stripe_size(struct mddev *mddev, const char *page, size_t len)
|
||||
|
||||
/*
|
||||
* The value should not be bigger than PAGE_SIZE. It requires to
|
||||
* be multiple of DEFAULT_STRIPE_SIZE.
|
||||
* be multiple of DEFAULT_STRIPE_SIZE and the value should be power
|
||||
* of two.
|
||||
*/
|
||||
if (new % DEFAULT_STRIPE_SIZE != 0 || new > PAGE_SIZE || new == 0)
|
||||
if (new % DEFAULT_STRIPE_SIZE != 0 ||
|
||||
new > PAGE_SIZE || new == 0 ||
|
||||
new != roundup_pow_of_two(new))
|
||||
return -EINVAL;
|
||||
|
||||
err = mddev_lock(mddev);
|
||||
|
Loading…
Reference in New Issue
Block a user