From 7b3971ad0152eb1bb89a982333970118a6bd4922 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 4 Sep 2019 12:06:34 +0530 Subject: cluster/ec: Fail fsync/flush for files on update size/version failure Problem: If update size/version is not successful on the file, updates on the same stripe could lead to data corruptions if the earlier un-aligned write is not successful on all the bricks. Application won't have any knowledge of this because update size/version happens in the background. Fix: Fail fsync/flush on fds that are opened before update-size-version went bad. fixes: bz#1748836 Change-Id: I9d323eddcda703bd27d55f340c4079d76e06e492 Signed-off-by: Pranith Kumar K --- xlators/cluster/ec/src/ec-types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/cluster/ec/src/ec-types.h') diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h index 4dbf4a3a0aa..b93a07aba40 100644 --- a/xlators/cluster/ec/src/ec-types.h +++ b/xlators/cluster/ec/src/ec-types.h @@ -150,6 +150,7 @@ struct _ec_fd { loc_t loc; uintptr_t open; int32_t flags; + uint64_t bad_version; ec_fd_status_t fd_status[0]; }; @@ -180,6 +181,7 @@ struct _ec_inode { uint64_t dirty[2]; struct list_head heal; ec_stripe_list_t stripe_cache; + uint64_t bad_version; }; typedef int32_t (*fop_heal_cbk_t)(call_frame_t *, void *, xlator_t *, int32_t, -- cgit