Re: UNMAP command parameter list

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

 



On Mon, Nov 10, 2014 at 11:44:39AM -0500, Martin K. Petersen wrote:
> You'll have to traverse scatterlist and extract the descriptor from
> there. You can use scsi_for_each_sg() to walk the list.
> 
> If you only care about in-kernel discards it's pretty easy since we only
> issue a single descriptor. If you want to support arbitrary block pc
> UNMAP commands you'll have to be able to deal with multiple descriptors
> across multiple scatterlist elements. But the accessor macro makes that
> easy so I suggest you take that approach.

Note that if the hardware doesn't actually implement UNMAP and you have
to emulate something you're probably better off emulating WRITE SAME
(16) with the UNMAP bit, as the format is a lot easier to handle,
and it's much better specified to start with.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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