Re: [PATCH 4.19.y 3/5] dm table: fix partial completion iterate_devices based device capability checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 3/5/21 2:55 PM, Jeffle Xu wrote:
> Similar to commit a4c8dd9c2d09 ("dm table: fix iterate_devices based
> device capability checks"), fix partial completion capability check and
> invert logic of the corresponding iterate_devices_callout_fn so that all
> devices' partial completion capabilities are properly checked.
> 
> Signed-off-by: Jeffle Xu <jefflexu@xxxxxxxxxxxxxxxxx>
> Fixes: 22c11858e800 ("dm: introduce DM_TYPE_NVME_BIO_BASED")



Similarly, the code this patch fixes, i.e., commit 22c11858e800 ("dm:
introduce DM_TYPE_NVME_BIO_BASED"), was removed since commit
9c37de297f65 ("dm: remove special-casing of bio-based immutable
singleton target on NVMe") in v5.10. Thus the code base doesn't exist in
the latest master branch.

It needs Mike's review.

-- 
Thanks,
Jeffle

> ---
>  drivers/md/dm-table.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
> index 5a94e6dc0b70..1f745d371957 100644
> --- a/drivers/md/dm-table.c
> +++ b/drivers/md/dm-table.c
> @@ -1772,18 +1772,18 @@ static int queue_no_sg_merge(struct dm_target *ti, struct dm_dev *dev,
>  	return q && test_bit(QUEUE_FLAG_NO_SG_MERGE, &q->queue_flags);
>  }
>  
> -static int device_no_partial_completion(struct dm_target *ti, struct dm_dev *dev,
> +static int device_is_partial_completion(struct dm_target *ti, struct dm_dev *dev,
>  					sector_t start, sector_t len, void *data)
>  {
>  	char b[BDEVNAME_SIZE];
>  
>  	/* For now, NVMe devices are the only devices of this class */
> -	return (strncmp(bdevname(dev->bdev, b), "nvme", 4) == 0);
> +	return (strncmp(bdevname(dev->bdev, b), "nvme", 4) != 0);
>  }
>  
>  static bool dm_table_does_not_support_partial_completion(struct dm_table *t)
>  {
> -	return dm_table_all_devices_attribute(t, device_no_partial_completion);
> +	return !dm_table_any_dev_attr(t, device_is_partial_completion);
>  }
>  
>  static int device_not_write_same_capable(struct dm_target *ti, struct dm_dev *dev,
> 





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux