Target-devel archive mirror
 help / color / mirror / Atom feed
From: michael.christie@oracle.com
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: me@xecycle.info, target-devel@vger.kernel.org,
	martin.petersen@oracle.com, linux-scsi@vger.kernel.org,
	james.bottomley@hansenpartnership.com
Subject: Re: [PATCH 1/1] scsi: target: Fix unmap setup during configuration
Date: Wed, 7 Feb 2024 09:35:16 -0600	[thread overview]
Message-ID: <da5c3069-7de2-401d-861a-a3f1d7c954d4@oracle.com> (raw)
In-Reply-To: <CAFL455m_+s7nHA_FYFHzadb-qWf3VLdCqatGFbWHY1YCeuv3nw@mail.gmail.com>

On 2/7/24 4:40 AM, Maurizio Lombardi wrote:
> st 7. 2. 2024 v 3:19 odesílatel Mike Christie
> <michael.christie@oracle.com> 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.


      reply	other threads:[~2024-02-07 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07  2:19 [PATCH 1/1] scsi: target: Fix unmap setup during configuration Mike Christie
2024-02-07  7:33 ` Dmitry Bogdanov
2024-02-07  7:49   ` Dmitry Bogdanov
2024-02-07 10:40 ` Maurizio Lombardi
2024-02-07 15:35   ` michael.christie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da5c3069-7de2-401d-861a-a3f1d7c954d4@oracle.com \
    --to=michael.christie@oracle.com \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=me@xecycle.info \
    --cc=mlombard@redhat.com \
    --cc=target-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).