diff options
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
-rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h index 9bd4a3ff37c..d8f80465922 100644 --- a/xlators/features/changelog/src/changelog-helpers.h +++ b/xlators/features/changelog/src/changelog-helpers.h @@ -539,6 +539,19 @@ int __chlog_barrier_enable (xlator_t *this, changelog_priv_t *priv); goto label; \ } while (0) +/* If it is a METADATA entry and fop num being GF_FOP_NULL, don't + * log in the changelog as it is of no use. And also if it is + * logged, since slicing version checking is done for metadata + * entries, the subsequent entries with valid fop num which falls + * to same changelog will be missed. Hence check for boundary + * condition. + */ +#define CHANGELOG_OP_BOUNDARY_CHECK(frame, label) do { \ + if (frame->root->op <= GF_FOP_NULL || \ + frame->root->op >= GF_FOP_MAXVALUE) \ + goto label; \ + } while (0) + /** * ignore internal fops for all clients except AFR self-heal daemon */ |