Verification of modified dirty page bitmap
A first portion of a bitmap from a set of bitmaps designated as a current active bitmap at a first point in time is modified responsive receiving a write request for a target page within a namespace of a memory device during migration of the namespace. The first portion containing a bit associated with the target page. The modified first portion is stored. Whether a second portion of a bitmap from the set of bitmaps designated as the current active bitmap at a second point in time matches the modified first portion is determined. The second portion contains a bit associated with the target page. The current active bitmap has not changed from the first point in time is determined responsive to determining that the second portion matches the modified first portion.
1 . A method comprising:
receiving, by a processing device, during migration of a namespace of a memory device, a write request with respect to a target page associated with the namespace;
identifying a first bitmap of a set of bitmaps, wherein the first bitmap is referenced by a current active bitmap pointer;
reading a first portion of the first bitmap, wherein the first portion contains a first bit that tracks a status of the target page;
modifying the first bit of the first portion of a bitmap;
storing the modified first portion;
identifying a second bitmap of the set of bitmaps, wherein the second bitmap is referenced by the current active bitmap pointer;
reading a second portion of the second bitmap, wherein the second portion contains a second bit that tracks a status of the target page;
determining whether the second portion matches the modified first portion;
responsive to determining that the second portion does not match the modified first portion,
identifying a third bitmap of the set of bitmaps, wherein the third bitmap is referenced by the current active bitmap pointer;
reading a third portion of the third bitmap, wherein the third portion contains a third bit that tracks a status of the target page;
modifying the third bit of the third portion; and
storing the modified third portion.
2 . The method of claim 1 , further comprising:
responsive to determining that the second portion matches the modified first portion, determining that the first bitmap is the second bitmap.
3 . The method of claim 1 , wherein each portion of each bitmap of the set of bitmaps includes a predetermined number of bits, each bit corresponding to a page of the namespace.
4 . The method of claim 1 , wherein reading a first portion of the first bitmap comprises:
determining a first memory address storing the first portion, wherein the first memory address is based on a base memory address of the current active bitmap pointer.
5 . The method of claim 1 , wherein determining whether the second portion matches the modified first portion comprises:
comparing the modified first portion with the second portion.
6 . The method of claim 1 , wherein determining that the second portion matches the modified first portion comprises:
determining that each bit of the second portion matches each bit of the modified first portion.
7 . The method of claim 1 , wherein determining that the second portion does not match the modified first portion comprises:
determining that at least one bit of the second portion does not match a corresponding bit of the modified first portion.
8 . A system comprising:
a plurality of memory devices; and
a processing device, operatively coupled with the plurality of memory devices, to perform operations comprising:
receiving, by a processing device, during migration of a namespace of a memory device, a write request with respect to a target page associated with the namespace;
identifying a first bitmap of a set of bitmaps, wherein the first bitmap is referenced by a current active bitmap pointer;
reading a first portion of the first bitmap, wherein the first portion contains a first bit that tracks a status of the target page;
modifying the first bit of the first portion of a bitmap;
storing the modified first portion;
identifying a second bitmap of the set of bitmaps, wherein the second bitmap is referenced by the current active bitmap pointer;
reading a second portion of the second bitmap, wherein the second portion contains a second bit that tracks a status of the target page;
determining whether the second portion matches the modified first portion;
responsive to determining that the second portion does not match the modified first portion,
identifying a third bitmap of the set of bitmaps, wherein the third bitmap is referenced by the current active bitmap pointer;
reading a third portion of the third bitmap, wherein the third portion contains a third bit that tracks a status of the target page;
modifying the third bit of the third portion; and
storing the modified third portion.
9 . The system of claim 8 , wherein the processing device is to perform operations further comprising:
responsive to determining that the second portion matches the modified first portion, determining that the first bitmap is the second bitmap.
10 . The system of claim 8 , wherein each portion of each bitmap of the set of bitmaps includes a predetermined number of bits, each bit corresponding to a page of the namespace.
11 . The system of claim 8 , wherein reading a first portion of the first bitmap comprises:
determining a first memory address storing the first portion, wherein the first memory address is based on a base memory address of the current active bitmap pointer.
12 . The system of claim 8 , wherein determining whether the second portion matches the modified first portion comprises:
comparing the modified first portion with the second portion.
13 . The system of claim 8 , wherein determining that the second portion matches the modified first portion comprises:
determining that each bit of the second portion matches each bit of the modified first portion.
14 . The system of claim 8 , wherein determining that the second portion does not match the modified first portion comprises:
determining that at least one bit of the second portion does not match a corresponding bit of the modified first portion.
15 . A non-transitory computer-readable storage medium comprising instructions that, when executed by a processing device, cause the processing device to perform operations comprising:
receiving, by a processing device, during migration of a namespace of a memory device, a write request with respect to a target page associated with the namespace;
identifying a first bitmap of a set of bitmaps, wherein the first bitmap is referenced by a current active bitmap pointer;
reading a first portion of the first bitmap, wherein the first portion contains a first bit that tracks a status of the target page;
modifying the first bit of the first portion of a bitmap;
storing the modified first portion;
identifying a second bitmap of the set of bitmaps, wherein the second bitmap is referenced by the current active bitmap pointer;
reading a second portion of the second bitmap, wherein the second portion contains a second bit that tracks a status of the target page;
determining whether the second portion matches the modified first portion;
responsive to determining that the second portion does not match the modified first portion,
identifying a third bitmap of the set of bitmaps, wherein the third bitmap is referenced by the current active bitmap pointer;
reading a third portion of the third bitmap, wherein the third portion contains a third bit that tracks a status of the target page;
modifying the third bit of the third portion; and
storing the modified third portion.
16 . The non-transitory computer-readable storage medium of claim 15 , wherein the processing device is to perform operations further comprising:
responsive to determining that the second portion matches the modified first portion, determining that the first bitmap is the second bitmap.
17 . The non-transitory computer-readable storage medium of claim 15 ,
wherein each portion of each bitmap of the set of bitmaps includes a predetermined number of bits, each bit corresponding to a page of the namespace.
18 . The non-transitory computer-readable storage medium of claim 15 , wherein reading a first portion of the first bitmap comprises:
determining a first memory address storing the first portion, wherein the first memory address is based on a base memory address of the current active bitmap pointer.
19 . The non-transitory computer-readable storage medium of claim 15 , wherein determining that the second portion matches the modified first portion comprises:
determining that each bit of the second portion matches each bit of the modified first portion.
20 . The non-transitory computer-readable storage medium of claim 15 , wherein determining that the second portion does not match the modified first portion comprises:
determining that at least one bit of the second portion does not match a corresponding bit of the modified first portion.