nvme-tcp: set the STABLE_WRITES flag when data digests are enabled
authorMikhail Skorzhinskii <mskorzhinskiy@solarflare.com>
Thu, 4 Jul 2019 07:59:18 +0000 (09:59 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 9 Jul 2019 21:18:09 +0000 (14:18 -0700)
commit958f2a0f8121ae36a5cbff383ab94fadf1fba5eb
tree9865f7bbe0262c4a5064e6ec5bb6dc230a88f7ee
parent5ba895033b8e8257451e6f85e6e516c3b3ce1a68
nvme-tcp: set the STABLE_WRITES flag when data digests are enabled

There was a few false alarms sighted on target side about wrong data
digest while performing high throughput load to XFS filesystem shared
through NVMoF TCP.

This flag tells the rest of the kernel to ensure that the data buffer
does not change while the write is in flight.  It incurs a performance
penalty, so only enable it when it is actually needed, i.e. when we are
calculating data digests.

Although even with this change in place, ext2 users can steel experience
false positives, as ext2 is not respecting this flag. This may be apply
to vfat as well.

Signed-off-by: Mikhail Skorzhinskii <mskorzhinskiy@solarflare.com>
Signed-off-by: Mike Playle <mplayle@solarflare.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c