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

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

 



On Wed, Feb 07, 2024 at 10:33:36AM +0300, Dmitry Bogdanov wrote:
> Hi Mike,
> 
> On Tue, Feb 06, 2024 at 08:19:19PM -0600, Mike Christie wrote:
>  
> > +static int target_try_configure_unmap(struct se_device *dev,
> > +                                     const char *config_opt)
> > +{
> > +       if (!dev->transport->configure_unmap)
> > +               return 0;
Oh, sorry, here it is :)

> > +
> > +       if (!target_dev_configured(dev)) {
> > +               pr_err("Generic Block Discard setup for %s requires device to be configured\n",
> > +                      config_opt);
> > +               return -ENODEV;
> > +       }
> > +
> > +       if (!dev->transport->configure_unmap(dev)) {
> > +               pr_err("Generic Block Discard setup for %s failed\n",
> > +                      config_opt);
> > +               return -ENOSYS;
> > +       }
> > +
> > +       return 0;
> > +}
> > +
> >  static ssize_t emulate_tpu_store(struct config_item *item,
> >                 const char *page, size_t count)
> >  {
> > @@ -776,11 +797,9 @@ static ssize_t emulate_tpu_store(struct config_item *item,
> >          * Discard supported is detected iblock_create_virtdevice().
> >          */
> >         if (flag && !da->max_unmap_block_desc_count) {
> > -               if (!dev->transport->configure_unmap ||
> You removed this check but that callout is not mandatory and exists just in
> 2 backstore modules.
> 




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux