Blame SOURCES/0034-mem-cache-comment-added.patch

0ff280
From b96b05bc40757b26f177e4093d7f4f5b96a0f7d0 Mon Sep 17 00:00:00 2001
0ff280
From: Alexey Tikhonov <atikhono@redhat.com>
0ff280
Date: Fri, 3 Jul 2020 18:45:11 +0200
0ff280
Subject: [PATCH 34/35] mem-cache: comment added
0ff280
0ff280
Added comment explaining usage of `mcc->next_slot`
0ff280
0ff280
Reviewed-by: Sumit Bose <sbose@redhat.com>
0ff280
---
0ff280
 src/responder/nss/nsssrv_mmap_cache.c | 5 ++++-
0ff280
 1 file changed, 4 insertions(+), 1 deletion(-)
0ff280
0ff280
diff --git a/src/responder/nss/nsssrv_mmap_cache.c b/src/responder/nss/nsssrv_mmap_cache.c
0ff280
index 23df164da..71919e4ac 100644
0ff280
--- a/src/responder/nss/nsssrv_mmap_cache.c
0ff280
+++ b/src/responder/nss/nsssrv_mmap_cache.c
0ff280
@@ -65,7 +65,7 @@ struct sss_mc_ctx {
0ff280
 
0ff280
     uint8_t *free_table;    /* free list bitmaps */
0ff280
     uint32_t ft_size;       /* size of free table */
0ff280
-    uint32_t next_slot;     /* the next slot after last allocation */
0ff280
+    uint32_t next_slot;     /* the next slot after last allocation done via erasure */
0ff280
 
0ff280
     uint8_t *data_table;    /* data table address (in mmap) */
0ff280
     uint32_t dt_size;       /* size of data table */
0ff280
@@ -442,6 +442,9 @@ static errno_t sss_mc_find_free_slots(struct sss_mc_ctx *mcc,
0ff280
         if (cur == t) {
0ff280
             /* ok found num_slots consecutive free bits */
0ff280
             *free_slot = cur - num_slots;
0ff280
+            /* `mcc->next_slot` is not updated here intentionally.
0ff280
+             * For details see discussion in https://github.com/SSSD/sssd/pull/999
0ff280
+             */
0ff280
             return EOK;
0ff280
         }
0ff280
     }
0ff280
-- 
0ff280
2.21.3
0ff280