Cmd - comp write

Matthew Wilcox willy at linux.intel.com
Thu Apr 24 06:58:05 PDT 2014


On Wed, Apr 23, 2014 at 08:37:39PM -0700, Learner wrote:
> Hello
> 
> How frequently is Fused command - compare-write used? 
> Is it for avoiding writes for SSDs if thee is no change? Ie read and compare the block to be written and don't write if there is no change.. 

Compare-and-Write is a building block for an (unspecified, advisory)
locking protocol.  If two entities wish to gain exclusive access to a
range of LBAs, they can agree on a block to use as their lock, and agree
on a bit-pattern to be found in that block to indicate 'unlocked'.

If anyone is using it, they're doing so through ioctls; there's no way
to submit a BIO that maps to a compare-and-write.



More information about the Linux-nvme mailing list