Merge tag 'for-linus-20190715' of git://git.kernel.dk/linux-block
Pull more block updates from Jens Axboe: "A later pull request with some followup items. I had some vacation coming up to the merge window, so certain things items were delayed a bit. This pull request also contains fixes that came in within the last few days of the merge window, which I didn't want to push right before sending you a pull request. This contains: - NVMe pull request, mostly fixes, but also a few minor items on the feature side that were timing constrained (Christoph et al) - Report zones fixes (Damien) - Removal of dead code (Damien) - Turn on cgroup psi memstall (Josef) - block cgroup MAINTAINERS entry (Konstantin) - Flush init fix (Josef) - blk-throttle low iops timing fix (Konstantin) - nbd resize fixes (Mike) - nbd 0 blocksize crash fix (Xiubo) - block integrity error leak fix (Wenwen) - blk-cgroup writeback and priority inheritance fixes (Tejun)" * tag 'for-linus-20190715' of git://git.kernel.dk/linux-block: (42 commits) MAINTAINERS: add entry for block io cgroup null_blk: fixup ->report_zones() for !CONFIG_BLK_DEV_ZONED block: Limit zone array allocation size sd_zbc: Fix report zones buffer allocation block: Kill gfp_t argument of blkdev_report_zones() block: Allow mapping of vmalloc-ed buffers block/bio-integrity: fix a memory leak bug nvme: fix NULL deref for fabrics options nbd: add netlink reconfigure resize support nbd: fix crash when the blksize is zero block: Disable write plugging for zoned block devices block: Fix elevator name declaration block: Remove unused definitions nvme: fix regression upon hot device removal and insertion blk-throttle: fix zero wait time for iops throttled group block: Fix potential overflow in blk_report_zones() blkcg: implement REQ_CGROUP_PUNT blkcg, writeback: Implement wbc_blkcg_css() blkcg, writeback: Add wbc->no_cgroup_owner blkcg, writeback: Rename wbc_account_io() to wbc_account_cgroup_owner() ...
这个提交包含在:
@@ -461,15 +461,14 @@ static int flakey_prepare_ioctl(struct dm_target *ti, struct block_device **bdev
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
static int flakey_report_zones(struct dm_target *ti, sector_t sector,
|
||||
struct blk_zone *zones, unsigned int *nr_zones,
|
||||
gfp_t gfp_mask)
|
||||
struct blk_zone *zones, unsigned int *nr_zones)
|
||||
{
|
||||
struct flakey_c *fc = ti->private;
|
||||
int ret;
|
||||
|
||||
/* Do report and remap it */
|
||||
ret = blkdev_report_zones(fc->dev->bdev, flakey_map_sector(ti, sector),
|
||||
zones, nr_zones, gfp_mask);
|
||||
zones, nr_zones);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
|
@@ -137,15 +137,14 @@ static int linear_prepare_ioctl(struct dm_target *ti, struct block_device **bdev
|
||||
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
static int linear_report_zones(struct dm_target *ti, sector_t sector,
|
||||
struct blk_zone *zones, unsigned int *nr_zones,
|
||||
gfp_t gfp_mask)
|
||||
struct blk_zone *zones, unsigned int *nr_zones)
|
||||
{
|
||||
struct linear_c *lc = (struct linear_c *) ti->private;
|
||||
int ret;
|
||||
|
||||
/* Do report and remap it */
|
||||
ret = blkdev_report_zones(lc->dev->bdev, linear_map_sector(ti, sector),
|
||||
zones, nr_zones, gfp_mask);
|
||||
zones, nr_zones);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/sched/mm.h>
|
||||
|
||||
#define DM_MSG_PREFIX "zoned metadata"
|
||||
|
||||
@@ -1162,8 +1163,7 @@ static int dmz_init_zones(struct dmz_metadata *zmd)
|
||||
while (sector < dev->capacity) {
|
||||
/* Get zone information */
|
||||
nr_blkz = DMZ_REPORT_NR_ZONES;
|
||||
ret = blkdev_report_zones(dev->bdev, sector, blkz,
|
||||
&nr_blkz, GFP_KERNEL);
|
||||
ret = blkdev_report_zones(dev->bdev, sector, blkz, &nr_blkz);
|
||||
if (ret) {
|
||||
dmz_dev_err(dev, "Report zones failed %d", ret);
|
||||
goto out;
|
||||
@@ -1201,12 +1201,20 @@ out:
|
||||
static int dmz_update_zone(struct dmz_metadata *zmd, struct dm_zone *zone)
|
||||
{
|
||||
unsigned int nr_blkz = 1;
|
||||
unsigned int noio_flag;
|
||||
struct blk_zone blkz;
|
||||
int ret;
|
||||
|
||||
/* Get zone information from disk */
|
||||
/*
|
||||
* Get zone information from disk. Since blkdev_report_zones() uses
|
||||
* GFP_KERNEL by default for memory allocations, set the per-task
|
||||
* PF_MEMALLOC_NOIO flag so that all allocations are done as if
|
||||
* GFP_NOIO was specified.
|
||||
*/
|
||||
noio_flag = memalloc_noio_save();
|
||||
ret = blkdev_report_zones(zmd->dev->bdev, dmz_start_sect(zmd, zone),
|
||||
&blkz, &nr_blkz, GFP_NOIO);
|
||||
&blkz, &nr_blkz);
|
||||
memalloc_noio_restore(noio_flag);
|
||||
if (!nr_blkz)
|
||||
ret = -EIO;
|
||||
if (ret) {
|
||||
|
@@ -441,8 +441,7 @@ static int dm_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
||||
}
|
||||
|
||||
static int dm_blk_report_zones(struct gendisk *disk, sector_t sector,
|
||||
struct blk_zone *zones, unsigned int *nr_zones,
|
||||
gfp_t gfp_mask)
|
||||
struct blk_zone *zones, unsigned int *nr_zones)
|
||||
{
|
||||
#ifdef CONFIG_BLK_DEV_ZONED
|
||||
struct mapped_device *md = disk->private_data;
|
||||
@@ -480,8 +479,7 @@ static int dm_blk_report_zones(struct gendisk *disk, sector_t sector,
|
||||
* So there is no need to loop here trying to fill the entire array
|
||||
* of zones.
|
||||
*/
|
||||
ret = tgt->type->report_zones(tgt, sector, zones,
|
||||
nr_zones, gfp_mask);
|
||||
ret = tgt->type->report_zones(tgt, sector, zones, nr_zones);
|
||||
|
||||
out:
|
||||
dm_put_live_table(md, srcu_idx);
|
||||
|
在新工单中引用
屏蔽一个用户