diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2019-09-04 12:06:34 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2019-09-06 07:27:21 +0000 |
commit | 7b3971ad0152eb1bb89a982333970118a6bd4922 (patch) | |
tree | 33e6e35fd7c2bdc49c834c8ca3cf0f1f852a11ef /xlators/cluster/ec/src/ec-types.h | |
parent | 6563ffb04d7ba51a89726e7c5bbb85c7dbc685b5 (diff) |
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 <pkarampu@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-types.h')
-rw-r--r-- | xlators/cluster/ec/src/ec-types.h | 2 |
1 files changed, 2 insertions, 0 deletions
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, |