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? Maurizio