Re: [PATCH 1/1] scsi: target: Fix unmap setup during configuration

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

 



On 2/7/24 4:40 AM, Maurizio Lombardi wrote:
> st 7. 2. 2024 v 3:19 odesílatel Mike Christie
> <michael.christie@xxxxxxxxxx> napsal:
>>
>> +static int target_try_configure_unmap(struct se_device *dev,
>> +                                     const char *config_opt)
>> +{
>> +       if (!dev->transport->configure_unmap)
>> +               return 0;
> 
> With this patch, if the configure_unmap callback is NULL then we
> return 0, implying that discard is supported.
> 
> Before, a NULL configure_unmap callback triggered an error:
> 
>         if (flag && !da->max_unmap_block_desc_count) {
>                 if (!dev->transport->configure_unmap ||   <<------
>                     !dev->transport->configure_unmap(dev)) {
>                         pr_err("Generic Block Discard not supported\n");
>                         return -ENOSYS;
>                 }
>         }
> 
> Shouldn't you return -ENOSYS in target_try_configure_unmap() if
> configure_unmap is NULL?
> 

You are right. Will fix.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux