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/8/21 11:25 AM, JeffleXu wrote:
> Hi, Mike,
> 
> Would you please spare some time to review the following patches for
> stable tree?
> 
> - [1] for 4.19.y
> - [2] for 5.4.y
> 
> While backporting [3] for stable tree, there's some extra code specific
> to stable tree needs to be fixed, see [4] for the background info.
> 
> [1] https://www.spinics.net/lists/stable/msg448749.html
> [2] https://www.spinics.net/lists/stable/msg448754.html
> [3]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.12-rc2&id=a4c8dd9c2d0987cf542a2a0c42684c9c6d78a04e
> [4] https://www.spinics.net/lists/stable/msg448760.html
> 
> 

Also hold on until I send a new version. Sorry for the noise.

Thanks,
Jeffle


> 
> 
> 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")
>> ---
>>  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,
>>
> 

-- 
Thanks,
Jeffle



[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