aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorNikos Tsironis <ntsironis@arrikto.com>2019-02-14 20:38:47 +0200
committerMike Snitzer <snitzer@redhat.com>2019-02-14 19:02:29 -0500
commit4ae280b4ee3463fa57bbe6eede26b97daff8a0f1 (patch)
treeafe587e40391199bed1d9b5fdff20f32db8bad28 /net/core/sock.c
parentdm crypt: don't overallocate the integrity tag space (diff)
downloadlinux-dev-4ae280b4ee3463fa57bbe6eede26b97daff8a0f1.tar.xz
linux-dev-4ae280b4ee3463fa57bbe6eede26b97daff8a0f1.zip
dm thin: fix bug where bio that overwrites thin block ignores FUA
When provisioning a new data block for a virtual block, either because the block was previously unallocated or because we are breaking sharing, if the whole block of data is being overwritten the bio that triggered the provisioning is issued immediately, skipping copying or zeroing of the data block. When this bio completes the new mapping is inserted in to the pool's metadata by process_prepared_mapping(), where the bio completion is signaled to the upper layers. This completion is signaled without first committing the metadata. If the bio in question has the REQ_FUA flag set and the system crashes right after its completion and before the next metadata commit, then the write is lost despite the REQ_FUA flag requiring that I/O completion for this request must only be signaled after the data has been committed to non-volatile storage. Fix this by deferring the completion of overwrite bios, with the REQ_FUA flag set, until after the metadata has been committed. Cc: stable@vger.kernel.org Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com> Acked-by: Joe Thornber <ejt@redhat.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'net/core/sock.c')
0 files changed, 0 insertions, 0 deletions