Re: [PATCH v5 07/10] scsi: sd_zbc: emulate ZONE_APPEND commands

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

 



On Fri, Apr 10, 2020 at 01:53:49AM +0900, Johannes Thumshirn wrote:
> +	if (req_op(rq) == REQ_OP_ZONE_APPEND) {
> +		ret = sd_zbc_prepare_zone_append(cmd, &lba, nr_blocks);
> +		if (ret) {
> +			scsi_free_sgtables(cmd);
> +			return ret;
> +		}
> +	}

So actually.

I've been trying to understand the lifetime of the sgtables.  Shouldn't
we free them in the midayer ->init_command returned BLK_STS_*RESOURCE
instead?  It seems like this just catches one particular error instead
of the whole category?  The end of scsi_queue_rq seem like a particular
good place, as that also releases the resources for the "hard" errors.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux